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)

Tuesday, April 01, 2008


Install Solaris 08/07 HVM DomU at SNV 85 Dom0 on ASUS P5K Premium /WIFI



Build 85 is the first Nevada build with xen 3.1.2 bits implemented.
Several issues have been inspired due to this changes:-
1. Install SNV 85 DomU at Xen 3.2 Linux Dom0 (CentOS 5.1,Ubuntu 7.10)
crashes immediately due to broken by Xen 3.2 backward compatibility.
Just note, that SNV 84 (3.0.4) DomU works fine at Xen 3.2 Linux Dom0.
2. Solaris 08/07 HVM DomU at SNV 85 Dom0 installation requires
some workaround to succeed.
Posting bellow desrcribes installation procedure for Solaris 08/07 HVM
step by step.First run:-



svccfg -s xvm/xend setprop config/vncpasswd = astring: \"secret\"
svccfg -s xvm/xend setprop config/vnc-listen = astring: \"0.0.0.0\"
svccfg -s xvm/xend setprop config/default-nic="rge0"
svcadm refresh xvm/xend
svcadm restart xvm/xend




Proceed with virt-install as usual:-














When guest OS reboots edit grub menu enabling "kmdb",otherwhise installation
will fail.














Make permanent changes to /boot/grub/menu.lst.
Replace line



kernel /boot/multiboot


by



kernel /boot/multiboot kernel/unix -k


Perform registration via ADSL internet connection, acting as DHCP bridge :-











Check for Internet working :-








Shutdown HVM DomU:-








Then shutdown domain:-



# xm shutdown Solaris0807