Translation(s): none


Linux Containers (LXC) provide a Free Software virtualization system for computers running GNU/Linux. This is accomplished through kernel level isolation. It allows one to run multiple virtual units simultaneously. Those units, similar to chroots, are sufficiently isolated to guarantee the required security, but utilize available resources efficiently, as they run on the same kernel.

For all related information visit : http://lxc.sourceforge.net/

LXC is available starting with Debian lenny (Kernel 2.6.26), however the LXC userspace tools are not packaged for lenny, so they would have to be built from source. Squeeze will have full support for LXC.

Installation

aptitude install lxc

aptitude install bridge-utils libvirt-bin debootstrap

Prepare the host

Add this line to /etc/fstab

cgroup          /sys/fs/cgroup         cgroup  defaults        0       0

Try to mount it (a reboot solves an eventual "resource busy problem" in any case)

mount -a

RootFS creation

lxc-create -n myfirstcontainer -t debian

Setup networked containers

Start and stop containers

lxc-start -n myfirstcontainer

lxc-start -n myfirstcontainer -d
lxc-console -n myfirstcontainer

lxc-halt -n myfirstcontainer

lxc-stop -n myfirstcontainer

References

See also :

Known bugs and "got to know issues"

See also