Got it

Comparison of KVM and XEN Technologies Highlighted

Latest reply: Aug 16, 2022 12:49:35 3653 40 26 0 0

Hello, everyone!

Virtualization technology is one of the most important technologies in the cloud computing system. With virtualization technology, hardware resources can be flexibly controlled in cloud computing. In this paper, virtualization technology is briefly introduced. The virtualization of hardware resources is mainly focused on the most complex and important CPU virtualization. Finally, this article introduces two popular virtualization technologies, KVM and XEN, and briefly outlines their differences.

Introduction to the KVM 

KVM is a kernel-based virtual machine. KVM is a hypervisor integrated into the Linux kernel. It is a full virtualization solution for Linux that uses the x86 architecture and supports virtualization technologies (Intel VT or AMD-V). It is a small module of Linux and uses Linux to do a lot of things, such as task scheduling, memory management, and interaction with hardware devices.


Kernel-based Virtual Machine (KVM) is a kernel-based virtual machine (VM). It was originally an open-source project developed by Qumranet. In 2008, Qumranet was acquired by Red Hat. However, KVM itself is still an open-source project supported by Red Hat and IBM.

Similar to XEN, KVM supports a wide range of CPU architectures. In addition to the x86/x86_64 CPU architecture, KVM also supports mainframe (S/390), midrange computers (PowerPC and IA64), and ARM.

The KVM makes full use of the hardware-assisted virtualization capability of the CPU and reuses many functions of the Linux kernel, making the KVM itself very thin. Avi Ktivity, the founder of the KVM, claims that the KVM module has only about 10,000 lines of code. However, we cannot think that the KVM hypervisor is the same amount of code. Strictly speaking, the KVM itself is not a hypervisor. It is only a loadable module in the Linux kernel. The function of the KVM is to convert the Linux kernel into a bare-metal hypervisor.

The Linux kernel is transformed into a hypervisor by loading the KVM module. The KVM adds the guest mode to the user mode and kernel mode of the Linux kernel. Linux runs in kernel mode, host processes run in user mode, and VMs run in guest mode. In this way, the Linux kernel can manage and schedule host processes and VMs in a unified manner, which is the origin of the KVM name.

KVM is used to simulate CPU operation but lacks support for network and I/O. The QEMU-KVM is a complete simulator based on the KVM and provides complete network and I/O support. OpenStack does not directly control QEMU-KVM, but indirectly controls QEMU-KVM through the libvit library.

The KVM uses the modified QEMU to emulate the BIOS, graphics card, network, and disk controller. However, the performance of the I/O devices (mainly network adapters and disk controllers) is poor. Therefore, the KVM also introduces a paravirtualition device driver. The virtual driver in the VM operating system works with the physical driver in the host Linux kernel to provide performance similar to that of the native device. It can be seen that the physical device supported by the KVM is also the physical device supported by the Linux operating system.

Introduction to the XEN

XEN is the first type of hypervisor to run on bare metal. It supports full virtualization and paravirtualization. XEN supports communication between hypervisors and VMs and provides free products on all Linux versions, including Red Hat Enterprise Linux and SUSE Linux Enterprise Server. The most important advantage of XEN is paravirtualization. In addition, an unmodified operating system (such as Windows) can run on XEN, allowing VMs to run effectively without emulation. Therefore, VMs can sense the hypervisor and do not need to emulate virtual hardware, achieving high performance.


XEN was originally an open-source research project of XenSource at Cambridge University. The first version of Xen 1.0 was released in September 2003. In 2007, XenSource was acquired by Citrix and the open-source Xen was transferred to Members of the organization include individuals and companies (e.g., Citrix, Oracle, etc.). The organization released version XEN 4.1 in March 2011. 

Compared with ESX and Hyper-V, Xen supports more CPU architectures. Xen supports only CISC x86/X86_64 CPU architectures. Xen also supports RISC CPU architectures, such as IA64 and ARM. 

The XEN hypervisor is the first program that is loaded to the server after being booted from the BIOS and then starts a VM with specific permissions, called Domain 0 (Dom 0 for short). The operating system of Dom 0 can be Linux or Unix. Domain 0 controls and manages the Hypervisor. Dom 0 is the only VM that can directly access physical hardware (such as storage devices and NICs). It provides a bridge for other VMs (Dom U, Dom U for short) to access storage devices and NICs by using the physical driver loaded by Dom 0. 

