libvirt 12.2.0
The virtualization management API and daemon that virt-manager, virsh, Proxmox, and most cloud tooling build on, providing a stable interface over QEMU, KVM, LXC, and others.
Download TAR.XZ Project website ↗Download Mirrors
libvirt sits above the hypervisor and provides a stable management interface. It stores virtual machine definitions as XML, manages virtual networks and storage pools, handles snapshots, and exposes an API that tools build on.
Why it exists
QEMU can be driven directly from the command line, and doing so means reconstructing a long argument list every time, with no persistent definition, no network management, and no snapshot handling.
libvirt keeps that state. It also abstracts over more than one hypervisor, so the same tooling works with QEMU/KVM, LXC, Xen, and others.
The practical consequence is that virsh, virt-manager, Proxmox, and most cloud management layers are all clients of libvirt rather than of QEMU.
Setup
sudo apt install libvirt-daemon-system virtinst # Debian and Ubuntu
sudo dnf install @virtualization # Fedora
sudo pacman -S libvirt # Arch
sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt "$USER"
# log out and back in
Group membership is only read at login, so the usermod does nothing until you start a new session. This is the most common first stumble.
system versus session
virsh -c qemu:///system list --all # privileged, real bridged networking
virsh -c qemu:///session list --all # unprivileged, limited networking
qemu:///system is what you almost always want. Set it as the default:
echo 'export LIBVIRT_DEFAULT_URI=qemu:///system' >> ~/.bashrc
The XML is the real interface
virsh edit myvm # opens the definition, validates on save
virsh dumpxml myvm > myvm.xml
virsh define myvm.xml
Graphical tools expose a subset of what libvirt supports. Anything they cannot configure is configurable in the XML, which makes virsh edit the honest interface.
Our virt-manager and virsh guide covers day-to-day use.
Remote management
virsh -c qemu+ssh://user@server/system list --all
The same URI works in virt-manager, so one window manages VMs across several hosts. This is where libvirt stops being an abstraction and starts being genuinely convenient.
Networking
libvirt manages virtual networks, and its default network provides NAT out of the box. For guests that need addresses on your real LAN, a bridge is the arrangement you want.
virsh net-list --all
virsh net-start default
virsh net-autostart default
Verify Your Download
Source releases on download.libvirt.org are published with GPG signatures.