Set up XenLinux kernel 2.6.34.7 aka Suse under Xen 4.0.1 on top of F14

Straight forward attempt to load 2.6.34.7 kernel xenified aka Suse under Fedora’s 14 Xen 4.0.1 generates following output to console :-

Starting udev: udevd-work[591]: kernel-provided name 'pci_iomul' and NAME= 'xen/pci_iomul' disagree, please use SYMLINK+= or change the kernel to provide the proper name

udevd-work[539]: kernel-provided name 'evtchn' and NAME= 'xen/evtchn' disagree, please use SYMLINK+= or change the kernel to provide the proper name

Situation described in [1] for pvops kernel on May 26 2010 now occurs for XenLinux kernel. In case [1],[2] all pvops xen backend devices have been renamed like xen_*. To get rid of messages above it’s also possible via patch xen-backend.rules keeping kernel’s names for xen backend devices the same

--- a/tools/hotplug/Linux/xen-backend.rules	2010-10-25 00:50:07.812223772 +0400
+++ b/tools/hotplug/Linux/xen-backend.rules	2010-10-24 23:58:22.000000000 +0400
@@ -6,6 +6,8 @@
 SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ACTION=="offline", RUN+="$env{script} offline"
 SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}"
 SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
-KERNEL=="evtchn", NAME="xen/%k"
+KERNEL=="evtchn", SYMLINK+="xen/%k"
 KERNEL=="blktap[0-9]*", NAME="xen/%k"
-KERNEL=="pci_iomul", NAME="xen/%k"
+KERNEL=="pci_iomul", SYMLINK+="xen/%k"
+KERNEL=="gntdev", SYMLINK+="xen/%k"
+KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule"

Download from the Net xen-4.0.1-6.fc14.src.rpm and install it. Add patch above as udev-rules.patch to /root/rpmbuild/SOURCES
folder and update /root/rpmbuild/SPECS/xen.spec correspondently to process this patch. Install ( or update) Xen 4.0.1 on F14 via

yum install xen-4.0.1-7.fc14.x86_64.rpm \
xen-debuginfo-4.0.1-7.fc14.x86_64.rpm \
xen-devel-4.0.1-7.fc14.x86_64.rpm \
xen-doc-4.0.1-7.fc14.x86_64.rpm \
xen-hypervisor-4.0.1-7.fc14.x86_64.rpm \
xen-libs-4.0.1-7.fc14.x86_64.rpm \
xen-licenses-4.0.1-7.fc14.x86_64.rpm \
xen-runtime-4.0.1-7.fc14.x86_64.rpm

Build 2.6.34.7 xenified aka Suse kernel. Download Andrew Lyon’s rebased patches set V.5 (2.6.34)

# cd /usr/src/xenLinux/
# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.34-5.tar.bz2

Untar linux-2.6.34.7.tar.bz2 and apply patches.

# cd /usr/src/xenLinux/
# bzcat linux-2.6.34.7.tar.bz2 | tar xf -
# mkdir -p xen-patches-2.6.34-5
# cd xen-patches-2.6.34-5
# bzcat ../xen-patches-2.6.34-5.tar.bz2 | tar xf -
# cd ../linux-2.6.34.7

Run script

#!/bin/bash
for P in `ls ../xen-patches-2.6.34-5/6*.patch1 | sort `
do
patch -p1 -s -i $P
if [ $? = 0 ]; then
echo $P applied
else
echo "Error processing "$P
exit 1
fi
done

Build kernel :-

# make menuconfig
# make -j(x)(number_of_cores)
# make modules_install install
# dracut -f /boot/initramfs-2.6.34.7-0.5-xen.img 2.6.34.7-0.5-xen







Get .config file for x86_64

Modify /etc/rc.local as follows

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if (uname -r |grep 2.6.34.7-0.5-xen) ; then
modprobe evtchn
modprobe blktap
modprobe blkbk
modprobe xenblk
modprobe netbk
modprobe gntdev
modprobe usbbk
fi
touch /var/lock/subsys/local

Setup Libvirt 0.8.3 :-

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

Reboot into Xen Environment :-

title Xen 4.0.1 Fedora (2.6.34.7-0.5-xen) (/dev/sda9)
root (hd0,8)
kernel /xen.gz dom0_mem=1024M
module /vmlinuz-2.6.34.7-0.5-xen ro root=/dev/mapper/vg_fedora14-lv_root LANG=US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us
module /initramfs-2.6.34.7-0.5-xen.img

Verify environment :-

[root@fedora14 ~]# ls -l /dev/xen
total 0
lrwxrwxrwx 1 root root 9 Oct 25 17:48 evtchn -> ../evtchn
lrwxrwxrwx 1 root root 9 Oct 25 17:48 gntdev -> ../gntdev
lrwxrwxrwx 1 root root 12 Oct 25 17:48 pci_iomul -> ../pci_iomul

[root@fedora14 ~]# xm info
host : fedora14
release : 2.6.34.7-0.5-xen
version : #3 SMP Mon Oct 25 13:29:54 MSD 2010
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 2833
hw_caps : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 7083
node_to_cpu : node0:0-3
node_to_memory : node0:7083
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
xen_extra : .1
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 : unavailable
xen_commandline : dom0_mem=1024M
cc_compiler : gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Mon Oct 25 12:12:09 MSD 2010
xend_config_format : 4

[root@fedora14 ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.90e6ba2d11eb no eth0
virbr0 8000.000000000000 yes




References
1.http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01310.html
2.http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01379.html

About these ads

2 Responses to Set up XenLinux kernel 2.6.34.7 aka Suse under Xen 4.0.1 on top of F14

  1. xmcdeltatt says:

    Thank you for informing us…

  2. Hi, of course this post is genuinely pleasant and I have learned lot of things from it concerning blogging.
    thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: