Translation(s): English - Español - Deutsch
Libvirt allows management of different virtualization solutions such as KVM, Xen and LXC through a common (programming and user) interface:
KVM - how to setup libvirt to manage KVM/Qemu virtual machines
Libvirt is a comprehensive suite of software tools designed to simplify the management of virtual machines and related virtualization functionalities, including storage and network interface management. This suite includes:
- A long-term stable C API for developers.
- The libvirtd daemon, which handles backend operations.
A command-line utility called virsh for user interactions.
One of the primary objectives of Libvirt is to provide a unified interface for managing multiple virtualization platforms or hypervisors.
It supports a wide range of hypervisors, including KVM/QEMU, Xen, LXC, OpenVZ and among others.
Key Features of Libvirt:
VM Management: Libvirt provides comprehensive domain lifecycle operations, including starting, stopping, pausing, saving, restoring, and migrating virtual machines. It also supports hotplug operations for various device types, such as disks, network interfaces, memory, and CPUs.
Remote Machine Support: All libvirt functionalities can be accessed on any machine running the libvirt daemon, including remote systems. Libvirt supports multiple network transport methods for remote connections, with SSH being the simplest option, requiring no additional configuration.
Storage Management: Hosts running the libvirt daemon can manage various types of storage. This includes creating file images in formats like qcow2, vmdk, and raw; mounting NFS shares; enumerating existing LVM volume groups; creating new LVM volume groups and logical volumes; partitioning raw disk devices; and mounting iSCSI shares, among other capabilities.
Network Interface Management: Libvirt enables the management of physical and logical network interfaces on hosts running its daemon. Users can enumerate existing interfaces and configure or create new interfaces, bridges, VLANs, and bond devices.
Virtual NAT and Routed Networking: Libvirt supports the creation and management of virtual networks on hosts. These networks use firewall rules to function as routers, providing virtual machines with seamless access to the host machine’s network.
Tools and programs
Tools available in Debian using libvirt are:
libvirt-daemon-system - provide the libvirtd service
virt-manager - a graphical virtual machine manager
- create/manage virtual machines
- create/manage the networks your VMs are connected to
- create/manage the storage your VMs use
virt-viewer - connect to the graphical display of your virtual machine via VNC
virtinst - create new virtual machines on the commandline
libvirt-clients - commandline tools to manage virtual machines
virt-top - top like display of virtual machines
gnome-boxes - Simple GNOME app to access remote or virtual systems
Install the relevant package(s).
Troubleshooting
virPolkitCheckAuth:133 : authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage' in var/log/syslog: add yourself to the libvirt group
See also libvirt/Debugging for advanced troubleshooting
Language Bindings
Libvirt language bindings are available for
C: libvirt-dev
Perl: libsys-virt-perl
Python: python-libvirt
OCaml: libvirt-ocaml
Ruby: libvirt-ruby
See also
libvirt-doc (installs the documentation at in /usr/share/doc/libvirt-doc/index.html)
CategoryVirtualization | CategorySoftware | CategorySystemAdministration
