On Sun 2012-03-04 (13:49), Xavier Garcia wrote:

> There is any way to execute a command inside a running container from host ?

I have written a small daemon "lxc-cmdd" running inside the container,
which the host-script "lxc" can connect to.
Example:

root@zoo:~# lxc -l
container              disk (MB)    RAM (MB)   start-PID    status
fex                            -           8        1230   running
gopher                         -           7        8583   running
ubuntu                         -           0           0   stopped
vmtest1                        -           0           0   stopped
vmtest8                        -           0           0   stopped

root@zoo:~# lxc -x fex "uname -a;uptime"
Linux fex.uni-stuttgart.de 2.6.38-13-server #54~lucid1-Ubuntu SMP Wed Jan 4 
14:38:03 UTC 2012 x86_64 GNU/Linux
 18:25:17 up 19 days,  6:32,  0 users,  load average: 0.00, 0.01, 0.05

root@zoo:~# lxc-ps --lxc | grep cmdd
fex         1344 ?        00:00:00 lxc-cmdd
gopher      8623 ?        00:00:00 lxc-cmdd


http://fex.rus.uni-stuttgart.de/lxc-ubuntu
http://fex.rus.uni-stuttgart.de/download/lxc.tar

-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlac...@rus.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/
REF: <capipkoq32u9ahbs4lrpxnko69tvtlccxyyya_bbaaz+1t5v...@mail.gmail.com>

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to