Saturday, March 22, 2008


Install Xen 3.2 on Ubuntu 7.10 Desktop (amd64)



Backported Mercurial from Ubuntu Hardy Heron
Repositories:-

$ vi /etc/apt/sources.list and add this line to the
end:
deb-src http://us.archive.ubuntu.com/ubuntu/ \
hardy main restricted universe multiverse

# apt-get update
# apt-get build-dep mercurial
# apt-get source -b mercurial
# dpkg -i mercurial_0.9.5-2_amd64.deb

Installed gcc:-

# apt-get install gcc gcc-3.4 gcc-4.1 libsdl1.2-dev \
make libz-dev uuid-dev libasound2-dev gcc libc6-dev \
zlib1g-dev

Installed 2.6.22-14-xen ubuntu xen-kernel
# aptitude install linux-image-xen
to protect Gnome desktop environment, when 2.6.18.8-xen kernel
would be loaded.


Dowloaded :-
zlib-1.2.3.tar.gz
openssl-0.9.8g.tar.gz

1. Tuned Makefile when install openssl
2. Tuned Makefile when install zlib
to perform "make install" to folders expected by Xen 3.2
3.apt-get install libncurses5-dev

Installing openssl assigned:-
INSTDIR=/usr
TOPDIR=/usr
in Makefile

Installing zlib configured as follows :-
# ./configure --shared
# make
# make install (in Makefile prefix=/usr)

Actions above have been undertaken to avoid failure when running:-
# make tools

Compiling Xen:-

# cd /usr/src
# wget http://bits.xensource.com/oss-xen/release/3.2.0/xen-3.2.0.tar.gz
# hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg
# tar -xzf xen-3.2.0.tar.gz
# cd xen-3.2.0
# make all
# make install

# update-rc.d xend defaults 20 21
# update-rc.d xendomains defaults 21 20
# depmod 2.6.18.8-xen
# mkinitramfs -o /boot/initrd.img-2.6.18.8-xen 2.6.18.8-xen
# vi /etc/init.d/xend and insert before shell code:-

mkdir -p /var/run/xenstored
mkdir -p /var/lock/subsys


Update /boot/grub/menu.lst

title Xen 3.2.0 / Ubuntu 7.10, kernel 2.6.18.8-xen
root (hd0,4)
kernel /boot/xen-3.2.0.gz
module /boot/vmlinuz-2.6.18.8-xen root=UUID=8f17d1a1-64ab-425a-9b53-71d20aa7893e ro
console=tty0
module /boot/initrd.img-2.6.18.8-xen

Boot into new kernel

SNV84 DomU has been installed and tested at
Xen 3.2 Ubuntu 7.10 Desktop Dom0 (64-bit).
Notice, that eth2 is ethernet interface connected to ADSL Modem acting as DHCP bridge
and reported by:-
# brctl show
as a xen bridge after tuning /etc/xen/xend-conf.sxp and rebooting into Xen 3.2 kernel.



**********************
Installation profile
**********************
name = 'Solaris84PVM'
memory = '1024'
disk = [ 'file:/usr/lib/xen-solaris/snv84.iso,6:cdrom,r','phy:/dev/sdb11,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 - nowin -B install_media=cdrom'





















****************
Runtime profile
****************
name = 'Solaris84PVM'
memory = '1024'
disk = [ 'phy:/dev/sdb11,0,w' ]
vif = [ 'bridge = eth2' ]





















References
1.http://lists.xensource.com/archives/html/xen-users/2008-01/msg00704.html

Friday, March 14, 2008


Install Solaris 01/08 HVM DomU (64-bit) at Xen 3.2 CentOS 5.1 Dom0 (x86_64)



This posting follows up "Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit)" and provides brief description how to install 64-bit Solaris 01/08 HVM DomU
at Xen 3.2 CentOS 5.1 Dom0 (64-bit as well) despite installer puts this HVM in 32-bit mode by default.
I have to notice that attempt to install Solaris 10 U4 HVM
with similar installation profile still hangs at the beginning, Solaris installer
hangs at initial boot up immediately after passing grub menu.


Phyton profile has been used for install:-



name = "Solaris79"
builder = "hvm"
memory = "1024"
disk = ['phy:/dev/sdb8,ioemu:hda,w','file:/usr/lib/xen-solaris/snv79.iso,hdc:cdrom,r']
vif = [ 'type=ioemu,bridge=eth2' ]
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'




Go through normal SXDE installation and change profile for runtime:-



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




During first startup modify grub entries for Solaris 01/08 HVM as follows:-








Press "b" and proceed with booting :-











When logged in make permanent changes to file "/boot/grub/menu.lst" replacing
$ISADIR by "amd64" in corresponding lines.


Start NetBeans 6.0 to deploy and run a couple of sample Enterprise Java apllications to make sure GlassFish V2 and IDE itself won't malfunction after changes been done
to Solaris 01/08 HVM DomU.




















References.
1.Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit)

