Thursday, December 11, 2008


Ubuntu Hardy HVM vs PV DomU at opensolaris 2008.11 Dom0


Start with install HVM on zvol (/dev/zvol/dsk/bigpool/disk3)








When done:-

# apt-get install build-essentials
# apt-get install linux-image-xen

Download ethtool-6 package and install it with intend to disable checksums offloading
on PV DomU with image on same zvol.
********************************************
Add one more entry to /boot/grub/menu.lst
********************************************

default 0
# hidemenu
timeout 10

title Ubuntu 8.04.1, kernel 2.6.24-22-xen
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-22-xen root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro
initrd /boot/initrd.img-2.6.24-22-xen

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
. . . . . .
:wq

Add a console on xvc0:

# sed -e ’s/tty1/xvc0/’ /etc/event.d/tty1 | tee /etc/event.d/xvc0

Shutdown HVM DomU.
Create Ubuntu PV DomU profile at Dom0, referencing same image file as Ubuntu HVM DomU:-

name = "UbuntuPV"
memory = 2048
disk = [ 'phy:/dev/zvol/dsk/bigpool/disk3,hda,w']
vif = [ ' ' ]

Start PV DomU:-

root@opensolaris:/export/home/vm# xm create -c ub8.py







Started domain UbuntuPV
[ 0.000000] Linux version 2.6.24-22-xen (buildd@crested) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Mon Nov 24 21:35:54 UTC 2008 (Ubuntu 2.6.24-4.6-generic)
[ 0.000000] Command line: root=UUID=0719122c-ad35-421e-a5bb-2781384d7fc0
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] Xen: 0000000000000000 - 0000000080800000 (usable)
[ 0.000000] end_pfn_map = 526336
[ 9603.583251] Zone PFN ranges:
[ 9603.583252] DMA 0 -> 4096
[ 9603.583253] DMA32 4096 -> 1048576
[ 9603.583254] Normal 1048576 -> 1048576
[ 9603.583255] Movable zone start PFN for each node
[ 9603.583256] early_node_map[1] active PFN ranges
[ 9603.583257] 0: 0 -> 526336
[ 9603.611871] No mptable found.
[ 9603.615908] PERCPU: Allocating 22368 bytes of per cpu data
[ 9603.615925] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 519140
[ 9603.615927] Kernel command line: root=UUID=0719122c-ad35-421e-a5bb-2781384d7fc0
[ 9603.616246] Initializing CPU#0
[ 9603.616406] PID hash table entries: 4096 (order: 12, 32768 bytes)
[ 9603.616440] Xen reported: 3005.552 MHz processor.
[ 0.153012] console [xvc0] enabled
[ 0.153041] Console: colour dummy device 80x25
[ 0.153632] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.154072] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.154201] Software IO TLB disabled
[ 0.167178] Memory: 2027452k/2105344k available (2532k kernel code, 69052k reserved, 1332k data, 220k init)
[ 0.233731] Calibrating delay using timer specific routine.. 6013.68 BogoMIPS (lpj=12027368)
[ 0.233764] Security Framework initialized
[ 0.233770] SELinux: Disabled at boot.
[ 0.233775] AppArmor: AppArmor initialized
[ 0.233778] Failure registering capabilities with primary security module.
[ 0.233788] Mount-cache hash table entries: 256
[ 0.233884] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.233887] CPU: L2 cache: 6144K
[ 0.233893] CPU: Physical Processor ID: 0
[ 0.233894] CPU: Processor Core ID: 1
[ 0.233899] SMP alternatives: switching to UP code
[ 0.234513] Freeing SMP alternatives: 23k freed
[ 0.234593] Early unpacking initramfs... done
[ 0.247514] Brought up 1 CPUs
[ 0.247868] net_namespace: 120 bytes
[ 0.247871] failed to set up cpufreq notifier
[ 0.265754] Time: 165:165:165 Date: 165/165/65
[ 0.265774] NET: Registered protocol family 16
[ 0.277566] Brought up 1 CPUs
[ 0.277577] PCI: Fatal: No config space access function found
[ 0.277579] PCI: setting up Xen PCI frontend stub
[ 0.277943] ACPI: Interpreter disabled.
[ 0.277947] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 0.277966] pnp: PnP ACPI: disabled
[ 0.278261] xen_mem: Initialising balloon driver.
[ 0.279111] Setting mem allocation to 2097152 kiB
[ 0.279279] PCI: System does not support PCI
[ 0.279282] PCI: System does not support PCI
[ 0.293390] NET: Registered protocol family 8
[ 0.293394] NET: Registered protocol family 20
[ 0.293447] AppArmor: AppArmor Filesystem Enabled
[ 0.293695] NET: Registered protocol family 2
[ 0.297369] Time: xen clocksource has been installed.
[ 0.329139] IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.329332] TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
[ 0.330547] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 0.330911] TCP: Hash tables configured (established 262144 bind 65536)
[ 0.330913] TCP reno registered
[ 0.341195] checking if image is initramfs... it is
[ 0.357939] Freeing initrd memory: 23692k freed
[ 0.365241] audit: initializing netlink socket (disabled)
[ 0.365256] audit(1228988849.828:1): initialized
[ 0.365431] VFS: Disk quotas dquot_6.5.1
[ 0.365444] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.365494] io scheduler noop registered
[ 0.365496] io scheduler anticipatory registered
[ 0.365498] io scheduler deadline registered
[ 0.365502] io scheduler cfq registered (default)
[ 0.365635] Xen virtual console successfully installed as xvc0
[ 0.365665] Event-channel device installed.
[ 0.371631] Successfully initialized TPM backend driver.
[ 0.378447] netfront: Initialising virtual ethernet driver.
[ 0.379147] xen-vbd: registered block device major 3
[ 0.379160] blkfront: hda: barriers enabled
[ 0.379559] hda: hda1 hda2 < hda5 >
[ 0.394525] rtc: IRQ 8 is not free.
[ 0.394573] Linux agpgart interface v0.102
[ 0.394911] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[ 0.394953] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 0.395021] PNP: No PS/2 controller found. Probing ports directly.
[ 0.395840] i8042.c: No controller found.
[ 0.397153] mice: PS/2 mouse device common for all mice
[ 0.397176] cpuidle: using governor ladder
[ 0.397221] NET: Registered protocol family 1
[ 0.397255] registered taskstats version 1
[ 0.496912] XENBUS: Device with no driver: device/console/0
[ 0.496933] Magic number: 1:252:3141
[ 0.497030] /build/buildd/linux-2.6.24/debian/build/custom-source-xen/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.497042] Freeing unused kernel memory: 220k freed
Loading, please wait...
Begin: Loading essential drivers... ...
[ 0.718644] fuse init (API version 7.9)
[ 0.741243] thermal: Unknown symbol acpi_processor_set_thermal_limit
Done.
Begin: Running /scripts/init-premount ...
Done.
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
ata_id[1212]: main: HDIO_GET_IDENTITY failed for '/dev/.tmp-3-0'
Done.
Begin: Waiting for root file system... ...
Done.
Begin: Running /scripts/local-premount ...
Done.
[ 1.362433] kjournald starting. Commit interval 5 seconds
[ 1.362441] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
Done.
* Reading files needed to boot... [ OK ]
* Setting preliminary keymap... [ OK ]
* Preparing restricted drivers... [ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
* Unable to set System Clock to: Thu Dec 11 09:47:31 UTC 2008
* Starting basic networking... [ OK ]
* Starting kernel event manager... [ OK ]
* Loading hardware drivers... ata_id[2237]: main: HDIO_GET_IDENTITY failed for '/dev/.tmp-3-0'
[ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
* Unable to set System Clock to: Thu Dec 11 09:47:32 UTC 2008
* Loading kernel modules... * Loading manual drivers... [ 2.694121] lp: driver loaded but no devices found
[ OK ]
* Setting kernel variables... [ OK ]
* Activating swap... [ OK ]
* Checking root file system... fsck 1.40.8 (13-Mar-2008)
/dev/hda1: clean, 111149/942080 files, 650438/3755185 blocks
[ OK ]
* Checking file systems... fsck 1.40.8 (13-Mar-2008)
[ OK ]
* Mounting local filesystems... [ OK ]
* Activating swapfile swap... [ OK ]
$Mounting securityfs on /sys/kernel/security: done.
Loading AppArmor profiles : done.
* Checking minimum space in /tmp... [ OK ]
* Skipping firewall: ufw (not enabled)... [ OK ]
* Configuring network interfaces... [ OK ]
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
* Starting system log daemon... [ OK ]
* Doing Wacom setup... cat: */id: No such file or directory
[ OK ]
* Starting kernel log daemon... [ OK ]
* Starting system message bus dbus [ OK ]
* Starting network connection manager NetworkManager [ OK ]
* Starting network events dispatcher NetworkManagerDispatcher [ OK ]
* Starting System Tools Backends system-tools-backends [ OK ]
* Starting Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
* Starting Common Unix Printing System: cupsd [ OK ]
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
* Starting powernowd... * CPU frequency scaling not supported... [ OK ]
* Starting DHCP D-Bus daemon dhcdbd [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting bluetooth [ OK ]
* Starting GNOME Display Manager... [ OK ]
* Starting anac(h)ronistic cron anacron [ OK ]
* Starting deferred execution scheduler atd [ OK ]
* Starting periodic command scheduler crond [ OK ]
* Checking battery state... /dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
[ OK ]
* Running local boot scripts (/etc/rc.local) [ OK ]

Ubuntu 8.04.1 boris-desktop xvc0

boris-desktop login: root
Password:
Linux boris-desktop 2.6.24-22-xen #1 SMP Mon Nov 24 21:35:54 UTC 2008 x86_64

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@boris-desktop:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:2c:8e:15
inet addr:192.168.1.63 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1642 (1.6 KB) TX bytes:4552 (4.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@boris-desktop:~# /usr/local/sbin/ethtool -K eth0 tx off
root@boris-desktop:~# apt-get remove network-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
network-manager network-manager-gnome
0 upgraded, 0 newly installed, 2 to remove and 185 not upgraded.
After this operation, 2626kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 99473 files and directories currently installed.)
Removing network-manager-gnome ...
Removing network-manager ...
* Stopping network connection manager NetworkManager [ OK ]
* Stopping network events dispatcher NetworkManagerDispatcher [ OK ]
root@boris-desktop:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

root@boris-desktop:~# cat "auto eth0" >> /etc/network/interfaces
cat: auto eth0: No such file or directory
root@boris-desktop:~# echo "auto eth0" >> /etc/network/interfaces
root@boris-desktop:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
root@boris-desktop:~# echo "iface eth0 inet dhcp" >> /etc/network/interfaces
root@boris-desktop:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
root@boris-desktop:~# /etc/init.d/networking restart
* Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.eth0.pid with pid 0
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:16:3e:2c:8e:15
Sending on LPF/eth0/00:16:3e:2c:8e:15
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPOFFER of 192.168.1.63 from 192.168.1.1
DHCPREQUEST of 192.168.1.63 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.63 from 192.168.1.1
bound to 192.168.1.63 -- renewal in 122354 seconds.
[ OK ]
root@boris-desktop:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:2c:8e:15
inet addr:192.168.1.63 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe2c:8e15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2978 (2.9 KB) TX bytes:4453 (4.3 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@boris-desktop:~#

Add to /etc/rc.local :-

/usr/local/sbin/ethtool -K eth0 tx off

to disable checksum offloading at DomU (due to "rge" Solaris Driver at Dom0) and reboot.
Set up VNC at Ubuntu Hardy PV DOMU per [1]:-











Notice that install Ubuntu HVM and runtime performance at opensolaris 2008.11 Dom0
is extremely low versus same HVM perfomance at Xen 3.3.1 openSUSE 11.1 Dom0 on
the same box with C2D E8400 and 8 GB RAM.
Actually, Linux as well as Nevada HVM DomUs demonstrate very low performance even
been installed on zvols. Paravirtual DomUs behave at opensolaris 2008.11 absolutely
normal been installed on zvol's images.

Tuesday, December 09, 2008


xVM on opensolaris 2008.11




My primary target was testing xVM performance at opensolaris 2008.11(based on 101b Nevada build). Solaris Nevada works smoothly with images located on UFS and zvols.Opensolaris 2008.11 requires only zvols as image devices for Xen Guests to be installed in reasonable time.I believe it's a known issue caused by ZFS. From my standpoint the most impressive UI feature is Package Manager. It's really helpful.


Install all members of Virtualization group via Package manager.






# cd /boot/grub/
# ln -s /rpool/boot/grub/menu.lst menu.lst

Add new entry to /boot/grub/menu.lst

title OpenSolaris 2008.11 snv_101b_rc2 X86 xVM
bootfs rpool/ROOT/opensolaris
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS

Reboot into xen kernel and activate services as advised in [1]:-

# svcadm enable store
# svcadm enable xend
# svcadm enable console
# svcadm enable domains
# svcadm enable virtd

Make sure services are running:-

# svcs -a | grep xvm
online 13:45:52 svc:/system/xvm/vnc-config:default
online 13:45:53 svc:/system/xvm/store:default
online 13:46:03 svc:/system/xvm/xend:default
online 13:46:03 svc:/system/xvm/console:default
online 13:46:03 svc:/system/xvm/virtd:default
online 13:46:04 svc:/system/xvm/domains:default

One more test

xm info

To create zpool on Intel based PC run

root@opensolaris:~# format
Searching for disks...
The device does not support mode page 3 or page 4,
or the reported geometry info is invalid.
WARNING: Disk geometry is based on capacity data.
The current rpm value 0 is invalid, adjusting it to 3600
done
c4t1d0: configured with capacity of 232.87GB
AVAILABLE DISK SELECTIONS:
0. c4t0d0
/pci@0,0/pci1043,8277@1f,2/disk@0,0
1. c4t1d0
/pci@0,0/pci1043,8277@1f,2/disk@1,0
Specify disk (enter its number): 0
selecting c4t0d0
[disk formatted]
# format>fdisk

and create second (third) partition with type "Other OS ".

Total disk size is 30401 cylinders
Cylinder size is 16065 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Active Solaris2 1 9136 9136 30
2 [-----] Other OS 9137 12136 3000 10
3 [-----] Linux native 12137 12149 13 0
4 [-----] EXT-DOS 12150 30400 18251 60



Creating zpool :-


# zpool create xvmpool c4t0d0p2 (3)
# zfs create -V 25G xvmpool/snv-disk

Log out root and run:-

$ pfexec virt-manager

Set installation partition to /dev/zvol/dsk/xvmpool/snv-disk
Attempt to use image file like /export/home/images/root.img , located on ZFS will make virt-manager
(virt-install) performance unacceptable, at least through my experience.











CentOS 5.2 PV guest snapshots:-








SNV_103 HVM been built with /dev/zvol/dsk/rpool/disk1 (zfs create -V 12G rpool/disk1)








References.
1.Getting xVM to work in Opensolaris 2008.05

Sunday, December 07, 2008


Install SNV103 PV DomU with ZFS image at Xen 3.3.1. openSUSE 11.1 Dom0 (all 64-bit)


During installation phase we would have to drop to shell and undertake some special actions to prepare runtime profile.Pygrub won't be able to load DomU utilizing ZFS based image. In particular, ZFS-ID of boot environment will be ontained to compose extra line in runtime profile.


Start install as usual via profile :-

name = 'Solaris103PV'
memory = '2048'
disk = [ 'file:/home/boris/snv103.iso,6:cdrom,r','phy:/dev/sdb12,0,w']
vif = [ 'bridge = br1' ]
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'

Select ZFS on image device and request manual reboot. At the end of package deployment phase drop to shell at DomU and run

# bootadm update-archive -R /a

Copy kernel and boot_archive off the image to Dom0

# /a/usr/bin/scp -S /a/usr/bin/ssh \
/a/platform/i86xpv/kernel/amd64/unix \
192.168.1.33:/etc/xen/nevada
# /a/usr/bin/scp -S /a/usr/bin/ssh \
/a/platform/i86pc/amd64/boot_archive \
192.168.1.33:/etc/xen/nevada

Get the ZFS-ID of the /ROOT/snv_103 zpool. First, find out the pool_guid.
Follow [1]:-

# zpool get guid rpool
# NAME PROPERTY VALUE SOURCE
rpool guid 17306096753167233998

************
Then run :-
************

bash-3.2# zdb -d -e 17306096753167233998
Dataset mos [META], ID 0, cr_txg 4, 1.74M, 131 objects
Dataset 17306096753167233998/swap [ZVOL], ID 37, cr_txg 15, 4.27M, 3 objects
Dataset 17306096753167233998/ROOT/snv_103 [ZPL], ID 57, cr_txg 31, 5.99G, 286127 objects
Dataset 17306096753167233998/ROOT [ZPL], ID 31, cr_txg 12, 18.0K, 4 objects
Dataset 17306096753167233998/dump [ZVOL], ID 43, cr_txg 18, 1.00G, 3 objects
Dataset 17306096753167233998/export/home [ZPL], ID 69, cr_txg 43, 18.0K, 4 objects
Dataset 17306096753167233998/export [ZPL], ID 63, cr_txg 40, 19.0K, 5 objects
Dataset 17306096753167233998 [ZPL], ID 16, cr_txg 1, 29.0K, 12 objects
# umount /a

******************************************************
Destroy DomU via "xm" and create runtime profile:-
******************************************************
name = "SNV103PV"
vcpus = 1
memory = "2048"
kernel = "/etc/xen/nevada/unix"
ramdisk = "/etc/xen/nevada/boot_archive"
extra = "/platform/i86xpv/kernel/amd64/unix - nowin -B bootpath=/xpvd/xdf@0:a -B console=xen -B zfs-bootfs=rpool/57"
disk = ['phy:/dev/sdb12,0,w']
vif = [ 'bridge=br1']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
*************
Then run :-
*************

dhcppc0:/etc/xen/vm # uname -a
Linux dhcppc0 2.6.27.7-4-xen #1 SMP 2008-11-25 00:02:37 +0100 x86_64 x86_64 x86_64 GNU/Linux
dhcppc0:/etc/xen/vm # xm info|grep xen_
xen_major : 3
xen_minor : 3
xen_extra : .1_18494_03-1.2
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
xen_changeset : 18494
dhcppc0:/etc/xen/vm # xm create -c snv103zfs.run
Using config file "./snv103zfs.run".
Started domain SNV103PV
v3.3.1_18494_03-1.2 chgset '18494'
SunOS Release 5.11 Version snv_103 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: dhcppc5
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)
syslogd: line 45: WARNING: loghost could not be resolved

dhcppc5 console login: root
Password:
Last login: Sun Dec 7 19:57:19 on console
Dec 8 05:17:46 dhcppc5 login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_103 November 2008
# bash
bash-3.2# df -h
Filesystem size used avail capacity Mounted on
rpool/ROOT/snv_103 15G 5.9G 7.1G 46% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 2.2G 424K 2.2G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap3.so.1
13G 5.9G 7.1G 46% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 2.2G 40K 2.2G 1% /tmp
swap 2.2G 44K 2.2G 1% /var/run
rpool/export 15G 19K 7.1G 1% /export
rpool/export/home 15G 15M 7.1G 1% /export/home
rpool 15G 29K 7.1G 1% /rpool
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=201004843 mtu 1500 index 2
inet 192.168.1.38 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:42:f9:9
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128













References
1.Installing Opensolaris 2008.11 RC2 on a Linux (RedHat/Centos) dom0

Saturday, October 25, 2008


Install Ubuntu Hardy PV DomU & VNC at Ubuntu Hardy Dom0 (all 64-bit)



This posting deals with utilizing same image device for loading HVM and PV
Ubuntu Hardy DomUs at Ubuntu Hardy Dom0 (2.6.24-21-xen #1 SMP Mon Aug 25 18:56:44 UTC 2008 x86_64 GNU/Linux). This approach allows to avoid traditional "debootstrap" procedure as well as taking a long time "apt-get install ubuntu_desktop", what is, actually, 400 MB download. It also provides a workaround to get Gnome Desktop working stable at Ubuntu PV DomU no matter on Xen Release (>=3.1.2) and OS (Solaris,Linux) running at Dom0.
Install Ubuntu Hardy HVM DomU via hvm-profile:-



root@boris-desktop:/etc/xen/vm# cat u8.cfg
kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 2048
name = "U8HVM"
vcpus = 1
vif = [ 'type=ioemu, bridge=eth0' ]
disk = [ 'phy:/dev/sda9,hda,w!','phy:/dev/loop0,hdc:cdrom,r' ]
device_model = '/usr/lib/xen/bin/qemu-dm'
vnc=1
boot='d'




**********************************
Ligin to HVM DomU and run :-
**********************************



# apt-get install linux-image-xen
# apt-get install vim
********************************************
Add one more entry to /boot/grub/menu.lst
*********************************************
default 0
# hidemenu
timeout 10

title Ubuntu 8.04.1, kernel 2.6.24-21-xen
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-xen root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro
initrd /boot/initrd.img-2.6.24-21-xen

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=d60fdbd1-29a5-452e-81b8-20af8423cb33 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
. . . . . .
:wq
Add a console on xvc0:
# sed -e ’s/tty1/xvc0/’ /etc/event.d/tty1 | tee /etc/event.d/xvc0




Shutdown HVM DomU.
Create Ubuntu PV DomU profile at Dom0, referencing same image file as Ubuntu HVM DomU:-



bash-3.2# cat u8.cfg
memory = 2048
name = “U8PV”
vif = [ 'mac=00:16:3e:00:00:00' ]
disk [ 'phy:/dev/sda9,xvda,w!']




****************
Start PV DomU
****************



# xm create -c ub8.cfg










Make sure we are running PV DomU



root@boris-desktop:/etc/xen/vm# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 5980 2 r----- 938.4
U8PV 4 2048 1 -b---- 169.4
root@boris-desktop:/etc/xen/vm# xm list -l U8PV
(domain
(domid 4)
(on_crash restart)
(uuid eee633cc-233b-c50e-b84a-5743efcd6bd4)
(bootloader_args )
(vcpus 1)
(name U8PV)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 2048)
(memory 2048)
(shadow_memory 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1224927678.38)
(cpu_time 169.670418175)
(online_vcpus 1)
(image
(linux
(kernel )
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 18446744071562067968)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564197888)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 2)
(state -b----)
(store_mfn 2209411)
(console_mfn 2209410)
(device
(vif
(mac 00:16:3e:00:00:00)
(script vif-bridge)
(uuid 1494046f-11ad-f2b0-c2b2-01d485de8997)
(backend 0)
)
)
(device
(vbd
(uname phy:/dev/sda9)
(uuid 635d0e9c-2444-c7f6-f267-42c41e576a9c)
(mode 'w!')
(dev xvda:disk)
(backend 0)
(bootable 1)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 89afbfc9-9248-5566-901d-288ccdbe24ec)
)
)
)




*********************************
When logged in as root run :-
*********************************



# apt-get remove network-manager
# vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
:wq




*****************************************************************
Obtain IP address for PV DomU without network-manager
*****************************************************************




root@boris-desktop:~# /etc/init.d/networking restart
* Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.eth0.pid with pid 0
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:16:3e:00:00:00
Sending on LPF/eth0/00:16:3e:00:00:00
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPOFFER of 192.168.1.60 from 192.168.1.1
DHCPREQUEST of 192.168.1.60 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.60 from 192.168.1.1
bound to 192.168.1.60 -- renewal in 111610 seconds.




********************************************
Setup VNC at Ubuntu Hardy PV DomU
********************************************



# apt-get install vnc4server xinetd

# vi /etc/gdm/gdm.conf
Uncomment this line
RemoteGreeter=/usr/lib/gdm/gdmlogin
Enable xdmcp, look for [xdmcp] and change Enable to true.
[xdmcp]
Enable=true
************
Restart gdm
************
# /etc/init.d/gdm restart
Setup xinetd
************************************
Create a new service file for xinetd
************************************
# vi /etc/xinetd.d/Xvnc
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -cc 3 -once -SecurityTypes=none -extension XFIXES
port = 5901
}
**************
Restart xinetd
**************
# /etc/init.d/xinetd restart







