Friday, July 31, 2009


Screen shots




























LIBVIRT 0.7.0.6























Jaunty HVM and PV DomUs running at a time at Xen 3.4.1 Dom0(2.6.29.6 xenified aka Suse kernel)





Vinagre connection from F11 Gnome Desktop to Jaunty PV DomU








Remote VNC to Dom0 with PVOPS













Sunday, July 19, 2009


Disabling checksum offloading at install OSOL 2009.06 PV DomU on Xen 3.4.1 Ubuntu 9.04 Dom0 ( with 2.6.30.1 xenified aka Suse kernel)


Regardless bug with failure checksum offloading was fixed in SNV_81 , i.e. a while ago.
OpenSolaris 2009.06 PV DomU install at Xen 3.4.1 Linux Dom0 appears still to be affected. Wrong checksum may be easily captured via tcpdump on the LAN due to DHCPDISCOVER
request issued by OSOL installer is a broadcast request. Following bellow procedure
involves Solaris Kernel module debugger to patch OSOL's (SNV_111b) kernel at booting up
and succeed with dhcp lease to able proceed with initial install. File /etc/system gets
updated via root terminal session before standard reboot to make the patch for kernel
permanent. Posting is devoted first of all to Linux users , who are not aware of "kmdb"
syntax and involving into boot process.
Modified installation profile. (-kd) key is added to extra line :-

