Ubuntu and KVM Virtualization: Understanding the Long-Term Direction

The next major production release of Ubuntu — version 8.04 LTS, codenamed Hardy Heron — will ship with KVM as its virtualization package. This choice is surprising to those of us who have been watching the Xen virtualization package become the darling of Virtual Machine world. So let’s try to make sense out of the KVM virtual machine and this recent choice by Ubuntu.

Hardy Heron, slated to ship in April 2008, is a major Ubuntu release and somewhat more important then the last several versions going as far back as 6.06 Dapper Drake. Hardy Heron will be supported with updates for three years on the desktop and five years on the server, with paid technical support available from Canonical Ltd. So what happens in Hardy Heron will have a ripple effect across the Ubuntu community for years to come.

Understanding the Basics
For those of you new to virtualization, the landscape of virtual machine, or VM, technology is a bit of a jumble. For instance, below is the list of technologies that describe themselves as virtual machines:

  • Application Virtualization
    • Java
    • Microsoft Dot Net CLR
    • YARV
    • Parrot
    • Wine
  • System Virtualization
    • VMware
    • Parallels
    • Virtual PC
    • VirtualBox
    • Xen
    • Solaris Zones

While application virtualization runs programs written for specific languages, system virtualization runs operating systems. What is the difference between these two systems and ultimately the distinction that made Ubuntu choose KVM over Xen?

The majority of modern programming languages run in Application Virtual Machines, such as Java in the JVM, C# in the CLR, ruby in YARV, and Perl in Parrot (eventually). This Application Virtualization allows the programmer to work with relative lack of concern for the type of computer his customers are running the application on. Wine, while not technically a virtual machine, provides an interface to run Windows applications in the Linux Operating System, so I include it in this category.

Diving Into KVM

KVM runs operating systems, which makes it a System Virtual Machine — so lets move and tackle the System perspective.

Application virtualization allows an operating system to run an application written for either another operating system or an operating system neutral VM. In contrast, system virtualization software can run multiple operating systems on the same hardware.

For users who need to run applications that require different operating systems, Wine or system virtualization is often a viable alternative to having two separate computers. (For instance, many users run Parallels system virtualization for Windows and Mac OS support on Apple hardware.)

Similarly, system virtualization allows system admins to provide a variety of operating systems, and a quantity of servers to their users that is no longer limited by the hardware in the admin’s data center. Application developers rely on System VMs to test software that is in development for its operating system support.

Understanding Xen

Xen is the current darling of system virtualization for Linux. Xen is a Hypervisor, meaning it can run multiple guest operating systems on a host computer at the same time. It accomplishes this task by introducing another software layer between the guest OS and the host hardware.

Originally authored by Cambridge University, and maintained by XenSource Inc. (now owned by Citrix inc.), Xen has been exceptionally successful. Fedora, SUSE, Redhat Enterprise and Ubuntu offer Xen packages to their users. Plus, several commercial offerings of the package by Oracle, Sun and in Amazon.com with EC2 all have contributed to great press about Xen.

But Xen has a major downside. For most guest operating systems and most hardware, the operating systems must be modified in order to run as a guest of Xen. While Xen has recently started using Intel’s Vanderpool technology (now Intel VT or IVT) or AMD’s Pacifica hardware virtualization to sidestep this limitation. However, the limitation still exists because the guest OS never has direct access to the host hardware.

Back to KVM 

In contrast, KVM is a patch to the Linux kernel that is more like Vserver, Solaris containers, or microkernels — where the guest OS sits directly on the host hardware. There’s no middleman to worry about.

KVM also employs a Hypervisor technique by leveraging QEMU to turn the Linux Kernel itself into a Hypervisor. By sitting on the Linux kernel, guest OSes appear as Linux processes and can be managed just like any other Linux application. KVM stil requires either a Vanderpool, or Pacifica compatable processor.

The Bottom Line 

So what does this choice mean to Ubuntu users? KVM is a bet on a slightly different, newer technology. KVM has been available as a kernel module for a year this month, where as Xen has been in public release since 2003. Xen and KVM use different techniques to provide relatively similar features. While Ubuntu has made the choice for host and kernel priority, Xen and others have decided that the guest OS takes priority over the host.

There is no way of telling which package will win out in the end, but we know that Ubuntu will have to live with its KVM decision for a long time. KVM is young and Hardy Heron is due out in April 2008 — two months or  less from now.

In this blogger’s opinion, KVM hardly looks ready but Ubuntu has a great track record with wrapping emerging technology with a nice bow for the enduser. If this means that KVM will receive a push in the right direction, then I can wait two months for the results.


6 thoughts on “Ubuntu and KVM Virtualization: Understanding the Long-Term Direction

  1. Pingback: Here Come Ubuntu Servers « All About Ubuntu

  2. Pingback: Ubuntu Look » Ubuntu and KVM Virtualization: Understanding the Long-Term Direction

  3. Finally someone explains the key differentiation of KVM vs Xen. (Ubuntu developers, one would think, might have done this themselves.) At any rate, I would agree that for Ubuntu it might be the right choice, with the understanding that someone running Ubuntu wants to run Ubuntu and native applications primarily. Probably Xen or that kind of approach might have the most advantages when the host system is there primarily to run VM’s and the host itself will not really be called upon to run many end-user apps.

    This reflects the basic divide in the usage of virtualization. Industrially, it’s used by large server operators to maximize the utilization of a given server, and this is where the Xen approach might be better. This is a completely different world from the individual desktop user who is using a VM to, for instance, run some Windows apps on a predominantly Ubuntu box, or to try out different distros or distro updates, or trying to gain some security by web browsing from within an isolated VM.

  4. Pingback: paul cutler’s blog » Blog Archive » links for 2008-03-09

  5. Ubuntu could also split and get the best of both worlds. When on the regular desktop edition, stick with KVM. When running Ubuntu server, which doesn’t include a GUI (rightfully so), it can do it up with XEN.

    That would be a killer combination, especially if they facilitated the exchange of VMs between the two. You could produce them on a desktop and ship them off to a server.

    Ubuntu has a lot of options in its future, as far as I can see, they just need the manpower to get all these ideas rolling. The pace of innovation will continue as Ubuntu paves over Microsoft.

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s