Xen lets KVM overtake
by Thorsten Leemhuis
Xen made virtualisation a popular issue on Linux servers and seemed for a long time to be the open source virtualisation technology of choice. But the Xen developers lost that advantage by setting the wrong priorities. KVM was able to take over some key positions and, with a large number of promoters, is now in a better position.
Originally created as part of a research project in the late 1990s, the Xen hypervisor was open sourced in 2002; the first official release of Xen 1.0 was made in 2004. From then on, virtualisation on Linux servers quickly moved into the centre of attention. Soon, there were the first serious indications that it would not be long before Xen support became part of the Linux kernel. Virtualisation was considered a important future market.
And virtualisation did indeed become important, though Xen support did not enter the kernel, as kernel developers did not at all like some of the features of the Xen code at the time. The work being done to get support into the Linux kernel seemed to have low priority at the time; more effort was evident in commercial Linux products based on Xen. The official Xen code remained based on kernel 2.6.18 for a long time, which made life difficult for Linux distributors for years, because they wanted to couple the Xen code with more recent kernels containing drivers for modern hardware.
The Xen developers were only able to reach a small part of that goal when Xen guest support was included in Linux 2.6.23. But they have finally achieved it: expected next month, Linux 3.0 includes all of the important kernel components needed to set up a Dom0 operating system, which, together with the Xen hypervisor, will host guest systems. And that's not all – since mid-May, the developer branch of Qemu also contains everything needed to support Xen guest systems which run by using the virtualisation capabilities of modern processors (HVM/hardware-assisted virtualisation).
Distributors will now have a much easier time including Xen support. But the situation is not as rosy as it seems: Linux 3.0 will not offer all of the capabilities in current commercial Xen products – support for suspend-to-RAM and 3-D graphics are missing. Retrofitting these and other functions will take time.
There are many indications that the Xen developers should have put more effort into merging Xen support into the official kernel earlier. After all, while Xen was giving developers and distribution users a hard time with the old kernel, a new virtualisation star was rising on the open source horizon: KVM (Kernel-based Virtual Machine). Its code became part of the Linux kernel in version 2.6.20. Unlike Xen, which puts itself between the hardware and the kernel, KVM makes the kernel itself the hypervisor – an approach that a number of kernel developers consider to be more elegant.
In the beginning, KVM could not touch the functional scope and speed of Xen. But soon, open source developers, Linux distributors, and companies such as AMD, Intel and IBM became interested in KVM and contributed a number of improvements, so that KVM quickly caught up and even moved past Xen in some respects. KVM's dependency on processors with virtualisation capabilities is no longer a problem, as nearly all server CPUs offer them these days.
KVM was knighted when Linux heavyweight Red Hat bought Qumranet and made KVM the virtualisation solution of choice. Red Hat Enterprise Linux (RHEL) 6 now uses only KVM for virtualisation and no longer includes Xen, which even in RHEL 5 was considered a major innovation. Other players showed a lot of interest in KVM as well: Suse Linux Enterprise (SLE) 11 has had KVM since the spring of 2010. A consortium recently set up by IT heavyweights is dedicated to the promotion of KVM – the group includes HP and IBM, which obviously prefer to use KVM when submitting results with the SPECvirt_sc2010 virtualisation benchmark. Furthermore, a new tool for virtualisation with KVM is currently being developed.
In contrast, the hype about Xen has died down, though that could change with Xen support in Qemu and the Linux kernel. Over the past two years, KVM has won over a lot of people and gained key positions by being integrated in RHEL and SLE. Time will tell whether Xen can make up the ground it has lost, but at the rate KVM is developing it seems more likely that KVM will become the most important hypervisor for server virtualisation with Linux hosts in the long run. Had Xen become part of the kernel five or six years ago, KVM may never have become so big and well known – certainly not as quickly.