When connect via vncviewer from Dom0, getting Error Window “Gnome Setting Daemon failed to start”. To fix Gnome Setting Daemon failures to start, open vnc session with DomU ([2]) and run in gnome terminal ([3]):-
$ gconf-editor
and disable mouse and keyboard plugins.
Relogin to Ubuntu PV DomU via vncviewer.
Gnome Desktop should be working fine.








References.
1.http://blog.bashton.com/2008/running-an-ubuntu-hardy-xen-domu-under-a-centos-dom0/
2.http://lxer.com/module/newswire/view/110161/index.html
3.https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245

Monday, September 22, 2008


PV-Grub on OpenSuse 11 PV DomU at Xen 3.3 CentOS Dom0 (all 64-bit)



We use the most recent Xen 3.3 port to CentOS 5.2 via http://www.gitco.de/repo/xen3.3.0.
Regarding Xen 3.3 Feature: PV-GRUB in general, please, view
blog.xen.org


Prepare grub's /boot/grub/menu.lst at DomU side for pv-grub booting.
Actually, we need just one entry into menu.lst and it has
to be created mannualy:-



SUSE11PV:~ # cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on Mon Sep 22 12:27:54 UTC 2008
default 0
timeout 30
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate


###Don't change this comment - YaST2 identifier: Original name: linux###
title PV Xen 3.3 openSUSE 11.0 - 2.6.25.5-1.1 DomU
root (hd0,0)
kernel /boot/vmlinuz-2.6.25.5-1.1-xen root=/dev/xvda1 resume=/dev/xvda2 showopts
initrd /boot/initrd-2.6.25.5-1.1-xen