name = "sol0906"
vcpus = 1
memory = "1024"
kernel = "/home/boris/nevada/unix"
ramdisk = "/home/boris/nevada/x86.microroot"
extra = "/platform/i86xpv/kernel/amd64/unix -kd - nowin -B install_media=cdrom"
disk = ['phy:/dev/loop0,6:cdrom,r','phy:/dev/sda6,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"

Start install

root@ServerJaunty:/home/boris/nevada# xm create -c osol.install
Using config file "./osol.install".
Started domain osol.install (id=6)
Loading kmdb...
Welcome to kmdb
Loaded modules: [ unix krtld genunix ]
[0]> ::bp xnf`_init
[0]> :c
v3.4.1-rc7 chgset 'Wed Jul 15 13:26:50 2009 +0100 19696:22ef8e900a6d'
SunOS Release 5.11 Version snv_111b 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: opensolaris
Remounting root read/write
Probing for device nodes ...
Loaded modules: [ scsi_vhci crypto mac neti xpv_psm ufs mpt zfs s1394 uhci hook
ip usba specfs md random sctp arp emlxs sockfs xpv_uppc ]
kmdb: stop at xnf`_init
kmdb: target stopped at:
xnf`_init: pushq %rbp
[0]> xnf_cksum_offload/W 0
xnf`xnf_cksum_offload: 0x1 = 0x0
[0]> :c
Preparing live image for use
Done mounting Live image
USB keyboard
1. Albanian 23. Lithuanian
2. Belarusian 24. Latvian
3. Belgian 25. Macedonian
4. Brazilian 26. Malta_UK
5. Bulgarian 27. Malta_US
6. Canadian-Bilingual 28. Norwegian
7. Croatian 29. Polish
8. Czech 30. Portuguese
9. Danish 31. Russian
10. Dutch 32. Serbia-And-Montenegro
11. Finnish 33. Slovenian
12. French 34. Slovakian
13. French-Canadian 35. Spanish
14. Hungarian 36. Swedish
15. German 37. Swiss-French
16. Greek 38. Swiss-German
17. Icelandic 39. Traditional-Chinese
18. Italian 40. TurkishQ
19. Japanese-type6 41. TurkishF
20. Japanese 42. UK-English
21. Korean 43. US-English
22. Latin-American
To select the keyboard layout, enter a number [default 43]:

1. Arabic
2. Chinese - Simplified
3. Chinese - Traditional
4. Czech
5. Dutch
6. English
7. French
8. German
9. Greek
10. Hebrew
11. Hungarian
12. Indonesian
13. Italian
14. Japanese
15. Korean
16. Polish
17. Portuguese - Brazil
18. Russian
19. Slovak
20. Spanish
21. Swedish
To select desktop language, enter a number [default is 6]:
User selected: English
Configuring devices.
Mounting cdroms
Reading ZFS config: done.
opensolaris console login: jack
Password:
Sun Microsystems Inc. SunOS 5.11 snv_111b November 2008
jack@opensolaris:~$ Jul 19 03:18:29 opensolaris in.routed[786]: route 0.0.0.0/8 --> 0.0.0.0 nexthop is not directly connected
jack@opensolaris:~$ pfexec ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=1004843 mtu 1500 index 2
inet 192.168.1.35 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:74:95:f
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128
xnf0: flags=2004841 mtu 1500 index 2
inet6 fe80::216:3eff:fe74:950f/10
ether 0:16:3e:74:95:f
jack@opensolaris:~$ cp .Xclients .vnc/xstartup
jack@opensolaris:~$ vncserver

Open an other terminal window and connect via vncviewer 192.168.1.35:1 to DomU
Go through normal install
At the end drop to root shell and add to /etc/system one line :-

set xnf:xnf_cksum_offload = 0

Then click "REBOOT" button

















Loading OSOL 2009.06 DomU




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
rebooting...


















Tuesday, July 07, 2009


Building Xenified 2.6.30.1 kernel via xen-patches-2.6.30-2.tar.bz2


To build xenified 2.6.30.1 via Andrew Lyon's 2.6.30 patch set in it's current state downloaded patch set:-

# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.30-2.tar.bz2
# tar jxvf xen-patches-2.6.30-2.tar.bz2
#cd xen-patches-2.6.30-2

1. Created log1 via script

rm -f log1
touch -f log1
for V in `ls 6*`
do
echo $V >> log1
cat $V|grep CONFIG_SPARSE_IRQ >> log1
done

2. Analyzed log1

60035_xen3-patch-2.6.29.patch1
+# if !defined(CONFIG_SPARSE_IRQ) && NR_CPUS 32 * MAX_IO_APICS
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifndef CONFIG_SPARSE_IRQ

60036_xen3-patch-2.6.30.patch1
-# if !defined(CONFIG_SPARSE_IRQ) && NR_CPUS 32 * MAX_IO_APICS
+# elif defined(CONFIG_SPARSE_IRQ)
+#ifdef CONFIG_SPARSE_IRQ

3. Made two replacements CONFIG_SPARSE_IRQ by CONFIG_GENERIC_HARDIRQS
60035_xen3-patch-2.6.29.patch1 line 11568

+#ifdef CONFIG_SPARSE_IRQ
+ irq_to_desc(irq)->kstat_irqs[cpu] = 0;
+#else
kstat_cpu(cpu).irqs[irq] = 0;

60036_xen3-patch-2.6.30.patch1 line 18283

+#ifdef CONFIG_SPARSE_IRQ
+int __init arch_probe_nr_irqs(void)
+{
+ int nr;
+
+ if (nr_irqs > (NR_VECTORS * nr_cpu_ids))
+ nr_irqs = NR_VECTORS * nr_cpu_ids;

4.Untared linux-2.6.30.1.tar.bz2 and applied patches.
Built kernel :-

# make menuconfig











# make
# make modules_install install
# mkinitramfs -o /boot/initrd-linux-2.6.30.1.img 2.6.30.1

To test 2.6.30.1 xenified kernel setup Xen 3.4.1 on to top of Ubuntu Jaunty Server

# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
# cd xen-3.4-testing.hg
Set in Config.mk
PYTHON = python
PYTHON_PREFIX_ARG =
# make install-xen
# make install-tools

Add entry to /boot/grub/menu.lst:-

title Xen 3.4 / Ubuntu 9.04 kernel 2.6.30.1
uuid 34d2c0bd-fe30-47e0-990e-4921caf1e845
kernel /boot/xen-3.4.gz
module /boot/vmlinuz-2.6.30.1 root=/dev/sda14 ro console=tty0
module /boot/initrd-2.6.30.1.img

and rebooted into xen host.Tested OSOL 2009.06 loaded with PV Drivers in stub domain OK , also tested OSOL 2009.06 PV DomU and F11 PV DomU.














Update OSOL 2009.06 PV DomU











References
1.Gentoo-xen-kernel
2.2.6.30 dom0 Xen patches