Libvirt for PowerKVM – The ubiquitous low-level Virtualization & Cloud Management API

What is Libvirt?

Libvirt is a set of APIs, providing a common layer of abstraction and control for virtual machines,virtual networks and storages. It’s a C language API with language bindings for various languages – python, ruby, php, perl, C#, java etc.  The libvirt project was initiated by Red Hat,  and currently there is an active developer community comprising folks from IBM, Fujitsu, Novell, Canonical, HP, NEC and other independent developers.

Further, libvirt is not restricted to KVM hypervisor only. It also supports  Xen, VirtualBox, Bhyve, LXC containers, and various other hypervisors.

Libvirt for PowerKVM

Libvirt was initially developed for Intel/AMD processor based systems. But, recently it has been ported on to IBM POWER processor based systems, as well. Some of the POWER specific changes have been related to adding support for ppc64 architecture, supporting POWER specific virtual devices, handling POWER characteristics around CPU identification and NUMA topology, among other things.

An user, familiar with using libvirt, and related applications for Intel/KVM, should not find any major differences in using it for PowerKVM systems. However, there are differences with respect to things like supported virtual devices, default options etc. For example, POWER systems do not support IDE bus. Instead, it supports SCSI and Virtio. Similarly, POWER systems do not support Cirrus guest video device, and supports only VGA, as the default guest video device.

A quick search for ppc64 in the libvirt git will give a good overview of the work done to have libvirt on PowerKVM  –

Using libvirt

The libvirt API is available via the libvirt daemon (libvirtd). This is the server side component, and runs on the host servers. A client application can be either local or remote to the server. Conceptually, this client-server paradigm looks like the following:

Using libvirt

API Concepts –

API Reference –

URI Reference –

Example Applications leveraging Libvirt

Some of the example applications leveraging libvirt APIs are :

  • Virsh (Virtualization shell) – This shell permits the use of  libvirt functionality in an interactive fashion from command line. More details here –
  • Virt-install – This is command-line tool to create new virtual machines.
  • Kimchi – HTML5 based management tool for KVM. More details on here –
  • Virt-manager  – It’s a desktop application for managing virtual machines using libvirt. More details here –
  • VDSM – Virtual Desktop and Server Manager (vdsm) is an agent running on the host KVM server, and is required by Red Hat Enterprise Virtualization Manager or oVirt-engine for managing the server.  More details here –
  • Nova-compute – OpenStack compute driver for KVM (nova-compute). It runs on the host server. More details here –

Pradipta Kumar Banerjee

I'm a Cloud and Linux/ OpenSource enthusiast, with 16 years of industry experience at IBM. You can find more details about me here - Linkedin

You may also like...