[Lxc-users] Best way to shutdown a container

Gordon Henderson gordon at drogon.net
Tue Aug 17 15:43:04 UTC 2010


On Fri, 13 Aug 2010, Clemens Perz wrote:

> Hi!
>
> I used to run lxc-stop on my system containers when I actually want to
> run a halt. Only today I noticed, that stop actually kills all
> processes, not really doing a halt. I went through the lxc commands and
> did not find something graceful to do this job from the host systems
> shutdown scripts.
>
> Did I miss it? Maybe lxc-halt is a missing piece ;-) Is there a simple
> way to do it, preventing the need to login to the container and run halt?

Am I the only one using lxc-watchdog by Dobrica Pavlinusic ?

http://blog.rot13.org/2010/03/lxc-watchdog_missing_bits_for_openvz_-_linux_containers_migration.html

I've had to tweak it a bit for my own setup, but otherwise it seems to 
work OK.

It modified a containers inittab at start time and then sends a powerfail 
event to it's running init to simulate a reboot...

Gordon




More information about the lxc-users mailing list