Depending on the version of lxc, lxc-stop behaves differently. In the version I use, lxc-stop kills all the processes inside the container which can lead to problems if you run a database server for example. That's why there is a separate tool - lxc-shutdown which stops a container and waits for the processes to exit gracefully. In newer versions of lxc with lxc-stop one can reboot, cleanly shut down, or kill a container....
Regards, Alex On 11/13/2015 04:30 PM, Saint Michael wrote: > Good question. I always use lxc-stop > > On Fri, Nov 13, 2015 at 9:29 AM, Alex Mestiashvili < > [email protected]> wrote: > >> Hi All, >> >> Is there a way to properly shutdown Jessie container on a Wheezy host ? >> lxc version is 0.8.0~rc1-8+deb7u2 >> >> lxc-shutdown -n $host which is basically >> >> chroot /var/lib/lxc/${_CONTAINER}/rootfs telinit 0 >> >> ends up in: >> >> "telinit: timeout opening/writing control channel /run/initctl" >> >> with no change to the host. >> >> Of course I can ssh/console to the container, run shutdown and then use >> lxc-stop to kill it, but may be there is a workaround for a direct >> shutdown ? >> >> Thank you! >> _______________________________________________ >> lxc-users mailing list >> [email protected] >> http://lists.linuxcontainers.org/listinfo/lxc-users > > > > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users > _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
