Tuesday, July 14, 2009

Setup Solaris Nevada (build 117) PV DomU at Xen 3.4.1 Ubuntu 9.04 Dom0 via backport CS 19889 libfsimage: Support for zfs version 16

Actually, CS 19889 is in Xen 3.5 Unstable. However, attempt to install mentioned DomU at
Xen 3.5 Dom0 via standard pygrub profile:-

root@ServerXen341:/home/boris/nevada# cat snv117.install
name = 'Solaris117PV'
memory = '2048'
disk = [ 'phy:/dev/loop0,6:cdrom,r','phy:/dev/sdb3,0,w']
vif = [ 'bridge = eth1' ]
bootloader = '/usr/local/bin/pygrub'
kernel = '/boot/platform/i86xpv/kernel/amd64/unix'
ramdisk = '/boot/amd64/x86.miniroot'
extra = '/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom'
root@ServerXen341:/home/boris/nevada# xm create -c snv117.install

aborts with message cannot find kernel "/boot/platform/i86xpv/kernel/amd64/unix".
Place "raw" content of CS 19889 into file /usr/src/zfs16.patch1.
Next step :-

# cd /usr/src
# cp -R xen-3.4-testing.hg xen-3.4.1
# cd xen-3.4.1
# patch -p1 -s -i ../zfs16.patch1
# make clean
# make uninstall
# make install-xen
# make install-tools
# make install-stubdom

Modify corresponding Grub entry and reboot Xen Host.
Install SNV_117 DomU via profile above.
To be sure install would be OK use only primary partitions as image device
for SNV_117 DomU (ZFS) or the first one in extended partion on x86 architecture.
Symptom of wrong partition choice could be message shows up when attempt to load
via standard pygrub profile :-

NOTICE: zfs_parse_bootfs: error 2
Cannot mount root on rpool/57 fstype zfs

panic[cpu0]/thread=fffffffffbc60c20: vfs_mountroot: cannot mount root

fffffffffbc94a00 genunix:vfs_mountroot+350 ()
fffffffffbc94a30 genunix:main+f0 ()
fffffffffbc94a40 unix:_locore_start+80 ()

skipping system dump - no dump device configured