[lxc-users] Add default route to LXD 2.8 bridge
I'd like to have LXD manage a host network aware bridge and it almost works except for needing two extra manual "brctl addif" and "ip route add default via" steps. Would some variation of this... lxc network set lxdbr0 ipv4.routes (set default gw) possibly work for a default route? Alternatively is there some host side non-LXD systemd or ip-up like triggers that could run the brctl and ip route commands when LXD brings up whatever bridge it is managing? I know I could use the standard networking system to provide a host bridge and just tell LXD to use it but I'd prefer to let LXD itself manage this bridge so I can use the LXD API to manage it, especially on remote hosts. ~ lxc network show lxdbr0 config: dns.domain: xx.org ipv4.address: 192.168.0.2/24 ipv4.routes: 192.168.0.0/24 ipv4.routing: "true" ipv6.address: none name: lxdbr0 type: bridge usedby: - /1.0/containers/z1 managed: true ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] lxc network command missing
On 02/06/2017 07:00 AM, Bruce j wrote: Good day, I have setup and installed a container on a Ubuntu 16 machine. Everything is normal with one exception, there is no "lxc network" command available. The container does get an IP address assigned to it, I have re-installed a couple times with the same result. I am not sure what I am doing to make this happen. Below is the list of commands available, I appreciate any help. LXD in Xenial (Ubuntu 16.04) comes by default with the version 2.0.x. The "network" command and all the new network management in LXD comes from 2.3 version. You can install LXD 2.8 now in Xenial in two ways: 1. Activate xenial-backports repository, see [1], and install this version with "sudo apt install lxd/xenial-backports". 2. Add the Ubuntu linuxcontainers.org stable PPA [2] and install/upgrade LXD from this. My sugestion will be the first one, because this one will maintain the 5 years support with Ubuntu LTS policy. [1] https://help.ubuntu.com/community/UbuntuBackports [2] https://launchpad.net/~ubuntu-lxc/+archive/ubuntu/stable -- Yonsy Solis ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Graceful Shutdown/Reboot
I suggest you to look for shutdown messages in the service log file, e.g. /var/log/mysql/error.log . I expect all sane distributions to at least try to stop all containers (as well as other processes) gracefully and give them some time to finish their work. However, I suppose it is possible to install and run LXC in a way that containers won't close correctly, so it makes sense to check first. -- With Best Regards, Marat Khalili On 06/02/17 16:36, Brett 11 wrote: Hi guys. Forgive me if this question has been answered before. I couldn't find it.. When I shutdown/reboot the HOST, does LXC gracefully shutdown the containers and their services automatically? Or should they always be shutdown manually or via script before HOST shutdown/reboot? I have a container running MySQL for example and have been using 'lxc-stop' before I shutdown the host. I really don't want to assume the host can gracefully shutdown the container & MySQL so it would be nice to know 'for sure'. Thanks to all who can help! Brett ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] Graceful Shutdown/Reboot
Hi guys. Forgive me if this question has been answered before. I couldn't find it.. When I shutdown/reboot the HOST, does LXC gracefully shutdown the containers and their services automatically? Or should they always be shutdown manually or via script before HOST shutdown/reboot? I have a container running MySQL for example and have been using 'lxc-stop' before I shutdown the host. I really don't want to assume the host can gracefully shutdown the container & MySQL so it would be nice to know 'for sure'. Thanks to all who can help! Brett ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] lxc network command missing
Hey Bruce, sounds like you have installed the version of lxd provided by Ubuntu. Installing from ppa:ubuntu-lxc/lxd-stable will probably fix your issue. ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] lxc network command missing
Hello, The command "lxc network" is available from lxd version 2.3. On Ubuntu 16.04, by default you have lxd 2.0 (LTS version). You can install more recent version of lxd with snap or PPA. Or using Ubuntu 16.10. https://www.stgraber.org/2016/10/27/network-management-with-lxd-2-3/ https://linuxcontainers.org/lxd/getting-started-cli/ Le 2017-02-06 13:00, Bruce j a écrit : > Good day, > > I have setup and installed a container on a Ubuntu 16 machine. Everything is > normal with one exception, > there is no "lxc network" command available. The container does get an IP > address assigned to it, I have > re-installed a couple times with the same result. I am not sure what I am > doing to make this happen. > Below is the list of commands available, I appreciate any help. > > Thank you > > Available commands: > config - Manage configuration. > copy - Copy containers within or in between LXD instances. > delete - Delete containers or snapshots. > exec - Execute the specified command in a container. > file - Manage files in a container. > help - Help page for the LXD client. > image - Manipulate container images. > info - List information on LXD servers and containers. > launch - Launch a container from a particular image. > list - Lists the containers. > move - Move containers within or in between lxd instances. > profile - Manage configuration profiles. > publish - Publish containers as images. > remote - Manage remote LXD servers. > restart - Change state of one or more containers to restart. > restore - Restore a container's state to a previous snapshot. > snapshot - Create a read-only snapshot of a container. > start - Change state of one or more containers to start. > stop - Change state of one or more containers to stop. > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users [1] Links: -- [1] http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] lxc network command missing
Good day, I have setup and installed a container on a Ubuntu 16 machine. Everything is normal with one exception, there is no "lxc network" command available. The container does get an IP address assigned to it, I have re-installed a couple times with the same result. I am not sure what I am doing to make this happen. Below is the list of commands available, I appreciate any help. Thank you Available commands: config - Manage configuration. copy - Copy containers within or in between LXD instances. delete - Delete containers or snapshots. exec - Execute the specified command in a container. file - Manage files in a container. help - Help page for the LXD client. image - Manipulate container images. info - List information on LXD servers and containers. launch - Launch a container from a particular image. list - Lists the containers. move - Move containers within or in between lxd instances. profile- Manage configuration profiles. publish- Publish containers as images. remote - Manage remote LXD servers. restart- Change state of one or more containers to restart. restore- Restore a container's state to a previous snapshot. snapshot - Create a read-only snapshot of a container. start - Change state of one or more containers to start. stop - Change state of one or more containers to stop. ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users