Prepare OpenSuse 11 DomU profile for pv-grub:-



[root@ServerCentOS52 vm]# cat suse.pv-grub
name = "suse-pvgrub"
memory = 2048
vcpus = 1
vfb = [ 'type=vnc' ]
disk = [ 'file:/etc/xen/SuseImage/disk0,xvda,w' ]
vif = [ "bridge=eth0" ]
kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz"
extra = "(hd0,0)/boot/grub/menu.lst"




Start DomU:-



[root@ServerCentOS52 vm]# xm create suse.pv-grub
Using config file "./suse.pv-grub".
Started domain suse-pvgrub




Open another terminal session and issue:-



# xm console suse-pvgrub




Select option:-



Booting 'PV Xen 3.3 openSUSE 11.0 - 2.6.25.5-1.1 DomU'




Booting up DomU:-



root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.25.5-1.1-xen root=/dev/xvda1 resume=/dev/xvda2 showop
ts
initrd /boot/initrd-2.6.25.5-1.1-xen

close blk: backend at /local/domain/0/backend/vbd/12/51712
Linux version 2.6.25.5-1.1-xen (geeko@buildhost) (gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) ) #1 SMP 2008-06-07 01:55:22 +0200
Command line: root=/dev/xvda1 resume=/dev/xvda2 showopts
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 0000000080800000 (usable)
end_pfn_map = 526336
early res: 0 [200000-702e57] TEXT DATA BSS
early res: 1 [703000-1528fff] Xen provided
early res: 2 [1529000-1529fff] INITMAP
early res: 3 [152a000-1932fff] PGTABLE
Zone PFN ranges:
DMA 0 -> 4096
DMA32 4096 -> 1048576
Normal 1048576 -> 1048576
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 526336
No mptable found.
PERCPU: Allocating 21568 bytes of per cpu data
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 519140
Kernel command line: root=/dev/xvda1 resume=/dev/xvda2 showopts
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 3005.554 MHz processor.
Console: colour dummy device 80x25
console [tty0] enabled
console [xvc-1] enabled
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Software IO TLB disabled
Memory: 2041020k/2105344k available (2258k kernel code, 55844k reserved, 1829k data, 224k init)
Calibrating delay using timer specific routine.. 6013.17 BogoMIPS (lpj=12026355)
Security Framework initialized
AppArmor: AppArmor initialized
AppArmor: Registered secondary security module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
, L1 D cache: 32K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
SMP alternatives: switching to UP code
Freeing SMP alternatives: 23k freed
Brought up 1 CPUs
net_namespace: 1016 bytes
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: Fatal: No config space access function found
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
PCI: System does not support PCI
PCI: System does not support PCI
AppArmor: AppArmor Filesystem Enabled
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
Unpacking initramfs... done
Freeing initrd memory: 10320k freed
audit: initializing netlink socket (disabled)
type=2000 audit(1222112227.659:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Non-volatile memory driver v1.2
Xen virtual console successfully installed as xvc0
Event-channel device installed.
Console: switching to colour frame buffer device 100x37
input: Xen Virtual Keyboard as /devices/virtual/input/input0
input: Xen Virtual Pointer as /devices/virtual/input/input1
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
cpuidle: using governor ladder
NET: Registered protocol family 1
registered taskstats version 1
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
XENBUS: Device with no driver: device/console/0
Freeing unused kernel memory: 224k freed
Write protecting the kernel read-only data: 1564k
netfront: Initialising virtual ethernet driver.
xen-vbd: registered block device major 202
xvda: xvda1 xvda2 xvda3
kjournald starting. Commit interval 5 seconds
EXT3 FS on xvda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
JBD: barrier-based sync failed on xvda1 - disabling barriers
Adding 2104472k swap on /dev/xvda2. Priority:-1 extents:1 across:2104472k
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
loop: module loaded
kjournald starting. Commit interval 5 seconds
EXT3 FS on xvda3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
fuse init (API version 7.9)
type=1505 audit(1222112229.360:2): operation="profile_load" name="/bin/ping" name2="default" pid=681
type=1505 audit(1222112229.388:3): operation="profile_load" name="/sbin/klogd" name2="default" pid=689
JBD: barrier-based sync failed on xvda1 - disabling barriers
type=1505 audit(1222112229.412:4): operation="profile_load" name="/sbin/syslog-ng" name2="default" pid=698
type=1505 audit(1222112229.432:5): operation="profile_load" name="/sbin/syslogd" name2="default" pid=700
type=1505 audit(1222112229.456:6): operation="profile_load" name="/usr/sbin/avahi-daemon" name2="default" pid=707
type=1505 audit(1222112229.484:7): operation="profile_load" name="/usr/sbin/identd" name2="default" pid=711
type=1505 audit(1222112229.500:8): operation="profile_load" name="/usr/sbin/mdnsd" name2="default" pid=719
type=1505 audit(1222112229.520:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=720
type=1505 audit(1222112229.544:10): operation="profile_load" name="/usr/sbin/ntpd" name2="default" pid=722
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
IA-32 Microcode Update Driver: v1.14a-xen
ip6_tables: (C) 2000-2006 Netfilter Core Team
ip_tables: (C) 2000-2006 Netfilter Core Team


Welcome to openSUSE 11.0 (X86-64) - Kernel 2.6.25.5-1.1-xen (xvc0).

SUSE11PV login: root
Password:
Last login: Mon Sep 22 15:22:25 EDT 2008 from console on :0
Have a lot of fun...
SUSE11PV:~ # uname -a
Linux SUSE11PV 2.6.25.5-1.1-xen #1 SMP 2008-06-07 01:55:22 +0200 x86_64 x86_64 x86_64 GNU/Linux
SUSE11PV:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 5.0G 3.3G 1.4G 71% /
udev 1.1G 88K 1.1G 1% /dev
/dev/xvda3 996M 27M 919M 3% /home
SUSE11PV:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:34:7F:A6
inet addr:192.168.1.12 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:134 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41300 (40.3 Kb) TX bytes:10830 (10.5 Kb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:200 (200.0 b) TX bytes:200 (200.0 b)







PV-Grub starting OpenSuse 11 DomU at Xen 3.3 CentOS 5.2 Dom0:-

















Open VNC connection to OpenSuse11 DomU brought up via pv-grub :-











References


1.Install Xen 3.3 on CentOS 5.2 via http://www.gitco.de/repo/xen3.3.0


Pygrub & loading OpenSuse 11 PV DomUs at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit)



Due to known issue attempt to virt-install OpenSuse 11 PV DomU at Xen 3.3 CentOS 5.2 Dom0
from nfs share fails immediately at startup. Approved procedure via Internet repositories for OpenSuse 10.3 requires internet connection speed at least 700 Kbit/sec to take reasonable time. OpenSuse 11.1 (with pygrub implemented) is due only in December 2008.
However, pygrub coming along with current Xen Release 3.3(3.2.1) does allow to load
OpenSuse 11 DomUs at CentOS 5.2 (RHEL 5.2) Dom0 with no problems. I have not made any
testing for native Xen 3.1 pygrub coming with CentOS 5.X, but there is a good chance,
that it would work as well. Schema shortly described bellow would never work vice versa unless OpenSuse 11.1 would have pygrub issue fixed.
Per release notes for OpenSuse 11.1 looks like RH PV Guests are supposed to run
at OpenSuse 11.1 via pygrub, e.g. vm-install for this quests would work via NFS shares, not only via Internet Repositories like it works at mean time



************************************************************************************
OpenSuse11 DomU profile in case of "scp" root image file to Xen 3.3 CentOS 5.2 Dom0
************************************************************************************

name="Suse11pv"
memory=2048
disk = ['tap:aio:/etc/xen/SuseImage/disk0,xvda,w']
vif =[ 'bridge=eth0']
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = "/usr/bin/pygrub"
kernel = "/boot/vmlinuz-2.6.25.5-1.1-xen"
ramdisk = "/boot/initrd-2.6.25.5-1.1-xen"
vcpus=1
on_reboot = 'restart'
on_crash = 'restart'

********************************************************************************************
OpenSuse11 DomU profile in case of sharing same disk partition with Xen 3.3 CentOS 5.2 Dom0
********************************************************************************************

name="OpenSuse11PV"
memory=2048
disk = ['phy:/dev/sdb12,xvda,w']
vif =[ 'bridge=eth0']
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = "/usr/bin/pygrub"
kernel = "/boot/vmlinuz-2.6.25.5-1.1-xen"
ramdisk = "/boot/initrd-2.6.25.5-1.1-xen"
vcpus=1
on_reboot = 'restart'
on_crash = 'restart'

*****************************************************************************************
xm list -l DomainName report in case of "scp" root image file to Xen 3.3 CentOS 5.2 Dom0
*****************************************************************************************

[root@ServerCentOS52 SuseImage]# xm list -l Suse11pv
(domain
(domid 7)
(on_crash restart)
(uuid fc53327a-3a3c-e78f-04aa-69ea5f09c1a5)
(bootloader_args -q)
(vcpus 1)
(name Suse11pv)
(on_poweroff destroy)
(on_reboot restart)
(bootloader /usr/bin/pygrub)
(maxmem 2048)
(memory 2048)
(shadow_memory 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1222093318.02)
(cpu_time 7.412679481)
(online_vcpus 1)
(image
(linux
(kernel /boot/vmlinuz-2.6.25.5-1.1-xen)
(ramdisk /boot/initrd-2.6.25.5-1.1-xen)
(device_model /usr/lib64/xen/bin/qemu-dm)
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 0)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564197888)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 2)
(state -b----)
(store_mfn 2207100)
(console_mfn 2207099)
(device
(vif
(bridge eth0)
(mac 00:16:3e:11:79:2c)
(script vif-bridge)
(uuid 216d961f-36b3-e775-1bb7-4d240c5ed360)
(backend 0)
)
)
(device (vkbd (backend 0)))
(device
(vfb
(vncunused 1)
(uuid 6b0077d3-36cb-18ba-cc02-f351ba4c30ef)
(location localhost:5900)
(type vnc)
(display :0.0)
(xauthority /tmp/.gdmUALZHU)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 48bfb279-9647-87f6-870c-b53f6d76002a)
)
)
(device
(tap
(protocol x86_64-abi)
(uuid 98bcb586-f8d6-83fb-80e3-89af668a94ad)
(dev xvda:disk)
(uname tap:aio:/etc/xen/SuseImage/disk0)
(mode w)
(backend 0)
(bootable 1)
(VDI )
)
)
)
***********************************************************************************************
xm list -l DomainName report in case of sharing same disk partition with Xen 3.3 CentOS 5.2 Dom0
***********************************************************************************************

