Saturday, May 02, 2009

Debootstrap Ubuntu Jaunty PV DomU at Xen 3.3.1 F10 Dom0 ( kernel 2.6.30-rc3-tip)

Fedora 11 Xen hypervisor package contains pv_ops dom0 kernel support, ie. it is able to boot bzImage format dom0 kernels, and pv_ops sysfs memory ballooning support is included as well. These features/patches are backported from Xen 3.4 development/unstable version to Fedora's Xen 3.3.x. Xen-3.3.1-11.fc11.src.rpm may be rebuild on F10 with the most recent updates installed. Obtained set of RPMS allow to install Xen 3.3.1 Hypervisor on F10,having same features as on F11, what is actually already done by Michael Young and Pasi Kärkkäinen. However,following bellow is step by step instruction for performing backport to F10 via F11's source rpm.
Another target of posting bellow is install F10 debootstrap RPM , what allows straight
forward PV DomU install for Ubuntu Jaunty,Intrepid,Hardy Guests at Xen 3.3.1 F10 Dom0
based on the most recent pv_ops enabled kernel 2.6.30-rc3-tip obtained via Jeremy Fitzhardinge git repository.

Thanks to Michael Young for support when doing this backport :-

# yum update
# yum install glibc-devel.i386
# rpmbuild --rebuild xen-3.3.1-11.fc11.src.rpm
# cd ./rpmbuild/RPMS/x86_64
# rpm -ivh xen-debuginfo-3.3.1-11.fc10.x86_64.rpm \
xen-devel-3.3.1-11.fc10.x86_64.rpm \
xen-hypervisor-3.3.1-11.fc10.x86_64.rpm \
xen-libs-3.3.1-11.fc10.x86_64.rpm \
xen-runtime-3.3.1-11.fc10.x86_64.rpm \

Build the most recent pvops enabled kernel:-

# git clone git:// linux-2.6-xen
# cd linux-2.6-xen
# git checkout origin/xen-tip/next -b xen-tip/next

Tune kernel to support Xen in Dom0 ([1])

# make menuconfig
# make
# make modules_install install

Create a grub entry:-

title Xen 3.3.1 Fedora 10 (2.6.30-rc3-tip)
root (hd0,4)
kernel /xen-3.3.gz
module /vmlinuz-2.6.30-rc3-tip ro root=/dev/VolGroup01/LogVol00 console=tty0
module /initrd-2.6.30-rc3-tip.img

Edit /etc/inittab :


Enable services xend,xenconsoled,xenstored,libvirtd
Install debootstrap RPM:-

rpm -ivh debootstrap-1.0.10-1.fc10.noarch.rpm

Prepare LVMs for install:-

# lvcreate -n ubuntu -L12G /dev/VGxen
# lvcreate -n ubuntu-swap -L4G /dev/VGxen
# mke2fs -j /dev/VGxen/ubuntu
# mkswap /dev/VGxen/ubuntu-swap
# mkdir -p /mnt/xen
# mount /dev/VGxen/ubuntu /mnt/xen

Create missing symlink:-

# ln -s /usr/share/debootstrap/scripts/gutsy \

Deboostrap new Jaunty Guest:-

# debootstrap --arch=amd64 \
--include=linux-image-server,grub \
--components=main,universe,multiverse jaunty \

Then follow [2]
Reboot into Xen Host via new grub entry and start new
Ubuntu Jaunty Server PV DomU via profile :-

bootloader = '/usr/bin/pygrub'
memory = 2048
name = "Ubuntu9.04PV"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:/dev/VGxen/ubuntu,xvda1,w', 'phy:/dev/VGxen/ubuntu-swap,xvdb1,w' ]

Tuning /etc/rc.local at DomU

Connecting to Ubuntu 9.04 Server PV DomU via remote vinagre client:-

1.Setup Xen Unstable Dom0 with 2.6.29-tip pvops enabled kernel on top Ubuntu Intrepid Server (64-bit)
2. Debootstrap Intrepid Server PV DomU at Xen 3.3.1 CentOS 5.2 Dom0 (all 64-bit)