PV and PVH Guests

Paravirtualized (PV) and PVH guests use a direct interface to the Xen hypervisor rather than emulated hardware. This makes them fast and efficient, but requires a guest kernel with Xen support (which all modern Linux kernels include).

PVH is the recommended mode for new Linux guests on hardware that supports it. If your toolstack and kernel support PVH, prefer it over pure PV.

Creating a PVH guest

A guest is defined by a configuration file, typically placed in /etc/xen/. Here is a minimal PVH configuration:

type = "pvh"
name = "myguest"
memory = 512
vcpus = 2
kernel = "/boot/vmlinuz"
ramdisk = "/boot/initrd.img"
extra = "root=/dev/xvda1 ro console=hvc0"
disk = [ "phy:/dev/vg0/myguest,xvda,w" ]
vif = [ "bridge=xenbr0" ]

Save this as /etc/xen/myguest.cfg and start the guest:

xl create /etc/xen/myguest.cfg

Configuration reference

type

Set to pvh for PVH guests, or omit for PV (default when kernel is specified and no type is set).

name

A unique name for this guest.

memory

RAM allocated to the guest, in megabytes.

vcpus

Number of virtual CPUs.

kernel

Path to the guest kernel image on dom0.

ramdisk

Path to the initial ramdisk image (optional but usually needed).

extra

Kernel command line arguments.

disk

Disk devices. Format: "source,target,access". Common sources include physical devices (phy:) and file-backed images (file:).

vif

Virtual network interfaces. bridge= specifies the dom0 bridge to connect to.

See the xl.cfg(5) man page for the full list of configuration options.