---
title: Introduction to nova-compute-lxd
description: LXD is a lightweight container hypervisor for full system containers,
  unlike Docker and Rocket which is for application containers. This means that the
  container will look and feel like a regular VM – but will act like a container.
  LXD uses the same container technology found in the Linux kernel (cgroups, namespaces,
  LSM, etc). The  […]
url: https://canonical.com/blog/introduction-to-nova-compute-lxd?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Canonical](https://canonical.com/blog/author/canonical "More about Canonical")

6 May 2015

# Introduction to nova-compute-lxd

[containers](https://canonical.com/blog/tag/containers)
[LXD](https://canonical.com/blog/tag/lxd)
[nova](https://canonical.com/blog/tag/nova)
[OpenStack](https://canonical.com/blog/tag/openstack)

---

Share the article

LXD is a lightweight container hypervisor for full system containers, unlike Docker and Rocket which is for application containers. This means that the container will look and feel like a regular VM – but will act like a container. LXD uses the same container technology found in the Linux kernel (cgroups, namespaces, LSM, etc). The LXD project has a 2 week development cycle which many more features are coming in the future. [Stéphane Graber’s blog post](https://insights.ubuntu.com/2015/04/28/getting-started-with-lxd-the-container-lightervisor/) is a very good introduction about LXD.

I have been focusing on LXD with OpenStack integration. In order to facilitate the OpenStack integration with LXD we have created a plugin called nova-compute-lxd (nclxd). The plugin uses the REST API to interact with OpenStack to provide common container operations to OpenStack. An high level example of how nclxd creates a container is the following:

1. Download the tarball image from glance.
2. Untar the tarball image into its own directory.
3. Create a rootfs of the tarball that have been just created.
4. Craft the appropriate json needed by the LXD rest api
5. Tell the LXD daemon to create a container by generating a “put” request.

There is a couple of ways where one can install nclxd and use it with OpenStack:

## Installing the plugin from source

The source for nclxd is available via Github. To install the source

```
git clone https://github.com/lxc/nova-compute-lxd
```

After you have installed the source and configured LXD. You will need to configure the compute driver in your /etc/nova/nova.conf to the following:

```
compute_driver=nclxd.nova.virt.lxd.LXDDriver
```

and configure LXD, configure OpenStack, and restart the nova-compute service.

## Installing from the Ubuntu Archive

Since nclxd is still configured to be a technology preview, it is not available via the Ubuntu Cloud Archive. However it is available for Ubuntu 15.04. To install it simply run the following command:

```
sudo apt-get install nova-compute-lxd
```

Once you have finished installing you will need to configure LXD, configure your nova user to see the LXD daemon and restart your nova-compute service.

## Installing via Juju Charms

Installing nclxd via the nova-compute charm is the easiest way to deploy it. In order for you to use nclxd with the charm, the option is simply the following in the nova-compute charm:

```
virt-type: lxd
```

Once you have deployed the nova-compute charm with LXD enable, the users with be created with the correct permissions, and nova-compute will just be simply ready for you to use.

## Using LXD with Openstack

Once you have finished downloading and configured nclxd you will need to upload an cloud image to the glance server that LXD can use. In order to do that you simply have to do the following:

```
wget -O vivid-server-cloudimg-amd64-root.tar.gz \
https://cloud-images.ubuntu.com/vivid/current/ vivid-server-cloudimg-amd64-root.tar.gz
glance image-create --name='lxc' --container-format=bare --disk-format=raw \
< vivid-server-cloudimage-amd64-root.tar.gz
```

After you upload the image to glance then you will be ready to go. If you have any questions please don’t hesitate to ask on the LXC mailing, #lxcontainers IRC channel on freenode, or contacting me directly. We always love getting bug reports and feedback!

### About the author

Chuck Short is a software engineer at Canonical. Originally from Vancouver but based in Ottawa, Chuck’s mission is to make sure OpenStack is a first class experience for both the X86 world and ARM world. You can follow his blog at [zulcss.wordpress.com](https://zulcss.wordpress.com/)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Ubuntu Server: a platform made for enterprise scale](https://canonical.com/blog/ubuntu-server-a-platform-made-for-enterprise-scale)

A platform is an environment that allows software to run smoothly across the infrastructure, runtime, and application layers. The key word there is “smoothly”: a good platform...

[Rhys Knipe](https://canonical.com/blog/author/rhysknipe)

7 July 2026

[### Canonical partners with Snyk for scanning chiseled Ubuntu containers](https://canonical.com/blog/canonical-partners-with-snyk-for-scanning-chiseled-ubuntu-containers)

Canonical, the publisher of Ubuntu, is pleased to announce a new partnership with developer-focused cybersecurity company Snyk. Snyk Container, Snyk’s container security...

[Canonical](https://canonical.com/blog/author/canonical)

20 March 2026

[### Introducing MicroCloud Cluster Manager](https://canonical.com/blog/introducing-microcloud-cluster-manager)

Canonical introduces the beta release of MicroCloud Cluster Manager, a new way to discover, organize, and operate your MicroCloud environments from a single, unified interface.

[Miona Aleksic](https://canonical.com/blog/author/mionaalex)

20 March 2026

[### How to set up a micro lab: four principles for a reliable homelab](https://canonical.com/blog/how-to-set-up-a-reliable-homelab)

After over a decade of running a homelab, I have learned a few difficult lessons. Although it begins as a “lab,” you inevitably end up with something you want to keep. If a...

[Jake Nabasny](https://canonical.com/blog/author/slapcat)

17 March 2026
