One of the areas in which open-source software has truly come into its own during the last few years is virtualization.  The latest LTS release of Ubuntu, which offers a variety of Free virtualization solutions, makes this abundantly clear.  Below, we take a look at some of those options, with a focus on KVM, and consider their meaning for Ubuntu users.

The technology for creating virtual machines has been around in one form or another for decades.  As recently as 2006 or 2007, however, there were few free and open-source virtualization solutions that were ready for production environments.

Xen existed, but it wasn’t entirely open source at that time, and it only worked well with Linux guests.  KVM was merged into the Linux kernel in early 2007, but it didn’t mature for a while after that.  And while innotek open-sourced VirtualBox around the same time, VB is only really useful for desktop users; it’s also not completely Free.

As a result, proprietary virtualization offerings were the only realistic choice for most large organizations for a long time.  VMware enjoyed a near-monopoly in the enterprise market, with some competition from companies like Sun and Microsoft, but no strong open-source contenders.

KVM on Lucid

Fast-forward to the present, however, and a lot has changed.  Not only has Xen matured and become capable of running most modern operating systems, but KVM, Linux’s native hypervisor supporting paravirtualization, has come into its own and gained features that make it a true rival to expensive proprietary alternatives.

I first started using KVM on production machines when Hardy was released in 2008.  Back then, KVM worked reliably and was easy enough to deploy, but many of its advanced features were still in development.  It also wasn’t great at running Windows: hacks were sometimes needed to get Windows guests to boot.

I’ve been very impressed with KVM on Lucid, however.  Not only has the build available in the Ubuntu repositories done a superb job of “just working,” but administration has also become much easier as a result of improvements to management utilities like virt-manager.

Virt-Manager screenshot.

virt-manager on Ubuntu 10.04.

Perhaps most noticeable of all is the seamlessness with which virtual machines can now be “live migrated,” meaning that they can be moved from one host to another without any downtime.  VMware offers this functionality, which it call VMotion, but it’s quite expensive.  In Ubuntu 10.04, free and simple live migration of KVM and XEN guests is available in the virt-manager GUI with a few clicks of the mouse.

This isn’t to write-off proprietary virtualization tools; in some situations, they do the job better than open-source alternatives.  It should also be noted that many proprietary hypervisors are available for little or no cost.  And despite the functionality gained by KVM and Xen in recent years, desktop users looking for an easy way to run Windows without having to dual-boot are still probably best served by VirtualBox.

Many organizations that currently rely on pricey closed-source virtualization environments, however, could save a lot of money and gain greater flexibility by adopting KVM or Xen for their virtualization needs.

Read More About This Topic

Share This Post

6 Comments on “Open-Source Virtualization Comes of Age in Ubuntu 10.04”

  1. RDL Says:

    Tried KVM today; it’s awful slow…

    Tried VirtualBox on same hardware; it just flies!

    KVM still needs way more polishing on the performance front.

  2. Christopher Tozzi Says:

    RDL: what were you trying to virtualize with KVM? There are still some bugs in KVM, of course, and VirtualBox may be more optimized for hosting Windows, especially when it comes to video performance and networking. I’ve never had an issue running Linux guests with KVM, however.

  3. Eli Says:

    I tried KVM for the first time after reading this article. I really like it so far. I found it to be pretty quick, though I was running Kubuntu & Xubuntu 10.04. I have yet to try it with Windows.

    Thanks for this piece, I’ll be using KVM now instead of vbox most likely.

  4. Frans Says:

    I am using KVM with QEMU and it is not slow at all. At least when you use the ‘cache=writeback’ option in the ‘-drive’ statement. Not using this option will slowdown QEMU (NOT KVM) with a factor of 4 or more.

    I do not need the virtio drivers since they work actually slower on my machine (AMD Phenom II 965, 8GB).
    I use the qemu-kvm version 1.12.4. The git version does not compile with the –disable-cpu-emulation.using the git version without the previous option let qemu run a bit slower.

    The command I use to start windows XP is:
    qemu-system-x86_64 -net vde,vlan=0,sock=/var/run/vde2/kvm0 -net nic,model=rtl8139,vlan=0,macaddr=52:54:00:00:FB:08 -m 2048 -localtime -cpu phenom -smp 2 -vga std -soundhw pcspk,ac97 -name VWinXP-nl -usb -alt-grab -cdrom /home/frans/data/projects/linux/kernel/iso/wxpvol_nl.iso -drive file=/media/raidarray/vms/vwinxp-nl.qcow2,index=0,media=disk,if=ide,cache=writeback,boot=on -no-frame -boot c

  5. RDL Says:

    @ Christopher Tozzi:

    Windows XP SP3.

    Install took forever.

    As I posted here:

    http://www.workswithu.com/2010/06/14/virtualbox-vs-kvm-on-the-desktop-a-comparison/comment-page-1/#comment-8822

    “But I’m not sure if it’s related to disk flushing issues; from what I understand, VirtualBox’s disk config is writeback by default, while KVM’s is writetrough, but I could be Oh-So-Wrong…”

  6. Wandering Dude Says:

    I’m having the same experience as RDL. I installed Win 7 on Ubuntu 10.04, per the instructions provided on Ubuntu’s site, https://help.ubuntu.com/community/KVM/Installation and it performs terribly.

    I have an Intel CPU / Mobo with support enabled, with a quad-core CPU, 2 CPUs allocated to the VM instance and 2GB of ram. Most actions are laggy, such as opening programs, etc. Anything that involves a disk write, such as Windows Update, results in severe disk thrashing and a long, long wait for actions to complete. I’ve also learned there is no support for 64-bit Windows audio. Not a big deal, as this is an image meant for development purposes and I don’t need audio, however, the awful performance makes it virtually( looks, a pun ) useless. Will try Virtual Box this weekend, and hope for better results.

Leave a Comment

 

Blog-Powered Site By ContentRobot