Manually Prepare a CentOS Server with KVM Virtualization

This tutorial describes how to manually prepare a CentOS physical server with KVM virtualization, and other auxiliary packages.

NOTE: When you deploy a Platform9 agent on your CentOS physical server, Platform9 takes care of installing all these dependencies on your physical server, so you don’t have to worry about doing this manually.

Installing Package Dependencies Individually

To use virtualization on CentOS you require the qemu-kvm and qemu-img packages at minimum. These packages provide the user-level KVM emulator and disk image manager on the CentOS system.

Install the qemu-kvm and qemu-img packages on your CentOS server:

yum install qemu-kvm qemu-img

Following additional virtualization packages are recommended.

python-virtinst
Provides the virt-install command for creating virtual machines.

libvirt
The libvirt package provides the server and host side libraries for interacting with hypervisors and host systems. The libvirt package provides the libvirtd daemon that handles the library calls, manages virtual machines and controls the hypervisor.

libvirt-python
The libvirt-python package contains a module that permits applications written in the Python programming language to use the interface supplied by the libvirt API.

virt-manager
virt-manager, also known as Virtual Machine Manager, provides a graphical tool for administering virtual machines. It uses libvirt-client library as the management API.

libvirt-client
The libvirt-client package provides the client-side APIs and libraries for accessing libvirt servers. Thelibvirt-client package includes the virsh command line tool to manage and control virtual machines and hypervisors from the command line or a special virtualization shell.
Install all of these recommended virtualization packages:

yum install virt-manager libvirt libvirt-python python-virtinst libvirt-client

Installing Package Dependencies as a Group

The virtualization packages can also be installed from package groups. The follow table describes the virtualization package groups and what they provide.

Package GroupDescriptionMandatory PackagesOptional Packages
VirtualizationProvides an environment for hosting virtual machinesqemu-kvmqemu-guest-agent, qemu-kvm-tools
Virtualization ClientClients for installing and managing virtualization instancespython-virtinst, virt-manager, virt-viewervirt-top
Virtualization PlatformProvides an interface for accessing and controlling virtual machines and containerslibvirt, libvirt-client, virt-who, virt-whatfence-virtd-libvirt, fence-virtd-multicast, fence-virtd-serial, libvirt-cim, libvirt-java, libvirt-qmf, libvirt-snmp, perl-Sys-Virt
Virtualization ToolsTools for offline virtual image management

To install a package group, run the yum groupinstall <groupname> command. For instance, to install theVirtualization Tools package group, run the yum groupinstall “Virtualization Tools” command.

The browser you are using is outdated. For the best experience please download or update your browser to one of the following: