FreeBSD PVH: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
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. |
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. |
|||
In order to compile a FreeBSD PVH capable kernel, we need to fetch the sources first (this should be done inside of the existing FreeBSD guest): |
|||
⚫ | |||
<pre> |
|||
# git clone git://xenbits.xen.org/people/royger/freebsd.git /usr/src |
|||
# cd /usr/src |
|||
# git checkout pvh_v10 |
|||
</pre> |
|||
Note that at time of writing the most recent branch is pvh_v10 (this can change, so always look for the latest branch). |
|||
Now we can start the kernel compile process as usual: |
|||
<pre> |
|||
# cd /usr/src |
|||
# make kernel-toolchain |
|||
# make buildkernel |
|||
</pre> |
|||
Then, we need to copy the resulting /usr/obj/usr/src/sys/GENERIC/kernel kernel to the Dom0. |
|||
⚫ | |||
<pre> |
<pre> |
||
Line 30: | Line 12: | ||
</pre> |
</pre> |
||
And /etc/fstab should also be modified |
And /etc/fstab should also be modified in order to use xbd devices: |
||
<pre> |
<pre> |
Latest revision as of 14:40, 22 October 2014
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