Installing KVM on CentOS 6.3

After spending some time working with KVM on Ubuntu (see this post), I thought it might be worthwhile to try the same thing on a different Linux distribution. I like Ubuntu (generally), but wanted to try it on a Red Hat/CentOS system. So, here’s a look at installing KVM on CentOS 6.3. To be honest, it’s actually pretty simple. For another look at the process, see this HowtoForge post.

For reasons that will become clear in a future post, I did not install Open vSwitch during this process. (Short story: There’s a known bug in Open vSwitch caused by a backport of a kernel fix to the kernel version used by RedHat/CentOS 6.3, and I haven’t been able to find a fix yet.)

I started this process with a minimal install (the default option) of 64-bit CentOS 6.3.

First, use yum groupinstall (handy feature, by the way) to install the virtualization-related packages (line-wrapped here for readability):

yum groupinstall Virtualization "Virtualization Client" \
"Virtualization Platform" "Virtualization Tools"

This page breaks down these four groups and lists the individual packages contained in each.

However, the libvirtd daemon wouldn’t start after this process. In reviewing the log files (found, by default, at /var/log/libvirt), I found that it was failing due to a problem with multicast DNS (mDNS). That was fixed with:

yum install avahi
service start avahi-daemon

This site alluded to the need for avahi to be installed, but I was a bit surprised that it didn’t get installed automatically during the yum groupinstall process. Once avahi was installed, libvirtd started cleanly. I was then able to run virsh without any issues or errors.

Normally, from here you’d continue with setting up a Linux bridge, etc. I stopped here with the intention of first upgrading libvirt to the latest build and then installing Open vSwitch, but there are plenty of other “how to’s” that outline any additional follow-up steps.

I hope this helps someone!

Tags: , , , ,

  1. Keith’s avatar

    Would be interested in how you go and/or if you have looked at playing around with oVirt using their Hypervisor node. I’ve ran out of time and have limited hardware to get this up and running, but to me it shows tremendous potential and I’m hoping once it matures more I can replace my home ESXi5 (free) configuration with something like this or an Open Source alternative.

    This blog post is helpful as well:

    What do you think?


  2. Conrad Lawes’s avatar

    I’m a little late to this party. However, have you looked into proxmox ve?
    This is a free bare metal virtualization solution that comes with lots of goodies including: kvm and openvz virtualization, complete web-based management, integrated backup with scheduler, free Linux templates, windows virtualization.


Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>