Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Managing virtual machines with libvirt: Basic Concept

Managing virtual machines with libvirt: Basic Concept

Publication Date: 30 Nov 2023

1 Environment

This document applies to the following products and product versions:

  • SUSE Linux Enterprise Server 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5

2 What is libvirt?

libvirt is a collection of software that provides a common API (Application Programming Interface) for managing popular virtualization solutions, for example KVM and Xen. libvirt consists of an API library, a system service libvirtd, and a command line utility virsh.

Using the libvirt-based tools is the recommended way of managing VM Guests. Interoperability between libvirt and libvirt-based applications has been tested and is an essential part of SUSE's support stance.

3 How does libvirt work?

The libvirtd service runs on the server and performs management tasks for virtualized guests, for example starting, stopping, and migrating guests between host servers. The libvirt client libraries and utilities connect to libvirtd to issue tasks and collect information about the configuration and resources of the host system and guests.

The configuration of each virtual machine is stored in an XML file. You can manage their configurations in the following ways:

  • Use Virtual Machine Manager and use its comfortable graphical user interface.

  • Use virsh and set configuration options on the command line.

  • Export and edit VM Guest's configuration file manually, then re-import it back to the virtual machine.

4 Benefits of using libvirt

Using libvirt has the following benefits:

  • A unified API to manage diverse virtualization technologies.

  • A number of existing libvirt-based utilities that simplify the management of virtual machines.

  • Ability to manage remote virtual machines.

  • On a host running the libvirtd service, you can manage various types of storage that are available to VM Guests.

  • On a host running the libvirtd service, you can manage physical and logical network interfaces that are available to VM Guests.