FreeBSD 8.2 i386 PV on XCP/XenServer

For now, there is no XVA image/template for FreeBSD. So, you must install a HVM based FreeBSD first.

In your FreeBSD HVM, create a bootable Xen domU kernel from source or get one from here

cd /usr/src
make KERNCONF=XEN buildkernel
make KERNCONF=XEN installkernel

Once you get the kernel, place the kernel in your XCP/XenServer Host.
scp /boot/kernel/kernel ${XCP_HOST}:/boot/guest/freebsd-domU

Remember this: For security concern, your guest OS kernel must place under /boot/guest/

Then, you have to rewrite /etc/fstab, to change /dev/ad1s1__ to /dev/xbd0s__
and add the line
xc0     ‘/usr/libexec/getty Pc’ vt100   on      secure
to /etc/ttys

Of course, you have to change your FreeBSD vbd position from 1 to 0(because we use xbd0 not xbd1)

Final step:
xe vm-param-clear uuid=${FreeBSD_HVM_UUID} param-name=HVM-boot-params
xe vm-param-set uuid=${FreeBSD_HVM_UUID} \
  HVM-boot-policy= \
  PV-kernel=’/boot/guest/freebsd-domU’ \
  PV-bootloader-args= \
  PV-bootloader= \

Tip for amd64: If you are using FreeBSD amd64, at present time( FreeBSD 8.2 Release ), there is no PV version AMD64, but there is PV driver on HVM in amd64 kernel.
Just do these two command under your /usr/src, and you should get it work easy
make KERNCONF=XENHVM buildkernel
make KERNCONF=XENHVM installkernel

Before you do this, you should take a snpshot and backup your HVM parameter

xe vm-param-list uuid=${FreeBSD_HVM_UUID} | grep HVM

HVM-boot-policy ( RW): BIOS order
HVM-boot-params (MRW): order: dc
HVM-shadow-multiplier ( RW): 1.000

Reference for changing HVM to PV

set hw.clflush_disable=1


One Response to FreeBSD 8.2 i386 PV on XCP/XenServer

  1. Although it kinda gives you a warm fuzzy feeling, i dont think too many existing Transperth customers will take the Google road. The existing system w Click


在下方填入你的資料或按右方圖示以社群網站登入: Logo

您的留言將使用 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )


連結到 %s

%d 位部落客按了讚: