Using KVM on CentOS 6.3 as a Hobbyist’s Hypervisor

CentOS logoOk, this one was a real quickie, thanks to the earlier test with Ubuntu Server. I mainly wanted to check if there was any difference, given that CentOS is basically the free (as in: not commercially unsupported) Red Hat Enterprise Linux 6.3. Originally RHEL used Xen as the default Hypervisor, but since 6.2 they switched to KVM. For those who never tried out different flavors of Linux, there are three major family trees (in alphabetical order): Debian, Red Hat, and Slackware. Ubuntu comes from the Debian tree, SUSE is one I have used from the Slackware tree, and CentOS comes from Red Hat. There are some basic configuration and directory tree differences between these three. Wikipedia has a nice tree image as well as a comparison article. CentOS gave me no real surprises.

Whereas Ubuntu has a special Server distribution, with a Long Term Support version, CentOS just has one. If you want support, it is possible, not only from Red Hat. Given it’s heritage, CentOS is often seen as the free version of RHEL, because the official RHEL release expects you to buy support. Installation was “the usual” Linux installation, with as main difference, when compared to Ubuntu Server’s installation CD, that it comes as a two DVD set. Installation is smooth and easy, using a graphical GUI with mouse support. The installation asks for the usual things, but bypasses the question for LVM or not. This may not sound like much of an issue, but it was new for me. I never got used to working with Logical Volumes, but don’t rule out that I will. But I like the choice. If you forget to check the box in the lower left corner indicating that you want to review and adapt, you’ll get an LVM based installation with most of your disk space assigned to your home directory. Ok, enough “grumpy old man”.

During installation you can choose from several typical scenarios, rather than sets of packages, and I chose the VM Server one. Again there is a checkbox you can use for reviewing and adapting and if you use it you’ll get a bit more choice. I didn’t see any mention of Xen or KVM, that is apparently considered too techy. I checked the CentOS Wiki, but all articles on Xen are for CentOS 5 or older. They start by telling you to get a special Xen capable Linux Kernel image, but for 6.3 it is not in the mirror I checked.

Creating the First VM

Given that all Wiki articles were for older versions, I used Google to find this one. It starts with installing the tooling, but I appeared to have them already thanks to my installation choice. The article helped me through the network configuration, which was different from Ubuntu. For those interested, Ubuntu has networking configured in /etc/networking, whereas Red Hat derivates use /etc/sysconfig/network-scripts. When that worked I switched to an ssh session (thanks to putty) and ran virt-manager, which was mostly just like in Ubuntu. Devices were however named differently and it took me some time to get the network bridge right (given the configuration differences). The Client VM itself was no problem at all.

Passthrough Devices

Since we’re back with KVM, we’re also back with Libvirt and Virtio, the packages dealing with virtualization and paravirtualized hardware. Adding a drive, even as boot device, was no problem.


I said this one was a quickie.

The Good

  • It’s a free OS, all of it. No hassle with licenses or support.
  • Nice installer with lots of tuning opportunities, even though I don’t agree with the defaults.
  • KVM works fine, as we’d already seen before, including disk passthrough.
  • Dialog boxes in virt-manager seemed to have more interesting options. Shouldn’t really weigh this too heavy, because it all goes straight into an XML file. My conclusion however, is that the person who made the package was somebody else than for Ubuntu.

The Bad

  • Documentation is thoroughly in need of an update. Ubuntu’s Server Guide is way better.
  • I wasted some time on the network, but that followed mainly from the previous bullet.
  • Virt-manager managed to have missing button images. I don’t know how they did that. Also it wouldn’t start second time around, which appeared to be a known bug and it had issues with putty’s X11 tunneling.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s