[root@ServerCentOS52 ~]# xm list -l OpenSuse11PV
(domain
(domid 3)
(on_crash restart)
(uuid 598b5009-353d-1345-cde0-65eeccd05d6e)
(bootloader_args -q)
(vcpus 1)
(name OpenSuse11PV)
(on_poweroff destroy)
(on_reboot restart)
(bootloader /usr/bin/pygrub)
(maxmem 2048)
(memory 2048)
(shadow_memory 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1222096578.81)
(cpu_time 12.760360955)
(online_vcpus 1)
(image
(linux
(kernel /boot/vmlinuz-2.6.25.5-1.1-xen)
(ramdisk /boot/initrd-2.6.25.5-1.1-xen)
(device_model /usr/lib64/xen/bin/qemu-dm)
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 0)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564197888)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 2)
(state -b----)
(store_mfn 2205134)
(console_mfn 2205133)
(device
(vif
(bridge eth0)
(mac 00:16:3e:09:fd:f8)
(script vif-bridge)
(uuid b4ecd9f9-90d5-191a-712e-3b87b157d0f4)
(backend 0)
)
)
(device
(vbd
(protocol x86_64-abi)
(uuid 1ef01a2d-5432-6a0c-820b-bd8d6e7f1f25)
(dev xvda:disk)
(uname phy:/dev/sdb12)
(mode w)
(backend 0)
(bootable 1)
(VDI )
)
)
(device (vkbd (backend 0)))
(device
(vfb
(vncunused 1)
(uuid 9d1e5b21-e58e-e4b5-c9eb-6db6e52566f4)
(location localhost:5900)
(type vnc)
(display :0.0)
(xauthority /tmp/.gdmM56OHU)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 9a2059bc-4067-0d3f-3d41-4c879e572d50)
)
)
)




