Xen, like VMware ESXi, is an hypervisor, that is, a software that allows to run several virtual machines -even with different operating systems, at the same time on the same hardware, sharing resources with the aim op optimizing costs and the management of the IT infrastructure. Given its nature, it’s often compared with concurrent platform by Microsoft (Hyper-V) and VMware (vSphere/ESXi), and in this article we are going to cover its characteristic.
A little bit of history
The Xen virtualization project was born in 2003 at the University of Cambridge as a research project. Within a few time XenSource was founded, before being acquired by Citrix in 2007, which keeps a free version but starts to develop a paid version. The project is backed by big players of the market like Intel, AMD, Cisco, Amazon, Google, Oracle, Samsung and Verizon.
In 2013 Xen became part of the Linux Foundation, and Citrix adopted an opensource licensing for its own XenServer product, then at version 6.2. The paid version, which included support and additional maintenance services, still remains.
Nowadays Citrix XenServer is at version 7.1 (corresponding to version 4.7.1 of the original Xen hypervisor) and is being used to provide virtual private servers (VPS) on platforms such as Amazon EC2, IBM Softlayer, Linode and Rackspace Cloud. It’s important to distinguish between the opensource XenServer project (available at https://xenserver.org) and Citrix XenServer (available as “standard” and “enterprise” versions), which requires a license to obtain support and maintenance. The premium version also offers additional features like SMB storage, dynamic workload balance, GPU virtualization with NVIDIA GRID and Intel GVT-g and conversion tool for VMware vSphere. The opensource version on the other hand has a support being provided by the community of users and developers, forums and mailing lists, where Citrix developers often post.
Characteristics
One of the key concepts of Xen is domain: “Domain 0” (Dom0) is the software portion that starts together with the server: in other words, an operating system with direct access to the underlying hardware that provides services to hosted machines and an admin management interface. In practice, Dom0 is a “specialized” Linux version that doesn’t just acts as a hypervisor, but also remains accessible for all management operations. Hosted VMs are active within a DomU (that U stands for Unprivileged) and must request Dom0 the access to hardware resources: Dom0 will translate or emulate such requests depending on their nature.
Xen supports several virtualization modes: the most performing one is HVM (Hardware Virtual Machine), which is a real full emulation of a computer complete of processor, graphic card, disk controller, network interfaces and so forth. HVM virtualization is for sure the most flexible, yet it penalizes performances of VMs, for every operation must be simulated via software. As an alternative mode, the Paravirtualization (PV) technology was introduced by Xen, before being adopted by other platforms like KVM. PV provides better performances but requires a better communication between the hypervisor and the host server, which consists in a modified kernel and special drivers (XenTools) that allows to translate I/O requests directly without having to rely upon any emulation layer.
There are hybrid, alternative virtualization solutions halfway between HVM and PV like HVM with PV drivers mode, which requires hardware assisted virtualization (Intel VT-x and AMD-V instructions) to manage CPU and memory, while network and storage accesses continue to be emulated. This is often the winning choice with modern processors because it offers a greater flexibility with an almost imperceptible I/O performance degradation, in the order of 5-10% than paravirtualization.
One of the points of strength of Xen lies in the capability of leveraging the so-called GPU Pass-through, which enables hardware graphic acceleration inside virtual machines by virtualizing the access to the graphic subsystem. Indeed Citrix is the leading platform when it comes to virtualization of graphic desktops, VDI and CAD/CAM systems, also thanks to the integration with technologies like XenApp and XenDesktop.
As the other virtualization platforms, Xen allows both hot (ie with powered-on VMs) and cold virtual machine migration: this technique is called XenMotion or Storage XenMotion, depending on whether the destination and source hosts are on the same resource pool or not. This operation requires shared storage (iSCSI or Fibre Channel), a (at least) Gigabit network and -in the case of live migration- that both hardware platforms be as similar as possible, in particular in terms of CPU (brand and family). According to lab tests, user annoyance during a live migration is explicated in a few milliseconds latency.
As a direct consequence of live migration, Xen allows to implement high availability thanks to the Host Failure Protection service: in case of a hardware fault, the VM is automatically migrated to another physical host within the same pool. In a similar manner, the enterprise version of Xen allows an automated load balancing of physical hosts by migrating VMs once certain thresholds are reached, just like VMware’s DRS. Moreover, an energetic saving policy can be set to minimize the number of powered-on VMs as working conditions change. The commercial version also offers XenServer Conversion Manager, a tool for the automatization of the import of entire vSphere farms.
XenServer too, like its competitors, can perform snapshots and clones of VMs in a quick and intuitive manner. Citrix offers a complete SDK with libraries for several languages (C, C#, Python and PowerShell), a Driver Development Kit and a command line tool (accessible from Dom0 with the xe command) which can be used to automate every operation: from the creation of VMs to their backup and the configuration of a new SR (Storage Repository).
Citrix provides 5 year of commercial and technical support for each XenServer version; the actual 7.1 version therefore will be supported until May 2022.
In the next issue we will continue our analysis of Xen with a practical guide on how to install it and start to use it.