Thursday, March 13, 2008


GNOME crashing on SNV84 DomU at Xen 3.2 CentOS 5.1 Dom0.



















Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit)



This posting is targeting cloning Mercurial Repository for Xen 3.2 on CentOS 5.1 and creating 64-bit Xen 3.2 CentOS 5.1 Dom0. To verify Dom0 functionality Solaris
(Navada Build 84) has been installed as DomU. Xvnc has been set up per Sun manuals
and it appeared that only CDE Desktop was functional on DomU. Gnome Desktop
crashed immediately after logging in.
However , that’s quite enough to perform Oracle 10g R2 installation at DomU
and evaluate I/0 performance provided by new Xen Hypervisor for Solaris Paravirtual guests.


First install Xen 3.2 from mercurial repository on xen-disabled CentOS 5.1 instance



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




Determine the name of the Xen Linux kernel version that was installed.



# ls /lib/modules




There should be a directory for the Xen Linux kernel (e.g., 2.6.18.8-xen)
Generate the module dependency list and map files



# /sbin/depmod 2.6.18.8-xen




Create the Xen initial ramdisk image



# /sbin/mkinitrd /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen




Disable tls


 
# mv /lib64/tls /lib64/tls.disabled




Set xend service to start



# /sbin/chkconfig --add xend
# /sbin/chkconfig xend on




Edit /boot/grub/grub.conf and copy one of the existing boot entries to make the
required changes for Xen and reboot into new kernel.



title Xen-3.2 x86_64 (2.6.18.8-xen)
root (hd1,4)
kernel /xen-3.2.gz
module /vmlinuz-2.6.18.8-xen ro root=/dev/VolGroup01/LogVol00 rhgb quiet
module /initrd-2.6.18.8-xen.img




eth2 was reported by command "brctl show" as xen bridge
with virtual interface peth2 attached.
Create installation SNV84 DomU profile:-



# cat SNV84.install

name = "Solaris84pvm"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-84"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-84"
extra = "/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom"
disk = ['file:/usr/lib/xen-solaris/snv84.iso,6:cdrom,r','phy:/dev/sdb7,0,w']
vif = ['bridge=eth2']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"


# xm create -c SNV84.install
























Runtime profile:-



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









Runtime snapshots:-








Starting up Oracle instance on DomU:-








Launching browser at DomU to Oracle consoles:-











Launching browser at Dom0 to Oracle consoles, running at DomU :-

















P.S.
Jurgen Keil pointed my attention to CR 6631419 at opensolaris.org:-
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6631419
This CR contains workaround bringing Gnome Desktop back to life.
Run as root:-



