PDA

View Full Version : Citrix Xenserver FreeBSD PV domU


hedon
July 8th, 2011, 11:57
Hi,

Have you copied your compiled kernel out of the vm (domU) to the XenServer Host Sytsem (dom0) and set the appropriate pv params?

I have just tried to paravirtualize a fresh FreeBSD 8.0 (i386) installation based on the info from Mike Kaganski and Gian Paolo in this thread, which works fine for me. Here is what I have done step-by-step:

* created a new VM via the "other install media" template
* installed FreeBSD from CD (virtual machine runs in HVM/emulated mode)
* compiled a new kernel:

root@freebsd-vm# cd /usr/src
root@freebsd-vm# make kernel KERNCONF=XEN

* copied the kernel to xenserver:

root@freebsd-vm# scp /boot/kernel/kernel <xenserver-ip>:/root

* edited /etc/fstab and changed all "ad0" to "xbd0" (which can be done in vi via ":%s/ad0/xbd0/g")
* edited /etc/ttys to include the line:

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

On the xenserver I have done:

* renamed the copied kernel:

root@xenserver# mkdir /boot/guest/
root@xenserver# mv /root/kernel /boot/guest/freebsd-8.2-xen-kernel

* set the bootmode from HVM to paravirtualized:

root@xenserver# xe vm-list (note the UUID of the freebsd vm)
root@xenserver# xe vm-param-set uuid=vm-uuid HVM-boot-policy=""

* set appropriate parameters:

root@xenserver# xe vm-param-set uuid=vm-uuid PV-kernel="/boot/guest/freebsd-8.2-xen-kernel"
root@xenserver# xe vm-param-set uuid=vm-uuid PV-args="boot_vervose=1,vfs.root.mountfrom=ufs:/dev/xbd0s1a,kern.hz=100"

And then rebooted the vm which comes up whithout trouble.

This article is from the Citrix forum: http://forums.citrix.com/thread.jspa?threadID=257379&start=15&tstart=0. I added only the path to the kernel.

gerasim
July 28th, 2011, 06:46
Good day Hedon...

i try to convert to PV freebsd 8.2 amd64 on xenserver... and then whole of compile and transfer option is complete i wasn't able to boot. then i make xe vm-param-set uuid=(vm-uuid) HVM-boot-policy="BIOS order" - vm will start normaly with new xenhvm kernel, but hard disk still use ad0 scheme but in dmesg it will be xbd0 attached as ad0. network in re0 turned to xn0.. how you boot it?

thanks

nbari
May 22nd, 2012, 11:20
In my case the mount point is like this:

boot_vervose=1,vfs.root.mountfrom=ufs:/dev/xbd0p2,kern.hz=100

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