XEN

Xen is an open-source, Type 1 hypervisor that runs directly on physical hardware, allowing multiple operating systems to share one machine while remaining isolated from one another.

Type 1 hypervisor Open-source virtualization x86 and Arm architectures

1. Overview & Architecture

Xen sits between the hardware and its virtual machines. Unlike a conventional hosted hypervisor, Xen does not run as an application inside a general-purpose desktop operating system. Its hypervisor layer handles CPU scheduling, memory isolation, and interrupts.

Xen uses the term domain for a running virtual machine or privileged control environment. A typical Xen system has a privileged control domain called Dom0, which manages hardware access and creates or controls guest domains called DomU.

Guest virtualization modes

PV (paravirtualization) uses Xen-aware guest interfaces. HVM (hardware virtual machine) uses processor virtualization support to run operating systems such as Windows. Modern Xen configurations can also use PVH, which combines hardware-assisted virtualization with a streamlined paravirtualized interface.

2. The Xen Ecosystem

Several related projects use the Xen hypervisor, but they serve different purposes.

Component Purpose
Xen Project The open-source project developing the Xen hypervisor.
XCP-ng A Xen-based virtualization platform for running and managing hosts and virtual machines.
XenServer A commercial Xen-based virtualization platform, formerly branded Citrix Hypervisor.
Xen Orchestra Web-based management, provisioning, monitoring, backup, and automation for XCP-ng and compatible XenServer environments.
XOSTOR Distributed shared storage for XCP-ng environments, built using LINSTOR and DRBD.

Important: Xen is the underlying hypervisor. XCP-ng and XenServer are complete platforms built around it; Xen Orchestra manages those platforms.

3. Installation

There are several ways to deploy Xen, depending on whether you want to study the hypervisor itself or operate a managed virtualization environment.

Xen on Linux

Install Xen and its toolstack through a supported Linux distribution. This is useful for learning Dom0, DomU, the xl toolstack, and the underlying architecture.

XCP-ng

Install a dedicated virtualization platform and manage hosts, pools, and virtual machines through supported management tools such as Xen Orchestra.

XenServer

Use the commercial Xen-based platform when its supported deployment, management, and vendor features fit the environment.

Before installation, check processor virtualization support, hardware compatibility, storage configuration, network interfaces, and the installation guide for your chosen distribution or platform.

4. Virtual Machine Administration

On a traditional Xen installation using the xl toolstack, the following commands provide a starting point:

Command Purpose
xl list List running domains.
xl info Display host and Xen hypervisor information.
xl create vm.cfg Create a domain from a configuration file.
xl console <domain> Connect to a guest console.
xl shutdown <domain> Request a graceful guest shutdown.

These are Xen xl examples, not Xen Orchestra or XCP-ng management commands. Availability and behavior depend on the installed Xen toolstack and guest configuration.

5. Networking

Xen guests connect through virtual network interfaces. Depending on the platform, those interfaces can connect to Linux bridges, Open vSwitch, VLAN-backed networks, or other supported virtual networking configurations.

  • Virtual interfaces: provide connectivity to individual guests.
  • Bridges and virtual switches: connect guests and physical networks.
  • VLANs: separate management, guest, and storage traffic.
  • Physical NICs: connect the host to external networks.

6. Storage

Xen-based systems can use local disks or shared storage. The exact options depend on the Xen platform and storage toolstack.

Storage option Typical use
Local storage VM disks stored on an individual host.
NFS Shared file storage provided by a NAS or storage server.
iSCSI Network-accessible block storage.
XOSTOR Distributed shared storage in supported XCP-ng environments.

Shared storage is often important for migration and high-availability designs, but storage alone does not provide high availability.

7. Administration & Troubleshooting

When diagnosing Xen problems, determine whether the issue is in the hypervisor, control domain, guest, network, or storage.

  • Host state: check Xen, CPU, and memory.
  • Domain state: inspect VM status and configuration.
  • Logs: review Xen, toolstack, system, and guest logs.
  • Networking: inspect bridges, VLANs, and interfaces.
  • Storage: check disks, NFS exports, and iSCSI targets.

For XCP-ng and XenServer, use their documented platform-specific diagnostics rather than assuming all xl procedures apply unchanged.

8. Official Resources