LXD is a next-generation system container and virtual machine manager. It offers a unified experience for running Linux system containers and VMs, providing security, scalability, and ease of use.
📑 Table of Contents
Key Features
- System Containers: Full Linux system in containers
- Virtual Machines: KVM-based VM support
- Clustering: Multi-node deployment
- Storage: ZFS, Btrfs, LVM support
- REST API: Full programmatic control
Installation
Install LXD on Ubuntu:
sudo snap install lxd
sudo lxd init
Usage Examples
Common LXD operations:
# Launch container
lxc launch ubuntu:22.04 mycontainer
# Launch VM
lxc launch ubuntu:22.04 myvm --vm
# Execute command
lxc exec mycontainer -- apt update
# Access shell
lxc shell mycontainer
# Snapshot
lxc snapshot mycontainer backup1
# Copy between hosts
lxc copy mycontainer remote:newcontainer
Benefits
LXD provides cloud-like container management on any scale. Its image-based workflow and clustering support enable production-grade container infrastructure.
Was this article helpful?