LXD — Next-Level Management for Linux Containers
What it is
LXD builds on top of LXC. Where LXC gives low-level tools to start and stop containers, LXD adds a daemon, REST API, and cluster features. Think of it as “LXC with batteries included.” With LXD, containers can be managed remotely, launched from image servers, and even live-migrated between hosts. For many admins it feels like managing lightweight VMs — same commands to launch, snapshot, copy, or migrate.
How it works
At its core LXD still uses LXC for container runtime. The difference is that LXD runs as a system service (lxd daemon) and exposes both CLI (lxc client) and REST API. Containers can be pulled from image servers (Ubuntu, Debian, Fedora, Alpine, etc.) or created from custom images. Networking is handled with bridges, fan networking, or OVN. Storage can be backed by ZFS, btrfs, LVM, or Ceph. When several hosts join into a cluster, LXD provides scheduling and live migration using CRIU and shared storage backends.
Technical profile
Area | Details |
Runtime base | LXC (Linux kernel namespaces & cgroups) |
Management | LXD daemon + lxc client, REST API |
Images | Prebuilt image servers (Ubuntu, Debian, Fedora, Alpine, etc.) |
Storage backends | ZFS, btrfs, LVM, Ceph, directory |
Networking | Linux bridge, fan, OVN integration |
Cluster support | Yes (multi-node, with migration) |
Security | AppArmor, seccomp, user namespaces |
License | Open source (Apache 2.0) |
Installation guide
1. Install LXD packages (snap recommended on Ubuntu).
2. Run lxd init to set up storage pool, network, and clustering (if needed).
3. Launch a container: lxc launch ubuntu:22.04 testvm.
4. Use lxc exec testvm — bash to enter.
5. For clusters, repeat lxd init on more nodes and join them.
6. Use lxc list, lxc stop, lxc snapshot, lxc copy for daily ops.
Usage scenarios
– Remote management of container hosts with central CLI/API.
– Clusters of lightweight “VM-like” containers with snapshots and migration.
– Dev/test environments with fast provisioning from image servers.
– Mixed infrastructure: containers for apps, VMs for special workloads (LXD can run VMs too).
Limitations
– Linux-only; no support for Windows/macOS hosts.
– More complex than plain LXC — requires daemon and API.
– CRIU-based migration sometimes limited depending on kernel features.
– Smaller ecosystem compared to Docker/Podman for developer tooling.
Comparison snapshot
Tool | Strengths | Best fit |
LXD | Remote API, clustering, images, VM support | Ops teams managing multi-host Linux containers |
LXC | Minimal, scriptable, no daemon | Admins who want low-level control |
Docker/Podman | App packaging, OCI images, CI/CD integration | Developers, DevOps pipelines |
KVM/QEMU | Full VMs, multi-OS | Workloads needing full OS isolation |