How do I LXC console?

Mon 28 January 2013 by Lars Kellogg-Stedman

It took me an unreasonably long time to boot an LXC container with working console access. For the record:

When you boot an LXC container, the console appears to be attached to a pts device. For example, when booting with the console attached to your current terminal:

# lxc-start -n node0 …
read more

Cleaning up LXC cgroups

Mon 28 January 2013 by Lars Kellogg-Stedman

I spent some time today looking at systemd (44) under Fedora (17). When stopping an LXC container using lxc-stop, I would always encounter this problem:

# lxc-stop -n node0
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/systemd/node0

This prevents one from starting a new container …

read more

Systemd and the case of the missing network

Mon 28 January 2013 by Lars Kellogg-Stedman

I was intrigued by this post on socket activated containers with systemd. The basic premise is:

  • systemd opens a socket on the host and listens for connections.
  • When a client connections, systemd spawns a new container.
  • The host systemd passes the connected socket to the container systemd.
  • Services in the …
read more

A second look at Arch Linux

Fri 25 January 2013 by Lars Kellogg-Stedman

This is a followup to an earlier post about Arch Linux.

I've since spent a little more time working with Arch, and these are the things I like:

  • The base system is very small and has a very short boot time. I replaced Ubuntu on my old Eee PC with …

read more

Parsing Libvirt XML with xmllint

Fri 21 December 2012 by Lars Kellogg-Stedman

I've been playing around with the LXC support in libvirt recently, and I'm trying to use a model where each LXC instance is backed by a dedicated LVM volume. This means that the process of starting an instance is:

  • mount the instance root filesystem if necessary
  • start the instance

It's …

read more