[Lxc-users] lxc meta-script

Ulli Horlacher framstag at rus.uni-stuttgart.de
Thu May 19 07:04:41 UTC 2011


I have written a script "lxc" which is a superset of some of the lxc-*
programs and adds some extra features. Maybe it is useful for others:

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


root at vms2:~# lxc -h
usage: lxc option
options: -l  list containers
         -p  list all container processes

usage: lxc [-v] -C container [gateway/net]
options: -v  verbose mode
         -C  create new container clone

usage: lxc [-v] option container
options: -v  verbose mode
         -b  boot container
         -c  connect container console
         -e  edit container configuration
         -x  execute command in container
         -s  shutdown container
         -p  list container processes
         -l  container process list tree


root at vms2:# lxc -l
container              disk (MB)    RAM (MB)   start-PID    status
flupp                      26356          29       16915   running
ubuntu                       515           0           0   stopped
vmtest8                      490           6       17355   running

root at vms2:# lxc -C vmtest1
root at vms2:# lxc -b vmtest1
root at vms2:# lxc -l
container              disk (MB)    RAM (MB)   start-PID    status
flupp                      26356          29       16915   running
ubuntu                       515           0           0   stopped
vmtest1                      515           6       18534   running
vmtest8                      490           6       17355   running

root at vms2:# lxc -l vmtest1
init-+-cron
     |-lxc-cmdd
     |-ondemand---sleep
     |-rsyslogd---2*[{rsyslogd}]
     |-sshd
     `-3*[su---bash]

root at vms2:~# lxc -x vmtest1 uname -a
Linux vmtest1 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC 2011 x86_64 GNU/Linux


-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlacher at 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/




More information about the lxc-users mailing list