1354
Comment: link to a good page about LXC on Debian Squeeze
|
2066
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
== Installation == * Install required packages {{{ aptitude install lxc bridge-utils debootstrap }}} * Configure your network as a bridge (/etc/net/interfaces) {{{ # The primary network interface #allow-hotplug eth0 #iface eth0 inet dhcp auto br0 iface br0 inet dhcp bridge_ports eth0 brdige_fd 0 bridge_maxwait 0 }}} * Mount cgroup reboot save Add this line to /etc/fstab {{{ cgroup /cgroup cgroup defaults 0 0 }}} Create /croup directory {{{ mkdir -p /cgroup }}} Mount it {{{ mount -a }}} * Create first container {{{ mkdir -p /var/lib/lxc/vm0 /usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm0/ }}} |
Linux Containers (LXC) provide an open-source virtualization system for computers running GNU/Linux. This is accomplished by kernel level isolation. It allows to run multiple virtual units at once. Those units 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
- Install required packages
aptitude install lxc bridge-utils debootstrap
- Configure your network as a bridge (/etc/net/interfaces)
# The primary network interface #allow-hotplug eth0 #iface eth0 inet dhcp auto br0 iface br0 inet dhcp bridge_ports eth0 brdige_fd 0 bridge_maxwait 0
- Mount cgroup reboot save
Add this line to /etc/fstab
cgroup /cgroup cgroup defaults 0 0
Create /croup directory
mkdir -p /cgroup
Mount it
mount -a
- Create first container
mkdir -p /var/lib/lxc/vm0 /usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm0/
References
Known bugs
534964 - Please enable memory cgroup support (CONFIG_CGROUP_MEM_RES_CTLR)
See also
SystemVirtualization alternatives