LXC containers in practical use on the desktop

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Preparing for LXC

An essential ingredient of LXC is the control groups kernel function (Cgroups), with which processes and groups of processes can be controlled and managed. Ubuntu's current kernel has the corresponding functionality automatically activated, so modifying fstab is no longer necessary. The only limitation of LXC is that compatible distributions run only with the guest kernel in a container. LXC allows only Linux guests on a Linux host. You are ready to run Ubuntu directly after installing the lxc package. You can test this with the lxc-checkconfig command (Figure 2). You should see enabled at the end of each output line.

Figure 2: The lxc-checkconfig command tells us all is well.

Spanning Containers

Before you can deploy a container, you need to decide which operating system to run on it. LXC provides some templates to make it easier. You can find them with the ls /usr/share/lxc/templates command. A few of the templates listed here already use systemd, which currently causes problems in a LXC container. These should be fixed soon, however. If you want to test operating systems such as openSUSE, Arch Linux, or Fedora, you can switch to the sysvinit container if problems arise as described in the Debian wiki [7]. If the distribution matches, Debian offers itself as guest, because the template installs the latest release, currently Debian 7 "Wheezy," which still uses sysvinit.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content