Updated lxc package in oneiric

The newest lxc in oneiric has several changes. One is that it now works
with libcgroup, so if you have the cgroup-bin package installed, you can
still run lxc. The main other is the new ubuntu template. There is now
a single template, ‘lxc-ubuntu’, in place of the several
release-specific ones. It supports automatically binding in your home
directory, stripping the container or using lxcguest, and using i386
containers on amd64. The basic creation command is

lxc-create -f /etc/lxc.conf -t ubuntu -n container1

but to specify arguments to the ubuntu template, you separate them
with ‘–‘. So for instance to create an i386 oneiric container which is
stripped (no lxcguest) and which has my ‘serge’ account with /home/serge
bind-mounted, I would do:

lxc-create -f /etc/lxc.conf -t ubuntu -n container1 — -r oneiric -a i386 -x -b serge

When I start this container, I can log in as user serge with the same
password I have on the host, and my home directory bind-mounted in.
Since the container is trimmed (-x) and doesn’t have lxcguest, it
won’t be as safe against updates, in particular udev updates will
likely break it. But it does make the container faster to boot, and
is easier on the host as it prevents re-firing udev events.

By default it creates a container with your current release as
identified by /etc/lsb-release (or lucid if /etc/lsb-release does not
exist), your current architecture, the use of lxcguest (so not -x), and
not binding in your user.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

One Response to Updated lxc package in oneiric

  1. Kevin says:

    That’s great for Oneiric, and I look forward to upgrading eventually, but is there any way to create i386 containers in Natty currently (on a 64 bit host)?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s