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 http://forums.freebsd.org/showthread.php?t=10268

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= \
  PV-args=’boot_verbose=1,vfs.root.mountfrom=ufs:/dev/xbd0s1a,vfs.root.mountfrom.options=rw,kern.hz=100′

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

http://linuxnet.ch/groups/linuxnet/wiki/51a8b/XenServer_HowTo_Convert_HVM_to_PV_RHELSuSE.html

set hw.clflush_disable=1

One Response to FreeBSD 8.2 i386 PV on XCP/XenServer

  1. rutledgefranklin66 說道:

    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 http://d2.ae/hool090645

發表迴響

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

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s

%d 位部落客按了讚: