Pygrub & install CentOS 5.2 PV DomU at Xen 3.2 Ubuntu Hardy Dom0 via local HTTP Server (all 64-bit)

Due to known bug virt-install was broken on Ubuntu 8.04 since day of it’s GA and never has been fixed as far as to my knowledge. However, xen-enabled ISO’s like RH’s ones allow to perform PV Guest install via pygrub and repository placed on Apache Server running at Dom0. Notice, that virtual frame buffer would work fine for CentOS PV at
Ubuntu Hardy Dom0 (2.6.24-21-xen). Setup Apache at Ubuntu Hardy Dom0.
# apt-get install apache2
# losetup /dev/loop0 /etc/xen/isos/rhel52.iso
# mkdir -p /var/www/rhel
# mount -o loop /etc//xen/isos/rhel52.iso /var/www/rhel
Installation profile :-
root@boris-desktop:/etc/xen/vm# cat centos52.cfg
name=”RHEL52PV”
memory=2048
disk = ['phy:/dev/loop0,hdc:cdrom,r',
'phy:/dev/sdb14,xvda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]
bootloader = “/usr/bin/pygrub”
kernel = “/images/xen/vmlinuz”
ramdisk = “/images/xen/initrd.img”
vcpus=1
on_reboot = ‘restart’
on_crash = ‘restart’
Proceed with install :-
# xm create centos52.cfg
# vncviewer localhost:0













When DomU will attempt to reboot run :-
# xm destroy RHEL52PV
and switch to runtime profile.
Runtime profile:-
root@boris-desktop:/etc/xen/vm# cat centos52.pyrun
name=”RHEL52PV”
memory=2048
disk = ['phy:/dev/sdb14,xvda,w' ]
vif = [ 'mac=00:16:3e:4a:f5:00, bridge=eth0', ]
vfb = [ 'type=vnc,vncunused=1' ]

Run :-
# xm create centos52.pyrun
# vncviewer localhost:0

Setup VNC at DomU as follows :-
# mkdir .vnc
# cd .vnc
# vncserver :1
Vnc password will be requested by the last command.
Edit ~/.vnc/xstartup and uncomment first two lines.
Make this file as follows bellow:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &
Make following changes to /etc/sysconfig/vncservers file:-
VNCSERVERS=”1:root”
VNCSERVERARGS[1]=”-geometry 1024×768″
Then run:-
# chkconfig vncserver on
# reboot







Actually, vncserver setup is not required. Changing initdefault from 3 to 5 in /etc/inittab will start Gnome or KDE login automatically via vfb.
# xm create centos52.pyrun
# vncviewer localhost:0







Notice , that F7,F8 PV DomU may be setup at Xen 3.2 Ubuntu Hardy Dom0 in
similar way.

2 Responses to “Pygrub & install CentOS 5.2 PV DomU at Xen 3.2 Ubuntu Hardy Dom0 via local HTTP Server (all 64-bit)”

  1. Gyger Says:

    Hi wunderfull blog thanks. I search the rhel5.2.iso? Can download the .iso in the blog?
    thanks

    Roman

  2. dbaxps Says:

    Roman,
    Place in google search “Download CentOS 5.2″. You’ll find a lot of mirrors.;)
    I just named CentOS 5.2 ISO rhel52.iso. Nothing else.
    Blog is not a mirror. Sorry.

Leave a Reply