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
- Microsoft Dot Net CLR
- System Virtualization
- Virtual PC
- 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.
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.