for d in /usr/share/icons/*;
do
[-d $d ] && gtk-update-icon-cache --force $d;
done






Runtime snapshots for SNV84 DomU at Xen 3.2 CentOS 5.1 Dom0 with Gnome desktop:-









Sunday, February 24, 2008


Pygrub & install Solaris (build >75) DomU at CentOS 5.1 Dom0 (x86_64)



Procedure described bellow attaches Solaris DomU to libvirtd's daemon
subnet 192.168.122.0 (netmask 255.255.255.0) utilizing interface virbr0
and dnsmasq service as DHCP server. Standard Solaris DomU notation vif=[' ']
would work fine on CentOS 5.1 and specifying DHCP for xnf0 interface will
successfully obtain IP address from dnsmasq service during original SNV DomU
installation.


Xen implementation on CentOS 5.1 allows to utilize pygrub as bootloader for Solaris
DomUs, already created by "xm" utility , what significantly simplifies creating runtime profiles for SNV DomUs and also will work for any build of OpenSolaris (76,78,79) regardless of "Bug 633784 checksum offload with Linux dom0 produces invalid checksum", been fixed in build 81.


First of all "yum update" has been run on CentOS 5.1 box.











[root@ServerRHL51 vm]# xm info
host : ServerRHL51
release : 2.6.18-53.1.13.el5xen
version : #1 SMP Tue Feb 12 13:33:07 EST 2008
machine : x86_64
nr_cpus : 2
nr_nodes : 1
sockets_per_node : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2137
hw_caps : bfebfbff:20000800:00000000:00000140:0000e3bd:00000000:00000001
total_memory : 2047
free_memory : 1025
xen_major : 3
xen_minor : 1
xen_extra : .0-53.1.13.el5
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_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : unavailable
cc_compiler : gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
cc_compile_by : mockbuild
cc_compile_domain :
cc_compile_date : Tue Feb 12 12:55:35 EST 2008
xend_config_format : 2




***********************
Installation profile :
***********************



name = "Solaris81PVM"
vcpus = 1
memory = "1024"
kernel = "/usr/lib/xen-solaris/unix-81"
ramdisk = "/usr/lib/xen-solaris/x86.miniroot-81"
extra = "/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom"
disk = ['file:/usr/lib/xen-solaris/snv81.iso,6:cdrom,r','phy:/dev/sda8,0,w']
vif = ['']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"




Go through installation procedure as usual, specifying DHCP for
network interface at Solaris DomU (xnf0).











Then create runtime profile utilizing "pygrub" as follows:-


********************
RunTime profile :
********************



name = "Solaris81PVM"
vcpus = 1
memory = "1024"

bootloader = "/usr/bin/pygrub"
kernel = "/platform/i86xpv/kernel/amd64/unix"
ramdisk = "/platform/i86pc/amd64/boot_archive"
disk = ['phy:/dev/sda8,0,w']
vif = ['']
on_shutdown = "destroy"
on_reboot = "restart"
on_crash = "destroy"












DHCP config for xnf0 at Solaris DomU:-








Connection via ssh from Solaris DomU to CentOS 5.1 Dom0
and getting "xm list -l SNV_DomU_Name" report :-








********************************
# xm list -l Solaris81PVM
********************************



[root@ServerRHL51 vm]# xm list -l Solaris81PVM
(domain
(domid 4)
(uuid 7c114a8a-5831-f2e9-1d45-fe40af47c41f)
(vcpus 1)
(cpu_weight 1.0)
(memory 1024)
(shadow_memory 0)
(maxmem 1024)
(bootloader /usr/bin/pygrub)
(features )
(name Solaris81PVM)
(on_poweroff destroy)
(on_reboot restart)
(on_crash destroy)
(image
(linux
(ramdisk /var/lib/xen/boot_ramdisk.WIVYhW)
(kernel /var/lib/xen/boot_kernel.xe3nxA)
(args /platform/i86xpv/kernel/amd64/unix)
)
)
(device (vif (backend 0) (script vif-bridge) (mac 00:16:3e:16:55:29)))
(device (vbd (backend 0) (dev 0:disk) (uname phy:/dev/sda8) (mode w)))
(state -b----)
(shutdown_reason poweroff)
(cpu_time 88.801468943)
(online_vcpus 1)
(up_time 161.828547955)
(start_time 1203905988.7)
(store_mfn 449776)
(console_mfn 449775)
)


Thursday, February 21, 2008


Pygrub & install Solaris (build >75) DomU at Fedora 8 Dom0 (x86_64)



Procedure descibed bellow attaches Solaris DomU to libvirtd's daemon
subnet 192.168.122.0 (netmask 255.255.255.0) utilizing interface virbr0
and dnsmasq service as DHCP server. It doesn't require DHCP bridge and
external DHCP Server to turn on old fashion xen-bridging on F8,
as was suggested in xen-discuss forum at opensolaris.org:-

Re: Xen 3.1 Linux Dom0 (x86_64) & PYGRUB



Xen implementation on Fedora 8 allows to utilize pygrub as bootloader for Solaris
DomUs, what significantly simplifies creating installation and runtime profiles for SNV DomUs and also will work for any build of OpenSolaris (76,78,79) regardless of
"Bug 633784 checksum offload with Linux dom0 produces invalid checksum", been fixed
in build 81.
Fedora 8 Dom0 (64-bit) has been installed on the box with static IP address.
File /etc/xen/xend-config.sxp was modified to set up a isolated bridge + NAT forwarding:-



# (network-script network-bridge)
#### LAPTOP USERS ! #####
# For laptops, or machines where network interfaces come/go on-the-fly,
# or are otherwise managed by NetworkManager, comment out the above line.
# Then, uncomment the line below, and use libvirt's virtual networking
# capability which sets up a isolated bridge + NAT forwarding
(network-script /bin/true)




This changes requires daemon xend restart.



**********************
Installation profile
**********************
name = 'Solaris81F8X'
memory = '1024'
disk = [ 'file:/usr/lib/xen-solaris/snv81.iso,6:cdrom,r','phy:/dev/sdb14,0,w']
vif = [ 'bridge = virbr0' ]
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'




Report "xm list -l Solaris81F8X" running in the backend window demonstrates,
that virtual interface for SNV DomU install is attached to virbr0, what
guarantees DHCP request from SNV DomU to dnsmasq service to succeed and does
allow to avoid creating DHCP bridge on F8 box, wich consequently requires
external DHCP Server on the LAN to turn on old fashioned xen-bridging on F8 Dom0.











****************
Runtime profile
****************
name = 'Solaris81F8X'
memory = '1024'
disk = [ 'phy:/dev/sdb14,0,w' ]
vif = [ 'bridge = virbr0' ]















SSH connection from SNV81 DomU to F8 Dom0 and getting "xm list -l SNV_DomU_Name"
report.








References.
Install SNV81 DomU at Fedora 7 Dom0 (x86_64)