[lxc-devel] Shutting down containers properly

Christian Seiler christian at iwakd.de
Fri May 25 14:40:38 UTC 2012


Hi,

> my lxc management script uses lxc-stop just for an emergency action
> called "fored-stop" and it will be also applied, if a normal "stop"
> (alias "halt") action will timeout after 5min. For this normal
> shutdown (or reboot) of a container, I'm sending just a SIGPWR (or
> SIGINT) to the containers init (sysvinit) process. This will result
> into the same actions as one will call 'poweroff' or 'reboot' inside
> it.

Yes, obviously that also works, but then you need to manually update
the inittab of a container and rewire reboot/power failure actions to
cause a shutdown as you describe.

I'd really prefer shutting down a container just worked out of the box
without any strange modifications to /etc/inittab for sysvinit. I
really think shutting down containers properly is a functionality that
LXC should support out of the box.

Regards,
Christian





More information about the lxc-devel mailing list