Linux PVH

From Xen
Revision as of 14:36, 14 May 2018 by Rogerpau (talk | contribs)

PVH and Linux

The only things needed to make this work as PVH are:

  • Get the latest version of Xen (4.10 at least) and compile/install it. See [1]for details
  • Get the latest version of Linux (or a reasonable recent one, at least 4.11 is required), see [2] for details. The steps are:
cd $HOME
git clone git://
cd linux
  • Compile with CONFIG_XEN_PVH=y:
    • Based on your current distro.
 cp /boot/config-`uname -r `$HOME/linux/.config
 make menuconfig

Where one will select Processor type and features ---> Linux guest support --->Support for running as a PVH guest

This entry requires Processor type and features ---> Linux guest support --->Xen PVHVM guest support to be set.

    • Or from scratch:
make localmodconfig

You should see: "Support for running as a PVH guest (XEN_PVH) [N/y]" In case you missed it:

make menuconfig

Processor type and features ---> Linux guest support ---> Xen guest support (selecting that will now show you): Support for running as a PVH guest

    • If you prefer to edit .config, these should be enabled:

You will also have to enable the block, network drivers, console, etc which are in different submenus.

  • Install it. Usually doing:
make modules_install && install

is suffice. It should generate the initramfs.cpio.gz and the kernel and stash them in /boot directory.

  • Launch it with type="pvh" in your guest config (for example):
extra="console=hvc0 earlyprintk=xen initcall_debug debug"
vif = [ 'mac=00:0F:4B:00:00:68' ]
vfb = [ 'vnc=1, vnclisten=,vncunused=1']

using 'xl'. Xend 'xm' does not have PVH support.

Items not supported by PVH

  • PCI pass through (as of Xen 4.10)

Items that have not been tested extensively or at all:

  • Running it in dom0 mode (as the patches for that are not yet in Linux upstream).

Things that are broken:

If you encounter errors, please email with the following (please note that the guest config has on_reboot="preserve", on_crash="preserve" - which you should have in your guest config to contain the memory of the guest):

  • xl dmesg
  • xl list
  • xenctx -s $HOME/linux/ -f -a -C <domain id>

(xenctx is sometimes found in /usr/lib/xen/bin/xenctx)

  • The console output from the guest
  • Anything else you can think off.


Stash away your vmlinux file (it is too big to send via email) - as we might need it later on.

That is it!

Thank you!