Installing KVM on CentOS 6.36 September 2012 · Filed in Tutorial
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.
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.
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: CentOS · KVM · Linux · OSS · Virtualization Previous Post: APP-CAP2956: Inside the Hadoop Machine Next Post: Compiling libvirt 0.10.1 on CentOS 6.3