January 21, 2017

OpenVZ and LXD, which enable you to run a complete operating system inside a container, are not very different. But is one system container platform better than the other? Here’s a comparison of OpenVZ and LXD.

Both are “system container” platforms, designed to host complete guest operating systems without requiring VMware-style emulation. System container platforms are different from Docker containers because Docker is designed primarily for hosting individual applications inside containers.

The main selling point of both OpenVZ and LXD is that they provide a more lightweight solution for running guest operating systems than VMware, KVM or other virtualization platforms support. From a high-level point of view, both work in the same way.

OpenVZ vs. LXD

But there are some important characteristics that separate these two platforms.

Details specific to OpenVZ include:

  • It has been around since the mid-2000s. It’s an established technology.
  • Supports all of the major Linux distributions. You don’t have to use a specific distribution to use OpenVZ.
  • It requires a special kernel to be installed. That could be a problem if you need special features in your kernel that are not built into the kernel packages provided by OpenVZ.
  • Commercial support is available from Virtuozzo, the main company behind OpenVZ development. You’re unlikely to find commercial support options elsewhere.
  • Access to physical hardware from inside a container is disabled by default when using OpenVZ. That means if you want an application inside your containerized guest operating system to access a device such as a graphics card on the host, you’ll have to configure the access manually. (This inconvenience could be considered a strength because restricting access to hardware is arguably a security feature.)

And here are characteristics specific to LXD:

  • It is based on LXC, the Linux containerization framework that has been around since the late 2000s. However, LXD itself is a new technology—its first stable release was in spring 2016.
  • It currently supports only Ubuntu, Canonical’s Linux distribution.
  • It does not require a special kernel; you can use the stock Ubuntu kernel with LXD just fine.
  • Canonical says it offers commercial support for LXD, but that seems to require paying for a support plan for your entire Ubuntu system.

Choosing Between OpenVZ and LXD

Which of these system container platforms is best? Your mileage will vary, of course. But in general, LXD is probably the best solution if you already use Ubuntu to host your workloads or you can easily switch to it. Otherwise, since LXD does not work on other Linux distributions, OpenVZ is going to be the only option if you are wed to a different host operating system.

My guess is that, because LXD enjoys strong backing from Canonical, it will continue to evolve and will eventually support other distributions. When that happens, it may be a better choice overall because it is not subject to some of the restrictions of OpenVZ, such as the requirement that you install a special kernel. But until then, OpenVZ clearly has a lot of value as the go-to solution for running system containers on distributions other than Ubuntu.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.

  • KDP

    I used OpenVZ in the past and now use LXD.

    There are many LXD containers available such as Fedora, CentOS, Gentoo, Debian, Arch and Alpine.

    From https://linuxcontainers.org/lxd/getting-started-cli/
    There are currently packages for multiple distributions including Gentoo and, of course, Ubuntu. Users of other distributions might find it in their package manager too.
    If it is not there yet please download and build LXD from git or use our latest release tarball.

    So you should probably change or update your article to mention this.