Understanding LXC and LXD, Canonical's Open Source Container Solution thinkstock.com

Understanding LXC and LXD, Canonical's Open Source Container Solution

A primer explaining LXC and LXD, open source container platforms developed largely by Canonical, as well as how they compare to Docker and CoreOS rkt.

LXC and LXD, two of the newest open source container platforms, can seem as difficult to understand as IRS tax rules. But they're not actually that complicated. Keep reading for an explanation of LXC, what makes it different from LXD and what both platforms have to do with Linux, Canonical and Ubuntu.

Alongside Docker and CoreOS, LXC and LXD are open source solutions for creating containers, the virtual environments that make it easy to deploy individual applications. Containers offer a lot of advantages for data centers and clouds.

Docker and CoreOS have been around for several years. You've probably heard a lot about them already. But LXC and LXD began making headlines only recently. Here's what you should know to understand where LXC and LXD fit into the open source container ecosystem:

What is LXC?

LXC, which is short for Linux Containers, is a virtualization system for Linux that makes it possible to run containers. It's not the only such solution – lots of others exist.

What is LXD?

In non-technical terms, LXD is a value-added extension of LXC. It provides features for creating and managing containers that are not available from LXC itself.

If you want the geeky explanation, it's that LXD is a REST API for the LXC library, libxlc. It provides a system daemon that apps can use for interacting with the LXC software.

LXD also provides extra features for managing containers, like the ability to perform a “live migration” by moving a running container from one host to another without shutting the container down.

Is LXD a fork or clone of LXC?

No. LXD uses LXC as the basis for providing a more user-friendly container solution. The two platforms are being developed in tandem.

Who develops LXC and LXD and why does that matter?

LXC and LXD are both open source projects. No one claims exclusive ownership over their code. However, Canonical, the company behind Ubuntu Linux, has been a major supporter of LXC since about 2012. Canonical was also responsible for launching LXD in late 2014.

Both projects therefore have links to Ubuntu, but not to the same degree. LXC remains a relatively generic platform, which will work on most Linux-based operating system. LXD should theoretically be able to do the same, but because it was developed for Ubuntu, Ubuntu is currently the only practical environment for running it. (There is a longer, more technical explanation here involving systemd.)

What do LXC and LXD have to do with Docker?

Docker used to rely on LXC, but it ceased to do so two years ago. In many ways Docker containers still work like LXC or LXD containers, but the underlying code is different.

The developers of LXC and LXD are also keen to point out that their software and Docker are designed to do different sorts of things. In their synopsis: “LXD focuses on system containers, also called infrastructure containers. That is, a LXD container runs a full Linux system, exactly as it would be when run on metal or in a VM...In contrast, Docker focuses on ephemeral, stateless, minimal containers,” which typically run a single app, not a complete operating system.

Another important difference is that Docker now runs natively on Windows and OS X. LXC and LXD are still Linux-only solutions.

Are LXC and LXD Ready for Production?

The developers think so. LXC 2.0 and LXD 2.0 were released this month. This was the first stable release of LXD. (LXC 1.0 debuted in 2014.)

There is no LXD 1.0, by the way. The first stable release appeared as LXD 2.0, since it is linked to LXC 2.0

What Does LXD Stand For?

I don't know. But I'd love it if you told me in a comment -- as long as you do not mention the Legion of Extraordinary Dancers.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish