Tuesday, May 27, 2008

Install OpenSolaris 2008/05 DomU at Ubuntu 8.04 Desktop Xen 3.2 Dom0 (both 64-bit)

Instructions mentioned bellow in general follow up the ones in my previous post,
regarding OpenSolaris 2008/05 DomU at Xen 3.2.1 CentOS 5.1 Dom0 (64-bit).
However, Xen 3.2.1 Dom0 had been built on CentOS 5.1 from the source obtained
by cloning Mercurial Repository@xensource.com. Install Xen on Ubuntu 8.04 had
been performed from Ubuntu Repositories and patched as usual:

sudo apt-get install ubuntu-xen-server
wget http://downloads.howtoforge.com/ubuntu_8.04_server_xen_from_repositories/linux-headers-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb
wget http://downloads.howtoforge.com/ubuntu_8.04_server_xen_from_repositories/linux-image-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb
sudo dpkg -i linux-headers-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb linux-image-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb

Current install is targeting test Ubuntu 8.04 Desktop(Server) Xen 3.2 Dom0 (amd64)
with DomU a bit different form regular SNV87(89) DomU due to ZFS file system
has been utilized for root in OS 2008/05.
Ubuntu 8.04 allows utilize "pygrub" for initial load from Live CD , but for
runtime it is still useless (no ZFS support for pygrub in Xen 3.2.0).
Patched kernel and boot_archive have been copied from DomU to Dom0 , exactly like
on CentOS 5.1. Runtime uses "extra" line suggested by Mark Jonson at xen-discuss
forum@opensolaris.org. Kernel has been patched in DomU per Jurgen Keil instruction
suggested by him at the same forum to put in work SNV85,86 at Xen 3.2 Linux Dom0s (64-bit)

Create startup profile as follows:-

# losetup -f /etc/xen/isos/os200805.iso

root@boris-desktop:/etc/xen/vm# cat os0805.install
name = "OpensolarisPV1"
vcpus = 1
memory = "1024"
bootloader = "/usr/bin/pygrub"
kernel = "/platform/i86xpv/kernel/amd64/unix"
ramdisk = "/boot/x86.microroot"
extra = "/platform/i86xpv/kernel/amd64/unix -kd - nowin -B install_media=cdrom"
disk = ['phy:/dev/loop0,6:cdrom,r','phy:/dev/sdb11,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "preserve"

# xm create -c os0805.install

During startup at kmdb prompt :-

Welcome to kmdb
Loaded modules: [ unix krtld genunix ]
[0]> gnttab_init+0xce/W 403
gnttab_init+0xce: 0x3 = 0x403
[0]> :c

Login as jack/jack and to perform
graphical install from Live CD to hard drive.

When graphical install ends don't click reboot.
Open root's terminal session,with password assigned by yourself
at installation startup, and run:-

# mdb -w /a/platform/i86xpv/kernel/amd64/unix
> gnttab_init+0xce?W 403
unix`gnttab_init+0xce: 0x403 = 0x403
> $q

# /usr/bin/scp -S /usr/bin/ssh /a/platform/i86xpv/kernel/amd64/unix \

# /usr/bin/scp -S /usr/bin/ssh /a/platform/i86pc/amd64/boot_archive \

bash-3.2# shutdown -y -i0 -g0

Runtime profile:-

name = "OpenSolarisPV"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-0805"
ramdisk = "/usr/lib/xen-solaris/boot_archive"
extra = "/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/27"
disk = ['phy:/dev/sdb11,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"

# xm create -c os200805.runtime

Notice that patched kernel and boot_archive are already copied to Dom0.
Login as user, been created during graphical install,into domU and tune
vncserver startup in same way like after boot from Live CD.
User's environment to start vncserver and file ./vnc/xtstartup are printed
bellow, you might be missing them after login :-

# For automatic login, we just invoke the default Gnome desktop
exec /usr/bin/dtstart jds

# export PATH=/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
# vncserver