Get started Bring yourself up to speed with our introductory content.

Questions to ask before choosing an open source hypervisor

The vSphere vs. Hyper-V debate overshadows Xen vs. KVM, but open source hypervisor comparison requires the same deliberation.

When you opt for an open source hypervisor, you ultimately have two choices: Xen or KVM. The former is the foundation of Citrix XenServer and Oracle VM, while the latter is the foundation of Red Hat and Canonical [Ubuntu]. Xen has always worked well on Linux platforms, but until 2011, it was not included in the kernel and users needed to apply a significant kernel patch and do some configuration in addition to the core Linux distributions to make it work. In contrast, KVM have been included in the Linux kernel since 2007. Though Xen is the more established hypervisor, industry experts admit KVM has made great strides to match the technology.

Not sure which is right for your data center? These FAQs should provide you with the knowledge to make an informed decision.

Are Xen and KVM the same type of hypervisor?

No. Xen is an open source virtual machine monitor for x86-compatible computers, and the KVM hypervisor is the virtualization layer in KVM. Xen is classified as a type-1 hypervisor because it has its own kernel, and KVM is classified as a type-2 hypervisor because it uses the kernel of another host operating system. Xen uses its own kernel for thread scheduling and dispatching virtual machines, while KVM, accepted into mainline Linux kernel sources, uses that kernel for these operations.

Are there features available in Xen that are not available in KVM and vice versa?

Xen offers key application programming interfaces, application binary interfaces and supports Distributed Management Task Force interfaces. It also offers live migration and supports shared storage, both of which enable server consolidation. KVM did not always support live migration, but the latest version of the hypervisor does provide this capability.

Read more on the Xen vs. KVM debtae

Xen, KVM and the free hypervisor market

Migrating VMs from Xen to KVM

Putting the Linux Virtual Machine Manager to use

Perhaps the biggest advantage Xen has over KVM is native paravirtualization, which enables VMs [virtual machines] to run efficiently without requiring emulation. Guests are thus aware of the hypervisor and can run efficiently without emulation or virtual-emulated hardware. Without paravirtualization, the KVM hypervisor has to emulate instructions that are generated by KVM virtual machines. To use paravirtualization, however, you need a modified OS. A default Windows installation does not work in a paravirtualization environment.

What are some pros and cons of each hypervisor?

Both hypervisors have benefits and drawbacks. KVM is generally considered easier to configure and operate given it is just a single module that you load in the Linux kernel. Once the module is loaded, you can create virtual machines. KVM's simple structure also appeals to admins who manage patches in enterprise Linux servers.

Xen, however, has a broader third-party ecosystem for provisioning, backup, storage management, P2V, capacity planning, performance monitoring, process automation and security from Citrix, Microsoft and VMware, among others. With KVM, guests share memory blocks, CPU instructions and the underlying Linux OS, which means KVM suffers performance, latency, security, scalability and isolation issues that do not affect a true bare-metal hypervisor like Xen.

Most Xen vs. KVM performance benchmarks show Xen has better processing performance, but KVM outperforms Xen in disk I/O.

Dig Deeper on Open source virtualization

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

This article is surprisingly inaccurate

First paragraph:
Xen is not in the Linux kernel.
The Xen Hypervisor is a separate project, it has some enabling hooks in the kernel but it is not part of Linux.
I'm curious as to what KVM has to do to 'match the technology' of Xen?

Fourth paragraph
The first section seems to infer that KVM doesn't offer APIs, where it does.

KVM has _ALWAYS_ offered live migration and has consistently led Xen in terms of features - storage live migration, etc.

Fifth paragraph.
KVM includes paravirtualization for all devices except CPU and Memory which are handled by the CPU. KVM significantly outperforms Xen, I suggest you check for Xen benchmarks (you'll find very few and none winning) Check SPECvirt for some examples
Xen, by the way, doesn't require paravirtualization so the last point is moot.

The last two paragraphs are very wrong. Perhaps it was written over 5 years ago?
Please can you cite sources for the performance differences, I think you'll find that KVM outperforms Xen every day of the week.