<br><br><div class="gmail_quote">2010/8/13 Daniel Lezcano <span dir="ltr"><<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 08/13/2010 03:55 PM, Clemens Perz wrote:<br>
</div><div class="im">> Hi!<br>
><br>
> I used to run lxc-stop on my system containers when I actually want to<br>
> run a halt. Only today I noticed, that stop actually kills all<br>
> processes, not really doing a halt. I went through the lxc commands and<br>
> did not find something graceful to do this job from the host systems<br>
> shutdown scripts.<br>
><br>
<br>
</div>Right.<br>
<div class="im"><br>
> Did I miss it? Maybe lxc-halt is a missing piece ;-) Is there a simple<br>
> way to do it, preventing the need to login to the container and run halt?<br>
><br>
<br>
</div>It is not possible to simply shutdown / reboot a container from outside.<br>
<br>
The lxc-halt commands family will be available when the "attach" to a<br>
container syscall, will be merged in the kernel upstream (crossing<br>
fingers we can have it soon).<br>
<br>
At present, there is a patchset at<br>
<a href="http://lxc.sourceforge.net/patches/linux/" target="_blank">http://lxc.sourceforge.net/patches/linux/</a> providing this capability. And<br>
the lxc-attach command is already available. Halting a container should<br>
be done by "lxc-attach -n <name> /sbin/halt" and the lxc-halt command<br>
should be a trivial wrapper around lxc-attach.<br>
<div><div></div><div class="h5"><br>
------------------------------------------------------------------------------<br>
This SF.net email is sponsored by<br>
<br>
Make an app they can't live without<br>
Enter the BlackBerry Developer Challenge<br>
<a href="http://p.sf.net/sfu/RIM-dev2dev" target="_blank">http://p.sf.net/sfu/RIM-dev2dev</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</div></div></blockquote></div>At present we only can send signals to container init from host to invoke halt process. This requires custom inittab and incompatible with upstart and some other modern init systems, but it works well at least with debian and gentoo.<div>
This approach is used in ContainerKit and it's debian template.</div><div>You can read more at <a href="http://www.trueoffice.org/wiki/ContainerKit_en">http://www.trueoffice.org/wiki/ContainerKit_en</a></div>