XEN supports two types of VMs: paravirtualization (PV) and full virtualization (HVM). Paravirtualization requires operating systems with specific kernels, such as the Linux kernel based on the Linux paravirt_ops framework (a set of compilation options for the Linux kernel). However, the Windows operating system cannot be supported by XEN paravirtualization due to its closed nature. Xen's paravirtualization is unique in that it does not require hardware-assisted virtualization on CPUs, which is ideal for legacy server virtualization before 2007. Full virtualization supports native OSs, especially Windows OSs. Full virtualization of Xen requires hardware-assisted virtualization of CPUs. The modified QEMU emulates all hardware, including the BIOS, IDE controller, VGA video card, USB controller, and NIC. To improve I/O performance, full virtualization uses paravirtualization devices for disks and NICs to replace emulation devices. These device drivers are called PV on HVMs to ensure optimal PV on HVM performance. The CPU should have MMU hardware-assisted virtualization. 

The Hypervisor layer of XEN is very thin, with less than 150,000 lines of code, and does not contain any physical device drivers, which is similar to Hyper-V. The physical device drivers reside in Dom 0 and can reuse existing Linux device drivers. Therefore, XEN is also very broad in hardware compatibility, and Linux supports it.


KVM Advantages 

The KVM is a part of the Linux kernel. The KVM is deployed in the Linux kernel and can easily control the virtualization process. The KVM is more flexible. Because the operating system directly interacts with the hypervisor integrated into the Linux kernel, it can directly interact with the hardware in any scenario without modifying the virtualized operating system. KVM, with the support of Ret Hat, will make KVM, a latecomer of virtualization technology, as full-featured as Xen. 

KVM Disadvantages 

KVM is not as mature as Xen technology and lacks some key features such as live migration and pan-virtualization support.

XEN Advantages 

Resources available: XEN predates KVM by four years (2003 and 2007 respectively). It's easier to find XEN-savvy IT technicians, get XEN-related training, get Xen consulting help, and get Xen certificates. Platform support: XEN supports more host and object working environments in the new release, including pan-virtualization technology, hardware-assisted support, and modified or unmodified object operating systems.

Manageability: XEN has a broader community of third-party provisioning, backup, storage management, P2V, capacity planning, performance monitoring, process automation, security, and other management rules. 

Implementation: XEN runs and manages at a lower level (Ring 0). For new virtual machine creation, the guest machine does not need to share memory blocks, CPU instructions, or any underlying Linux operating system, as KVM does (although occasionally unauthorized). Support for live migration: Xen supports non-disruptive live migration, allowing dynamic workload balancing and routine maintenance with virtually no downtime. 

Performance: XEN has better processing performance (close to local processing). The number of guest VMs increases linearly, and more than 30 workloads can run concurrently.

Disadvantages of XEN 

XEN is a product installed under the Linux kernel. The patch package of the operating environment is incompatible with the Linux kernel. The XEN OS needs to be modified to use the pan-virtualization technology. The default Windows installation does not support the pan-virtualization working environment. The failure of XEN to integrate well with the Linux kernel will make the Linux kernel more and more burdensome.

That's all, thanks!

The post is synchronized to: Surprising Cloud Computing

  • x
  • convention:

Created Sep 16, 2021 06:20:56

Thanks for your sharing!
View more
  • x
  • convention:

olive.zhao Created Sep 30, 2021 03:17:43 (0) (0)
Thanks friend!  
Created Sep 22, 2021 16:26:28

Good share
View more
  • x
  • convention:

olive.zhao Created Sep 30, 2021 03:17:48 (0) (0)
Created Sep 30, 2021 10:20:22

Great share.
View more
  • x
  • convention:

Created Oct 1, 2021 02:11:51

Quite the overview of both technologies.
View more
  • x
  • convention:

Chanbora Created Oct 22, 2021 07:03:48 (0) (0)
Created Oct 1, 2021 15:28:42

Thanks for the info.
View more
  • x
  • convention:

MVE Author Created Oct 1, 2021 18:16:57

The Second post I want to recommend Comparison of KVM and XEN Technologies as author shares two popular virtualization technologies, KVM and XEN, and briefly outlines their differences also pros & cons.
View more
  • x
  • convention:

olive.zhao Created Oct 12, 2021 01:18:12 (0) (0)
Thanks for your support, friend!  
MahMush Created Oct 17, 2021 10:36:54 (0) (0)
yes it is  
Chanbora Created Oct 22, 2021 07:03:43 (0) (0)
MVE Author Created Oct 2, 2021 07:55:30

useful info
View more
  • x
  • convention:

MVE Created Oct 4, 2021 20:33:57

I really appreciate that, thanks a bunch
View more
  • x
  • convention:

olive.zhao Created Oct 12, 2021 01:18:23 (0) (0)
HCIE MVE Created Oct 6, 2021 15:09:29

Very Good

View more
  • x
  • convention:

Back to list


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.