Actually any image transfered via "scp" to CentOS 5.2 Dom0 may be easily converted
to LVM for performance improvement. In case when Suse DomU is utilizing LVM for
root image two "dd" conversions might be required to transfer DomU to remote
Xen 3.3 CentOS 5.2 Dom0.















Thursday, September 11, 2008


FireFox 3.0.1 & Java Web Start on 64-bit Xen 3.3 CentOS 5.2 Dom0



This posting follows up the recent one Vncserver on SNV97 DomU at Xen 3.3 CentOS 5.2 Dom0 (64-bit) and is targeting enabling Sun's Java Web Start in FireFox 3.0.1 Web Browser with 32-bit JRE 6.0 plugin installed on 64-bit Linux.
First of all install 32-bit Sun JRE 6.0 for Linux by running
./jre-6u<version>-linux-i586-rpm.bin.
Then install FireFox 3.0.1 (32-bit) into folder /usr/tmp/firefox for instance
Create following symlink to make firefox aware of JRE :-



[root@ServerRHL52]# cd /usr/tmp/firefox/plugins
[root@ServerRHL52 plugins]# ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so \
> libjavaplugin_oji.so









Sun's test:-








Consider two samples for verification.


1. Vncserver started on SNV97 DomU allocates two ports 580(X) and 590(X),where (X) is available display number.Port 580(X) may be used for http://IP-DomU:580(X) connection to DomU , port 590(X) may be used by vncviewer IP-DomU:(X) connection.Both ways initiate loading Java Applets from DomU into Dom0.Snapshots bellow demonstrates loading VncViewer Applet via launching Firefox 3.0.1 browser to http://IP-DomU:5801.














