VPS on Xen: PV and HVM modes, memory and compatibility
Xen is one of the oldest open-source hypervisors, developed by a project under the Linux Foundation. The commercial XenServer platform and the open XCP-ng are built on it, and for many years it was the foundation of large public clouds. Today there are fewer Xen plans than KVM ones, but they remain in the catalogues of hosts with long-standing infrastructure. For a buyer, the main thing is to understand which mode the machine runs in: that determines the OS choice, booting your own kernel and performance.
PV, HVM and PVH: three modes of one platform
- PV (paravirtualisation). The historical mode: the guest kernel knows it runs under Xen and talks to the hypervisor directly, without hardware emulation. It works only with operating systems that support this, which essentially means Linux and some BSDs. Windows is impossible in PV mode. The kernel is usually loaded by a bootloader on the host side (pygrub or similar), so an unusual disk layout or root encryption may not work.
- HVM (full virtualisation). The machine gets emulated hardware with CPU hardware assistance and boots like an ordinary computer. Windows, FreeBSD and installation from your own image are available here. To keep disks and network fast, Linux in HVM uses paravirtual drivers; this variant is often called PVHVM.
- PVH. A newer hybrid: no emulation of legacy hardware, but with CPU hardware assistance. It is safer and lighter than PV, but hosts offer it less often.
If a plan description just says "Xen", ask whether it is PV or HVM. Old PV plans still turn up, but the mode itself is considered outdated and is gradually giving way to PVH, and the Xen project no longer supports 32-bit PV guests.
What this means in practice
In any mode the machine has its own kernel. Docker, WireGuard for a private network between offices, your own swap, sysctl parameters and kernel modules work as on a dedicated server; in this respect Xen is in no way inferior to other hypervisors. The differences show in small details. Disks are named /dev/xvda rather than /dev/sda or /dev/vda, which is worth keeping in mind when moving configs and fstab. Networking goes through an interface on the xen-netfront driver. When moving to KVM, the disk image usually needs preparing: check that the initramfs contains virtio drivers, and fix the device names.
For Windows only HVM works, with Xen PV drivers for disks and network installed; without them the system runs noticeably slower. More about versions and licences is on the VPS with Windows page. FreeBSD also needs HVM; see the VPS with FreeBSD selection of plans.
Memory and resources: a reputation as an "honest" platform
Xen has earned a reputation as a platform where memory is allocated strictly: the machine is given a set amount, and the host can't quietly hand out more than the server physically has, as often happened with containers. Xen does have a balloon mechanism that can take memory back on the fly, but on customer plans it is not usually used for overselling. Checking the amount is simple: free -m right after boot and under load should show the same figure.
With the CPU the picture is the usual one: virtual cores are shared between customers, and Xen doesn't change that. Neighbours' load shows up in the steal column in top or vmstat 1. If steal is consistently above a few per cent, the server is overloaded, and it is worth asking support to move you to another node or changing plans. Nested virtualisation is formally supported in Xen, but in practice hosts almost never enable it.
How to check that a plan really runs on Xen
The systemd-detect-virt command prints xen, and cat /sys/hypervisor/type also gives xen. On recent kernels the mode is shown by the /sys/hypervisor/guest_type file (PV, HVM or PVH); on older ones dmesg | grep -i xen will tell you: in PV mode it contains a line about booting a paravirtualised kernel. Disk names like xvd* are another reliable sign.
When to choose Xen
Xen makes sense if you already work with XenServer or XCP-ng and want a compatible machine format, if you need Windows on HVM at a host with proven infrastructure, or if strictly allocated memory without "stretchy" limits matters to you. For new Linux projects without special requirements, the choice is wider among KVM plans: they more often offer custom ISOs, modern CPU models and snapshots from the panel.