Monday, September 22, 2008


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.