2. Another demonstration of Java Web Start availability is running Sun Download Manager
(SDM) in browser FireFox 3.0.1.












Sunday, September 07, 2008


Vncserver on SNV97 DomU at Xen 3.3 CentOS 5.2 Dom0 (64-bit)



Sun Xvnc implementation for Nevada, committed in build 76 provides 3 options. Third one is to start vncserver by hands. It allocates two ports 580(X) and 590(X),where (X) is available display number.Port 580(X) may be used for http://IP-DomU:580(X) connection to DomU , port 590(X) may be used by vncviewer IP-DomU:(X) connection.Both ways initiate loading Java Applets from DomU into Dom0. Connection via vncviewer has been selected on CentOS 5.2 Dom0 (with Sun JDK 6.0 installed) due to issue with Java Web Start and FireFox on 64-bit Linux. By some reasons first and second options provided by official Sun Xvnc failed on SNV97 DomU, successfully installed via pygrub in text mode as usual.Following bellow is a snapshot of DomU start up.



[root@RHEL52 vm]# uname -a
Linux RHEL52 2.6.18-92.1.6.el5xen #1 SMP Wed Jun 25 14:13:10 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@RHEL52 vm]# xm info|grep xen_
xen_major : 3
xen_minor : 3
xen_extra : .0
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
xen_changeset : unavailable
[root@RHEL52 vm]# xm create -c snv97.pygrun
Using config file "./snv97.pygrun".
Started domain Solaris79PV
v3.3.0 chgset 'unavailable'
SunOS Release 5.11 Version snv_97 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
NOTICE: xdf@0: failed to read feature-barrier
Hostname: Solaris97pvm
/dev/rdsk/c0d0s7 is clean
Reading ZFS config: done.

