Sunday, December 07, 2008


Install SNV103 PV DomU with ZFS image at Xen 3.3.1. openSUSE 11.1 Dom0 (all 64-bit)


During installation phase we would have to drop to shell and undertake some special actions to prepare runtime profile.Pygrub won't be able to load DomU utilizing ZFS based image. In particular, ZFS-ID of boot environment will be ontained to compose extra line in runtime profile.


Start install as usual via profile :-

name = 'Solaris103PV'
memory = '2048'
disk = [ 'file:/home/boris/snv103.iso,6:cdrom,r','phy:/dev/sdb12,0,w']
vif = [ 'bridge = br1' ]
bootloader = '/usr/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'

Select ZFS on image device and request manual reboot. At the end of package deployment phase drop to shell at DomU and run

# bootadm update-archive -R /a

Copy kernel and boot_archive off the image to Dom0

# /a/usr/bin/scp -S /a/usr/bin/ssh \
/a/platform/i86xpv/kernel/amd64/unix \
192.168.1.33:/etc/xen/nevada
# /a/usr/bin/scp -S /a/usr/bin/ssh \
/a/platform/i86pc/amd64/boot_archive \
192.168.1.33:/etc/xen/nevada

Get the ZFS-ID of the /ROOT/snv_103 zpool. First, find out the pool_guid.
Follow [1]:-

# zpool get guid rpool
# NAME PROPERTY VALUE SOURCE
rpool guid 17306096753167233998

************
Then run :-
************

bash-3.2# zdb -d -e 17306096753167233998
Dataset mos [META], ID 0, cr_txg 4, 1.74M, 131 objects
Dataset 17306096753167233998/swap [ZVOL], ID 37, cr_txg 15, 4.27M, 3 objects
Dataset 17306096753167233998/ROOT/snv_103 [ZPL], ID 57, cr_txg 31, 5.99G, 286127 objects
Dataset 17306096753167233998/ROOT [ZPL], ID 31, cr_txg 12, 18.0K, 4 objects
Dataset 17306096753167233998/dump [ZVOL], ID 43, cr_txg 18, 1.00G, 3 objects
Dataset 17306096753167233998/export/home [ZPL], ID 69, cr_txg 43, 18.0K, 4 objects
Dataset 17306096753167233998/export [ZPL], ID 63, cr_txg 40, 19.0K, 5 objects
Dataset 17306096753167233998 [ZPL], ID 16, cr_txg 1, 29.0K, 12 objects
# umount /a

******************************************************
Destroy DomU via "xm" and create runtime profile:-
******************************************************
name = "SNV103PV"
vcpus = 1
memory = "2048"
kernel = "/etc/xen/nevada/unix"
ramdisk = "/etc/xen/nevada/boot_archive"
extra = "/platform/i86xpv/kernel/amd64/unix - nowin -B bootpath=/xpvd/xdf@0:a -B console=xen -B zfs-bootfs=rpool/57"
disk = ['phy:/dev/sdb12,0,w']
vif = [ 'bridge=br1']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
*************
Then run :-
*************

dhcppc0:/etc/xen/vm # uname -a
Linux dhcppc0 2.6.27.7-4-xen #1 SMP 2008-11-25 00:02:37 +0100 x86_64 x86_64 x86_64 GNU/Linux
dhcppc0:/etc/xen/vm # xm info|grep xen_
xen_major : 3
xen_minor : 3
xen_extra : .1_18494_03-1.2
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
xen_changeset : 18494
dhcppc0:/etc/xen/vm # xm create -c snv103zfs.run
Using config file "./snv103zfs.run".
Started domain SNV103PV
v3.3.1_18494_03-1.2 chgset '18494'
SunOS Release 5.11 Version snv_103 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: dhcppc5
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)
syslogd: line 45: WARNING: loghost could not be resolved

dhcppc5 console login: root
Password:
Last login: Sun Dec 7 19:57:19 on console
Dec 8 05:17:46 dhcppc5 login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_103 November 2008
# bash
bash-3.2# df -h
Filesystem size used avail capacity Mounted on
rpool/ROOT/snv_103 15G 5.9G 7.1G 46% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 2.2G 424K 2.2G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap3.so.1
13G 5.9G 7.1G 46% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 2.2G 40K 2.2G 1% /tmp
swap 2.2G 44K 2.2G 1% /var/run
rpool/export 15G 19K 7.1G 1% /export
rpool/export/home 15G 15M 7.1G 1% /export/home
rpool 15G 29K 7.1G 1% /rpool
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=201004843 mtu 1500 index 2
inet 192.168.1.38 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:42:f9:9
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128













References
1.Installing Opensolaris 2008.11 RC2 on a Linux (RedHat/Centos) dom0