[Lxc-users] [RFC] best way to add creation of lvm containers

Ulli Horlacher framstag at rus.uni-stuttgart.de
Wed Aug 24 11:59:33 UTC 2011


On Fri 2011-07-01 (12:31), Serge E. Hallyn wrote:

> so lxc-clone will create a snapshot-based clone of an lvm-backed
> container in about a second.

My "lxc" script (*) can do this in 2 seconds, without bothering LVM:

root at vms2:/lxc# lxc
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# lxc -l
container              disk (MB)    RAM (MB)   start-PID    status
fex                        57341         113        2589   running
ubuntu                       553           0           0   stopped
vmtest8                      515           0           0   stopped

root at vms2:/lxc# time lxc -C bunny 129.69.8.254/24

real    0m1.822s
user    0m0.080s
sys     0m1.380s

root at vms2:/lxc# lxc -b bunny
root at vms2:/lxc# lxc -l      
container              disk (MB)    RAM (MB)   start-PID    status
bunny                        553           5       12784   running
fex                        57350         122        2589   running
ubuntu                       553           0           0   stopped
vmtest8                      515           0           0   stopped


(*) http://fex.rus.uni-stuttgart.de/lxc.html

-- 
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