Solaris97pvm console login: root
Password:
Last login: Sun Sep 7 15:38:08 on console
Sep 7 15:43:31 Solaris97pvm login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_97 November 2008
# bash
bash-3.2# export PATH=/opt/SUNWtvnc/bin:/usr/openwin/bin:$PATH
bash-3.2# vncserver

New 'X' desktop is Solaris97pvm:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Solaris97pvm:1.log

bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=201000843 mtu 1500 index 2
inet 192.168.1.27 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:31:51:50
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128




File ~/.vnc/xstartup generated by vncviewer in this case looks like:-



#!/bin/sh

unset SESSION_MANAGER
OS=`uname -s`
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ $OS = 'SunOS' -a -f $HOME/.dt/sessions/lastsession ]; then
exec `cat $HOME/.dt/sessions/lastsession`
fi
if [ -f /usr/dt/config/Xsession.jds ]; then
exec /usr/dt/config/Xsession.jds
else
if [ -f /usr/dt/bin/Xsession ]; then
exec /usr/dt/bin/Xsession
else
if [ -x /opt/sfw/bin/fvwm2 ]; then
/opt/sfw/bin/fvwm2
else
which fvwm2 && {
fvwm2
} || {
which twm && {
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm
} || {
echo No window manager found!
}
}
fi
fi
fi




