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)
)