Thursday, May 07, 2009


Backport ZFS support to Xen 3.3.1 F10 Dom0 (kernel 2.6.30-rc3-tip)


Fedora 11 Xen hypervisor package contains pv_ops dom0 kernel support, ie. it is able to boot bzImage format dom0 kernels, and pv_ops sysfs memory ballooning support is included as well. These features/patches are backported from Xen 3.4 development/unstable version to Fedora's Xen 3.3.x.Our target is to add two more change sets from Xen Unstable as patches to F11's xen-3.3.1-11.fc11.src.rpm to provide Xen Dom0 support for OpenSolaris and Nevada Guest with images utilizing the most recent Sun's ZFS.Actually, we need following CS (19323,19322) to be backported to Xen 3.3.1:-

xen-backport-hg19322.patch (pygrub: Workaround for Solaris CR 1143256)
xen-backport-hg19323.patch (libfsimage: Support for zfs version 14.)

Xen-3.3.1-11.fc11.src.rpm may be rebuilt on F10 with the most recent F10's updates installed. Obtained set of RPMS allow to install Xen 3.3.1 Hypervisor on F10,having same features as on F11.
Corresponding files contain raw data from change sets have to be placed in
/root/rpmbuild/SOURCES and /root/rpmbuild/SPECS/xen.spec file has to be
modified accordingly to process those patches. Now proceed as follows:-

# yum update
yum install transfig texi2html libaio-devel dev86 glibc-devel.i386
# rpm -iv xen-3.3.1-11.fc11.src.rpm

Make changes as mentioned above.

# cd /root/rpmbuild/SPECS
# rpmbuild -ba ./xen.spec
# cd ../RPMS/x86_64
# yum install xen-debuginfo-3.3.1-11.fc10.x86_64.rpm \
xen-devel-3.3.1-11.fc10.x86_64.rpm \
xen-hypervisor-3.3.1-11.fc10.x86_64.rpm \
xen-libs-3.3.1-11.fc10.x86_64.rpm \
xen-runtime-3.3.1-11.fc10.x86_64.rpm \
xen-3.3.1-11.fc10.x86_64.rpm

Now install libvirt packages required :-

# yum install libvirt libvirt-python python-virtinst \
virt-manager virt-viewer

Build the most recent pvops enabled kernel:-

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# git checkout origin/xen-tip/next -b xen-tip/next

Tune kernel to support Xen in Dom0 ([1])

# make menuconfig
# make
# make modules_install install

Create a grub entry:-

title Xen 3.3.1 Fedora 10 (2.6.30-rc3-tip)
root (hd0,4)
kernel /xen-3.3.gz
module /vmlinuz-2.6.30-rc3-tip ro root=/dev/VolGroup01/LogVol00 console=tty0
module /initrd-2.6.30-rc3-tip.img

Edit /etc/inittab :

id:3:initdefault:

Enable services xend,xenconsoled,xenstored,libvirtd
and reboot into Xen Host.