In case of replacement packages SUNWvncviewer,SUNWxvnc from any recent Nevada build
less than 97. Standard Xvnc gets back in place. However same file xstartup in this
case looks like:-



#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &




What provides just X-terminal window instead of gnome desktop


Issue vncviewer 192.168.1.27:1 from another terminal session.




















Web Login to SNV97 DomU from Windows HVM at the same Xen 3.3 CentOS 5.2 Dom0.











Regarding same task at SNV97 Dom0 view:-
Setting up VNC on SNV97 DomU at SNV97 Dom0

Saturday, September 06, 2008


Setting up VNC on SNV97 DomU at SNV97 Dom0



Solaris97PVM console login: root
Password:
Last login: Sat Sep 6 11:41:12 on console
Sep 6 17:30:23 Solaris97PVM login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_97 November 2008
# bash
bash-3.2# export TERM=vt100
bash-3.2# export PATH=/opt/SUNWtvnc/bin:/usr/openwin/bin:$PATH
bash-3.2# echo $PATH
/opt/SUNWtvnc/bin:/usr/openwin/bin:/usr/sbin:/usr/bin
bash-3.2# vncserver

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n
xauth: creating new authority file /root/.Xauthority

New 'X' desktop is Solaris97PVM:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Solaris97PVM:1.log

bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
xnf0: flags=201000843 mtu 1500 index 2
inet 192.168.1.9 netmask ffffff00 broadcast 192.168.1.255
ether 0:16:3e:1b:cd:91
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128


bash-3.2# ps -ef | grep vnc
root 790 1 0 17:31:25 console 0:00 /opt/SUNWtvnc/bin/Xvnc :1 -desktop X -httpd /opt/SUNWtvnc/bin/../vnc/classes -a


bash-3.2# netstat -a | grep 580
*.5801 *.* 0 0 49152 0 LISTEN
ffffff014aa7d580 stream-ord 00000000 00000000 /var/run/dbus/system_bus_socket
bash-3.2#


Launch browser to http://IP-Dom0:5801, submit password and get graphical console in browser, actually Java applet "VncViewer" loaded from DomU
in browser at Dom0.























As appears vncserver also activates port 5901:-


-bash-3.2# netstat -a | grep 580
*.5801 *.* 0 0 49152 0 LISTEN
ffffff014b9f7580 stream-ord ffffff014bb12480 00000000 /var/run/hald/dbus-9fQYRGL6mm


-bash-3.2# netstat -a | grep 590
*.5901 *.* 0 0 49152 0 LISTEN
Solaris97PVM.5901 192.168.1.7.47087 49640 0 49640 0 ESTABLISHED
ffffff014bd62590 stream-ord 00000000 00000000 /var/tmp/orbit-root/linc-3b1-0-48c30efadf528


providing usual vnc connection to SNV97 DomU via 5901.


Working with with GlassFish V2 at SNV97 Dom0.