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¶
typeSet to
pvhfor PVH guests, or omit for PV (default whenkernelis specified and notypeis set).nameA unique name for this guest.
memoryRAM allocated to the guest, in megabytes.
vcpusNumber of virtual CPUs.
kernelPath to the guest kernel image on dom0.
ramdiskPath to the initial ramdisk image (optional but usually needed).
extraKernel command line arguments.
diskDisk devices. Format:
"source,target,access". Common sources include physical devices (phy:) and file-backed images (file:).vifVirtual network interfaces.
bridge=specifies the dom0 bridge to connect to.
See the xl.cfg(5) man page for the full list of configuration options.