Translation(s): English - EspaƱol

LXD is a next generation system container and virtual machine manager. Debian packages LTS releases of LXD, beginning with bookworm.

/!\ Due to Canonical's re-licensing and imposing of a CLA, it is very unlikely that newer versions of LXD will be available in Debian. Instead, users are encouraged to switch to Incus when trixie is released. For more details, see 1058592.

Supported versions of LXD

LXD (upstream) has the following releases:

Version

EOL

In Debian release

5.0 LTS

June 1st 2027

Bookworm

5.0.2+git20231211.1364ae4

1058592 (June 1st 2027)

Trixie (anticipated)

Incus

A community fork of LXD, Incus, has been started (announcement) and is available in Debian beginning with trixie. Users are encouraged to migrate to Incus after upgrading from bookworm to trixie.

Installation

Installing on Debian is as simple as installing the lxd package:

Configuration

After installing, you must perform an initial configuration for LXD:

LXD's default bridge networking requires the dnsmasq-base package to be installed. If you chose to install LXD without its recommended packages and intend to use the default bridge, you must first install dnsmasq-base for networking to work correctly.

If you wish to allow non-root users to interact with LXD via the local Unix socket, you must add them to the lxd group:

/!\ From the upstream documentation, be aware that local access to LXD through the Unix socket always grants full access to LXD. This includes the ability to attach file system paths or devices to any instance as well as tweak the security features on any instance. Therefore, you should only give access to users who would be trusted with root access to the host.

Init scripts

Both systemd and SysV init scripts are provided, but the SysV scripts aren't as well-tested as the systemd ones. Bug reports and patches are welcome to improve the LXD experience on non-systemd installs.

When installing LXD on a non-systemd host, you must ensure that a cgroup v2 hierarchy is mounted prior to starting LXD. One possible way to do this is to add a line like the following to your /etc/fstab:

Storage backends

LXD supports several storage backends. When installing, LXD will suggest the necessary packages to enable all storage backends, but in brief:

After installing one or more of those additional packages, be sure to restart the LXD service so it picks up the additional storage backend(s).

Virtual machines

LXD optionally can create virtual machine instances utilizing QEMU. To enable this capability, on the host system install the desired qemu-system-<arch> package(s) and the lxd-agent package. Then, restart the LXD service. You will now be able to create virtual machine instances by passing the --vm flag in your creation command.

Known issues

Updated remote "images:" server

During the first half of 2024, access to the Linux Containers image server was phased out for LXD. (Further details are available here.) Canonical has since made available a new image server at https://images.lxd.canonical.com/. Versions of LXD shipped in Debian prior to version 5.0.2+git20231211.1364ae4-5 can be pointed to the new image server by running the following command:

Other issues

References

Debian-specific information