[Lxc-users] stopping a container

Papp Tamas tompos at martos.bme.hu
Mon Sep 5 07:24:13 UTC 2011


On 09/05/2011 08:38 AM, Jäkel, Guido wrote:
>> What is the right way to stop a container?
> Dear Papp,
>
> Like with the thread paradigm in computing langugages, the "right" way is that the thread decides to stop. Therefore your container have to leave.
>
> Depending on your Linxus flavor inside the container, you e.g. may send a signal to it's init process to proper shut down. This mechanism is "historical" intended to be used by an USV poser supply. In the moment, I'm using an old-style sytem v init and I may just send a SIGINT to reboot and a SIGPWR to halt it (must be enabled in the inittab).
>
>
> Another (planned) way is to use lxc-execute, but this is still not working. Ulli Hornbacher therefore wrote it's own workaround: A little daemon executes all command pushed in by a command running at the host -- disregarding to all aspects of security.
>
> If you're running a sshd inside the container -- and in the most case you will I think -- you may use this (with a deposited key) to directly send commands to it.

hi,

I don't like the ssh way. I think, halting a container automatically 
through an ssh connection is a joke, wich should not be used in any way.

tamas




More information about the lxc-users mailing list