[Lxc-users] Executing a command inside a running container?

Michael H. Warfield mhw at WittsEnd.com
Sat Jan 30 18:11:20 UTC 2010


On Sat, 2010-01-30 at 14:20 +0100, Dominik Schulz wrote: 
> Hi,
> 
> I'm fairly new to LXC and I am looking for a way to execute a command inside a 
> running container (a full blow one with its own rootfs and full isolation). 
> lxc-execute doesn't seem to do the trick and lxc-console requires credential 
> to login. I'm looking for a way to execute command w/o having to login via ssh 
> or the lxc-console, so I can execute command directly inside the containers to 
> shut them down properly.

This is being worked on and looked at now through the use of some sort
of daemon in the running container but is not currently possible.  More
over, cgroups in the kernel does not currently support joining an active
cgroup, and may never support it, so it would have to be done through
the mediation of some sort of daemon in the running container and
communicating with the host.  There's been discussion on the -devel list
over the optimal way to do it and there are some patches running around
but AFAICT nothing has really been committed or committed to at this
time.

Mike 
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20100130/8e7b871c/attachment.pgp>


More information about the lxc-users mailing list