FreeBSD PVH

From Xen
Jump to navigationJump to search

This guide explains how to set up a FreeBSD PVH guest. The usage of PVH requires an Intel chip with EPT support.

This guide assumes that the user already has a working FreeBSD HVM amd64 guest installed, based on HEAD, and a Xen install using -unstable with a revision greater than b5dda35f5aa3ab5c7be2333a8a4e0cfa34226654.

Moving from PVHVM to PVH

Copy the FreeBSD kernel from /boot/kernel/kernel to your Dom0.

Add the following lines to /etc/ttys:

xc0 	"/usr/libexec/getty Pc"         xterm   on  secure

And /etc/fstab should also be modified in order to use xbd devices:

# Device	Mountpoint	FStype	Options	Dump	Pass#
/dev/xbd0p2	/		ufs	rw	1	1
/dev/xbd0p3	none		swap	sw	0	0

Now the FreeBSD HVM guest can be stopped, and we need to modify the configuration file so it looks like:

kernel = "/path/to/kernel"
extra="vfs.root.mountfrom=ufs:/dev/xbd0p2"

disk = [
	'phy:/path/to/block/device,xvda,w',
	]

vif = ['bridge=bridge0,mac=00:ff:ff:ff:ff:ff']

memory=4096
vcpus=2
name = "freebsd_pvh"

pvh=1

The main changes are the removal of the builder option, and the addition of kernel and extra instead. Also note the option pvh=1 must be set in order to boot in PVH mode. Then we can boot into the newly created FreeBSD PVH guest:

# xl create -c freebsd_pvh.cfg