[Lxc-users] Best way to shutdown a container

Osvaldo Filho arquivostcf at gmail.com
Sat Aug 14 12:15:16 UTC 2010


This work with Upstart (Ubuntu 10.04)?

2010/8/13 Ralf Schmitt <ralf at brainbot.com>:
> Daniel Lezcano <daniel.lezcano at free.fr> writes:
>
>> On 08/13/2010 03:55 PM, 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.
>>>
>>
>> Right.
>>
>>> 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?
>>>
>>
>> It is not possible to simply shutdown / reboot a container from outside.
>
> As a workaround I use the following script:
>
> http://gist.github.com/522980
>
> It send's ctrl-c ("ctrl-alt-del") to the init process in the container
> and waits until only one process is running.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>




More information about the lxc-users mailing list