Monday, May 12, 2008


Install Solaris (Nevada build 87) at Xen 3.2.1 CentOS 5.1 Dom0 (64-bit)



Xen 3.1.2 bits went into Nevada build 85, what caused SNV85 PV guest immediately
to panic at installation startup on Xen 3.2 (3.2.1) Linux Dom0. Sun made an official fix for this issue in build 87.Only 85 and 86 Nevada builds are affected by
Bug 6650717

and require workaround ([1]).Nevada build 87 DomU works fine at Xen 3.2.1 Linux
Dom0 (64-bit). Forthcoming Nevada build 88 DomU would work also on Xen 3.2.1 Linux
Dom0 (32-bit).


Verify environment at Xen3.2.1 Linux Dom0:-



[root@dhcppc0 vm]# xm info
host : dhcppc0
release : 2.6.18.8-xen
version : #1 SMP Sat Apr 26 09:29:28 EDT 2008
machine : x86_64
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 3005
hw_caps : bfebfbff:20100800:00000000:00000140:0008e3fd:00000000:00000001
total_memory : 4095
free_memory : 1030
node_to_cpu : node0:0-1
xen_major : 3
xen_minor : 2
xen_extra : .1
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
platform_params : virt_start=0xffff800000000000
xen_changeset : Fri Apr 25 14:03:45 2008 +0100 16881:4073b3ded545
cc_compiler : gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
cc_compile_by : root
cc_compile_domain : (none)
cc_compile_date : Sat Apr 26 09:35:16 EDT 2008
xend_config_format : 4
[root@dhcppc0 vm]# brctl show
bridge name bridge id STP enabled interfaces
eth0 8000.001e8c25cca5 no peth0




Installation profile:-



