Completely functional virsh (Libvirt 0.1.7-15) & GRUB2 Support at Xen 3.4.3 (pvops 2.6.32.9) on top of F12

Recent pulling GRUB2 supporting CSs into xen-3.4-testing.hg immediately makes sense to build xen 3.4.3-2.fc12.src.rpm to be able to set up current version of 3.4.3 Xen Hypervisor on Fedora 12 working pretty smoothly with Libvirt packages ( vs Xen 4.0) and the at same time supporting GRUB2 PV DomUs , say Ubuntu 9.10 Server or Debian Squeeze. Download xen-3.4.2-2.fc13.src.rpm

# rpm -iv xen-3.4.2-2.fc13.src.rpm
# hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
# cp -R xen-3.4-testing.hg xen-3.4.3
# cd xen-3.4.3
# git clone git://xenbits.xensource.com/qemu-xen-3.4-testing.git qemu-xen.git
# cp qemu-xen.git.tar.gz /root/rpmbuild/SOURCES/qemu-xen.git.xen-3.4.3-rc3.tar.gz
# cd ..
# cp xen-3.4.3.tar.gz /root/rpmbuild/SOURCES/xen-3.4.3.tar.gz

Place also localqemu-xen.patch into SOURCES :

[root@fedora12a SOURCES]# cat localqemu-xen.patch
--- Config.mk.orig 2010-03-03 13:51:45.103040705 +0300
+++ Config.mk 2010-03-03 13:53:55.051793198 +0300
@@ -122,8 +122,8 @@

# Specify which qemu-dm to use. This may be `ioemu' to use the old
# Mercurial in-tree version, or a local directory, or a git URL.
-# CONFIG_QEMU ?= ../qemu-xen.git
-CONFIG_QEMU ?= $(QEMU_REMOTE)
+CONFIG_QEMU ?= ../qemu-xen.git
+#CONFIG_QEMU ?= $(QEMU_REMOTE)

QEMU_TAG := xen-3.4.3-rc3

Now cd ../SPECS and modify xen.spec as follows :

Version: 3.4.3
. . .
Source36: qemu-xen.git.xen-3.4.3-rc3.tar.gz
. . .
Patch16: localqemu-xen.patch
. . . .
%patch16 -p1

Build
# rpmbuild -ba ./xen.spec
# cd ../RPMS/x86_64
Expected result

[root@fedora12a x86_64]# ls -l *.rpm
-rw-r--r-- 1 root root 918248 2010-03-03 17:34 xen-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 1079572 2010-03-03 17:34 xen-debuginfo-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 237716 2010-03-03 17:34 xen-devel-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 854192 2010-03-03 17:34 xen-doc-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 3023336 2010-03-03 17:34 xen-hypervisor-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 168848 2010-03-03 17:34 xen-libs-3.4.3-2.fc12.x86_64.rpm
-rw-r--r-- 1 root root 4244188 2010-03-03 17:34 xen-runtime-3.4.3-2.fc12.x86_64.rpm

Now install current Xen 3.4.3 Hypervisor on Fedora12 and proceed as usual.

yum install xen-3.4.3-2.fc12.x86_64.rpm \
xen-debuginfo-3.4.3-2.fc12.x86_64.rpm \
xen-devel-3.4.3-2.fc12.x86_64.rpm \
xen-doc-3.4.3-2.fc12.x86_64.rpm \
xen-hypervisor-3.4.3-2.fc12.x86_64.rpm \
xen-libs-3.4.3-2.fc12.x86_64.rpm \
xen-runtime-3.4.3-2.fc12.x86_64.rpm

Install Libvirt

# yum install libvirt libvirt-python python-virtinst \
virt-manager virt-viewer

PVOPS kernel 2.6.32.9 has been installed via Jeremy Fitzhardinge
Git Repository to support Xen 3.4.3 Dom0.

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# git checkout origin/xen/stable -b xen/stable
# make menuconfig ( setup Xen Dom0 support)
# make -j(x)(number_of_kernels)
# make modules_install install

Reboot in Xen environment

host : fedora12a
release : 2.6.32.9
version : #1 SMP Sun Feb 28 11:42:51 MSK 2010
machine : x86_64
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2999
hw_caps : bfebfbff:20100800:00000000:00000140:0008e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8191
free_memory : 4105
node_to_cpu : node0:0-1
node_to_memory : node0:4105
xen_major : 3
xen_minor : 4
xen_extra : .3-rc4-pre
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
platform_params : virt_start=0xffff800000000000
xen_changeset : Tue Mar 02 19:22:22 2010 +0000 19913:6063c16aeeaa
cc_compiler : gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Wed Mar 3 17:31:45 MSK 2010
xend_config_format : 4

Now we have built environment allows install OSOL133 via virsh ( been built against Libvirt 0.1.7) and the time have Ubuntu Karmic Koala HVM and PV DomUs installed at Xen 3.4.3 Dom0 and sharing the same image device. View :-
Set up OSOL PV Guests (build<=131) via virsh on Xen 3.4.3 Dom0 on top of Ubuntu 9.10 Server
Set up Ubuntu Karmic Server (Grub2) PV Guest at Xen 4.0-rc4 (2.6.32 pvops) on top of Fedora12





One Response to Completely functional virsh (Libvirt 0.1.7-15) & GRUB2 Support at Xen 3.4.3 (pvops 2.6.32.9) on top of F12

  1. Hey there! Would youu mind if I share your blog with my zynga
    group? There’s a lot of people that I think would really enjoy your content.

    Please let me know. Thank you

Leave a comment