[root@dhcppc0 vm]# cat SNV87.install
name = "Solaris87PVM"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-87"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-87"
extra = "/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom"
disk = ['file:/usr/lib/xen-solaris/snv87.iso,6:cdrom,r','phy:/dev/sdb15,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




Go through normal install
# xm create -c snv87.install
and change profile to runtime :-



[root@dhcppc0 vm]# cat SNV87.conf
name = "Solaris87PVM"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-87"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-87"
extra = "/platform/i86xpv/kernel/amd64/unix"
disk = ['phy:/dev/sdb15,0,w']
root="/dev/dsk/c0d0s0"
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




Run:-
# xm create -c snv87.conf
and turn on Sun Xvnc at DomU:-



# svccfg -s application/x11/x11-server \
add display1
# svccfg -s application/x11/x11-server:display1 \
addpg options application
# svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
# svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server_args astring: '"SecurityTypes=None"'




Configure dtlogin to start it:-



# mkdir -p /etc/dt/config
# cp /usr/dt/config/Xservers /etc/dt/config/Xservers
# echo " :1 Local local_uid@none root /usr/X11/bin/Xserver :1" \
>> /etc/dt/config/Xservers
# pkill -HUP dtlogin




Create any user's account and connect from another machine or Dom0 :-
# vncviewer IP-ADDRESS-DomU:1
to verify that you can login with recently created user's credentials
to a Gnome (CDE) desktop session.
















References.
1.Install SNV85 DomU at Xen 3.2 CentOS 5.1 or Ubuntu 7.10 Dom0 (64-bit) per Jurgen Keil

Thursday, May 08, 2008


Install OpenSolaris 2008/05 DomU at Xen 3.2.1 CentOS 5.1 & Ubuntu 7.10 (Desktop) Dom0 (64-bit)



Install OpenSolaris 2008/05, based on Nevada build 86, requires workaround
recently suggested by Jurgen Keil ([1]). It's runtime profile differs from
reqular one due to utilizing ZFS filesystem (vs UFS for regular Nevada
builds) as was noticed by Mark Jonson at xen-discuss forum @opensolaris.org.
Place OpenSolaris 2008/05 DVD in drive, wait until gets mounted
and run:-



# dd if=/dev/hda of=/usr/lib/xen-solaris/os200805.iso




Then copy 64-bit xen-solaris kernel and x86.microroot to Dom0:-



mkdir -p /mnt01/tmp
mount -o loop,ro os200805.iso /mnt01/tmp
cp /mnt01/tmp/boot/x86.microroot /usr/lib/xen-solaris/x86.microroot
cp /mnt01/tmp/boot/platform/i86xpv/kernel/amd64/unix /usr/lib/xen-solaris/unix-0805
umount /mnt01/tmp




Installation profile:-



name = "OpenSolaris"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-0805"
ramdisk = "/usr/lib/xen-solaris/x86.microroot"
extra = "/platform/i86xpv/kernel/amd64/unix -kd - nowin -B install_media=cdrom"
disk = ['file:/usr/lib/xen-solaris/os200805.iso,6:cdrom,r','phy:/dev/sdb8,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




During startup manage like in [1]:-



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 follow [2] 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 \
> IP-ADDRESS-Dom0:/usr/lib/xen-solaris/unix-0805


# /usr/bin/scp -S /usr/bin/ssh /a/platform/i86pc/amd64/boot_archive \
> IP-ADDRESS-Dom0:/usr/lib/xen-solaris/boot_archive


bash-3.2# shutdown -y -i0 -g0




Runtime profile:-



name = "OpenSolaris"
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 = ['file:/usr/lib/xen-solaris/os200805.iso,6:cdrom,r','phy:/dev/sdb8,0,w']
vif = ['bridge=eth0']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




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 ([2]).
Your environment may be picked up from another loaded just for several minutes Live CD's instance.


Snapshots:-















Same schema also works at Xen 3.2.1 Ubuntu 7.10 (Desktop) Dom0.
Pygrub may be used for original install , but still cannot help
at runtime (no ZFS support for pygrub in Xen 3.2.1)





Patching kernel and copy it along with boot_archive to Dom0:-








Starting up DomU:-











References
1.http://lxer.com/module/newswire/view/101660/index.html
2.http://blogs.sun.com/mrj/

Monday, May 05, 2008


Performance SNV87 HVM DomU at Xen 3.2.1 CentOS 5.1 Dom0 (64-bit) versus at SNV87 Dom0 (64-bit).



Startup shutdown snapshots at Xen 3.2.1 CentOS Dom0.
Timer in right upper corner.

















It's time to shutdown SNV87 HVM DomU.








Startup shutdown snapshots at SNV87 Dom0.
Timer in left down corner.


















It's time to destroy SNV87 HVM DomU (shutdown won't help).




Wednesday, April 30, 2008


Install HVM FreeBSD 7.0 DomU (32-bit) at Xen 3.2.1 CentOS 5.1 Dom0 (64-bit)



This Xen build has been done with VMXASSIST disabled as advised in [2].
Clone Xen 3.2.1 from mercurial repository@xenbits.xensource.com on xen-disabled CentOS 5.1 64-bit instance as follows:-



# cd /usr/src/
# hg clone http://xenbits.xensource.com/xen-3.2-testing.hg
# cd xen-3.2-testing.hg
# make world vmxassist=n
# make install




The rest of install Xen 3.2 Dom0 goes exactly as in [1].
Installation profile.



name = "FreeBSD7"
builder = "hvm"
memory = "1024"
disk = ['phy:/dev/sdb12,ioemu:hda,w','file:/etc/xen/isos/7.0-RELEASE-i386-dvd.iso,hdc:cdrom,r']
vif = [ 'type=ioemu,bridge=eth0' ]
device_model = "/usr/lib64/xen/bin/qemu-dm"
kernel = "/usr/lib/xen/boot/hvmloader"
vnc=1
boot="d"
vcpus=1
acpi="0"
serial = "pty" # enable serial console
on_reboot = 'restart'
on_crash = 'restart'




Runtime profile:-



name = "FreeBSD7"
builder = "hvm"
memory = "1024"
disk = ['phy:/dev/sdb12,ioemu:hda,w']
vif = [ 'type=ioemu,bridge=eth0' ]
device_model = "/usr/lib64/xen/bin/qemu-dm"
kernel = "/usr/lib/xen/boot/hvmloader"
vnc=1
boot="c"
vcpus=1
acpi="0"
serial = "pty" # enable serial console
on_reboot = 'restart'
on_crash = 'restart'




Runtime snapshots:-

















SSH connections:-
1.Free BSD DomU to Dom0
2.Dom0 to Free BSD DomU
3.HVM S10U4 DomU to HVM FreeBSD 7 DomU














To install Gnome Desktop run:-



# pkg_add -r gnome2




Enable Gnome Desktop by adding gdm_enable="YES" to /etc/rc.conf and
reboot DomU.


GNOME may also be started from the command-line by properly configuring a file named ~/.xinitrc. If a custom .xinitrc is already in place, simply replace the line that starts the current window manager with one
that starts /usr/local/bin/gnome-session instead.
Next, type startx, and the GNOME desktop environment will be started.








References.
1.http://lxer.com/module/newswire/view/100541/index.html
2.http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=622

Monday, April 28, 2008


Install HVM Solaris 08/07 DomU (32-bit) at Xen 3.2.1 CentOS 5.1 Dom0 (64-bit)



Solaris 08/07 (10U4) as usual hangs at Xen 3.2 (64-bit) ( Xen 3.1) Linux Dom0s.
This Xen build has been done with VMXASSIST disabled as advised in [2].
Clone Xen 3.2.1 from mercurial repository@xenbits.xensource.com on xen-disabled CentOS 5.1 64-bit instance as follows:-



# cd /usr/src/
# hg clone http://xenbits.xensource.com/xen-3.2-testing.hg
# cd xen-3.2-testing.hg
# make world vmxassist=n
# make install




The rest of install Xen 3.2 Dom0 goes exactly as in [1].
Installation profile.



name = "Solaris"
builder = "hvm"
memory = "1024"
disk = ['phy:/dev/sdb11,ioemu:hda,w','file:/usr/lib/xen-solaris/solaris.iso,hdc:cdrom,r']
vif = [ 'type=ioemu,bridge=eth0' ]
device_model = "/usr/lib64/xen/bin/qemu-dm"
kernel = "/usr/lib/xen/boot/hvmloader"
vnc=1
boot="d"
vcpus=1
serial = "pty" # enable serial console
on_reboot = 'restart'
on_crash = 'restart'







Runtime profile.



name = "Solaris"
builder = "hvm"
memory = "1024"
disk = ['phy:/dev/sdb11,ioemu:hda,w']
vif = [ 'type=ioemu,bridge=eth0' ]
device_model = "/usr/lib64/xen/bin/qemu-dm"
kernel = "/usr/lib/xen/boot/hvmloader"
vnc=1
boot="d"
vcpus=1
serial = "pty" # enable serial console
on_reboot = 'restart'
on_crash = 'restart'


















Deployment phase runs pretty fast and overall HVM behavior is faster
then usual as well, i guess because VMXASSIST has got disabled.


References.
1.http://lxer.com/module/newswire/view/100541/index.html
2.http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=622

Thursday, April 10, 2008


Install SNV85 DomU at Xen 3.2 CentOS 5.1 or Ubuntu 7.10 Dom0 (64-bit) per Jurgen Keil



Nevada build 85 is the first SNV build implementing Xen 3.1.2 bits. It's well known that straight forward attempt to install SNV85 DomU at Xen 3.2 Linux Dom0 immediately
crashes due to broken by Xen 3.2 backward compatibility.
Recently at xen-discuss forum@opensolaris.org Jurgen Keil suggested workaround for this issue providing owners of build 85 option to load SNV85 DomU and patch DomU's kernel , turning it permanently into running shape at Xen 3.2 Linux Dom0 (64-bit). Note , that Sun patch is scheduled for build 87 and might take 3-4 weeks waiting for ISO image availibilty at sdn.com. Jurgen also wrote, that he didn't have Xen 3.2 Linux Dom0 (64-bit) to perform testing. That is what , actually, was done by me for CentOS 5.1 and Ubuntu 7.10 Desktop. Installations differs due to CentOS 5.1 doesn't allow to use "pygrub" and requires coping of patched kernel from DomU to Dom0.
Brief description for both procedures follows bellow.


1. Install at Xen 3.2 CentOS 51. Dom0 (64-bit)



*********************
Installation profile
*********************
[root@ServerRHL51 vm]# cat snv85.install
name = "Solaris85pvm"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-85"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-85"
extra = "/platform/i86xpv/kernel/amd64/unix -kd - nowin -B install_media=cdrom"
disk = ['file:/usr/lib/xen-solaris/snv85.iso,6:cdrom,r','phy:/dev/sdb7,0,w']
vif = ['bridge=eth2']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




At start up at kmdb prompt do:-



Using config file "./snv85.conf".
Started domain Solaris85pvm
Loading kmdb...

Welcome to kmdb
Loaded modules: [ unix krtld genunix ]
[0]> gnttab_init+0xce/W 403
gnttab_init+0xce: 0x3 = 0x403
[0]> :c
v3.2.1-rc1-pre chgset 'Wed Mar 05 16:49:33 2008 +0000 16805:28e0d4a37bb4'
SunOS Release 5.11 Version snv_85 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.




Now change profile for runtime



****************
Runtime profile
****************
name = "Solaris85pvm"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-85"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-85"
extra = "/platform/i86xpv/kernel/amd64/unix -kd"
disk = ['phy:/dev/sdb7,0,w']
vif = ['bridge=eth2']
root="/dev/dsk/c0d0s0"
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




Repeat same actions at kmdb prompt and when DomU gets loaded,
patch kernel and copy it to Dom0 :-



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

bash-3.2# /usr/bin/scp -S /usr/bin/ssh /platform/i86xpv/kernel/amd64/unix \
> 192.168.1.33:/usr/lib/xen-solaris/unix-85
The authenticity of host '192.168.1.33 (192.168.1.33)' can't be established.
RSA key fingerprint is 8d:83:34:15:01:a3:5e:d3:65:3c:a1:1e:0f:01:32:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.33' (RSA) to the list of known hosts.
root@192.168.1.33's password:
unix 100% |*****************************| 1760 KB 00:00
bash-3.2# shutdown -y -i0 -g0




Now runtime profile at Dom0 is referencing patched version of kernel
and "-kd" should be removed from "extra" line.








Installation snapshots for SNV86 DomU at Xen 3.2 CentOS 5.1 Dom0 (64-bit)























2. Installation procedure at Xen 3.2 Ubuntu 7.10 Desktop Dom0 (64-bit)



*********************
Installation profile
*********************
name = 'Solaris85PVM'
memory = '1024'
disk = [ 'file:/usr/lib/xen-solaris/snv85.iso,6:cdrom,r','phy:/dev/sdb9,0,w']
vif = [ 'bridge = eth2' ]
bootloader = '/usr/bin/pygrub'
kernel = '/boot/platform/i86xpv/kernel/amd64/unix'
ramdisk = '/boot/amd64/x86.miniroot'
extra = '/platform/i86xpv/kernel/amd64/unix -kd - nowin -B install_media=cdrom'




At start up at kmdb prompt do:-



root@boris-desktop:/etc/xen/vm # xm create -c SNV85.install
Using config file "./SNV85.install".
Started domain Solaris85PVM
Loading kmdb...

Welcome to kmdb
Loaded modules: [ unix krtld genunix ]
[0]> gnttab_init+0xce/W 403
gnttab_init+0xce: 0x3 = 0x403
[0]> :c
v3.2.0 chgset 'unavailable'
SunOS Release 5.11 Version snv_85 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring /dev




Go through normal install and change profile to perform kernel patch:-



***********************************************
The very first runtime profile to patch kernel
***********************************************
root@boris-deskto p:/etc/xen/vm# cat SNV85.conf
name = 'Solaris85PVM'
vcpus = 1
memory = "1024"
bootloader = "/usr/bin/pygrub"
kernel = "/platform/i86xpv/kernel/amd64/unix -kd"
ramdisk = "/platform/i86pc/amd64/boot_archive"
disk = ['phy:/dev/sdb9,0,w']
vif = ['bridge = eth2']
on_shutdown = "destroy"
on_reboot = "restart"
on_crash = "destroy"




When DomU gets loaded run to make permanent changes to kernel:-



# bash
bash-3.2# mdb -w /platform/i86xpv/kernel/amd64/unix
> gnttab_init+0xce?W 403
unix`gnttab_init+0xce: 0x403 = 0x403
> $q
# shutdown -y -i0 -g0




Now you can switch to runtime profile either use previous one removed "-kd" from kernel entry :-



name = 'Solaris85PVM'
memory = '1024'
disk = [ 'phy:/dev/sdb9,0,w' ]
vif = [ 'bridge = eth2' ]









Installation snapshots for SNV86 DomU at Xen 3.2 Ubuntu 7.10 Dom0 (64-bit)





























References
1.Install Xen 3.2 on Ubuntu 7.10 Desktop (amd64)
2.Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit)