Building Xen 3.4.1 Dom0 via xenified 2.6.30.2 kernel on top Ubuntu 9.04 Server

Following bellow is build Xen Host on top Ubuntu 9.04 Server.It is based on direct clone via “hg” and build Xen 3.4.1-rc8 from xensource.com , applying Andrew Lyon’s 2.6.30 patch set V3 to vanilla kernel 2.6.30.2 along with tuning patched kernel via “make menuconfig” and building aka Suse xenified kernel in Ubuntu 9.04 environment. I would call it straight forward Xen builds vs Nathan’s Blog way of mind. Built in patched kernel open-source NVIDIA drivers work just fine on Ubuntu 9.04, providing Gnome Desktop Environment right away.
*********************************************************************
Update on 08/13/2009 Please view :-
Gentoo ebuilds and patches for Xen kernel
*********************************************************************

# cd /usr/src/build/
# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.30-3.tar.bz2

4.Untar linux-2.6.30.2.tar.bz2 and apply patches.

# cd /usr/src/build/
# bzcat linux-2.6.30.2.tar.bz2 | tar xf -
# mkdir -p patchesV3
# cd patchesV3
# bzcat ../xen-patches-2.6.30-3.tar.bz2 | tar xf -
# cd ../linux-2.6.30.2

Run script

#!/bin/bash
for P in `ls ../patchesV3/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

Processor type and features ->
[*] Symmetric multi-processing support
[ ] Support sparse irq numbering
[*] Enable MPS table
[*] Enable Xen compatible kernel
[*] Single-depth WCHAN output
Processor family (Generic-x86-64) --->
[ ] Configure Maximum number of SMP Processors and NUMA Nodes
(64) Maximum number of CPUs
Preemption Model (No Forced Preemption (Server)) --->
[ ] Machine Check Exception

Device Drivers -> XEN
[*] Privileged Guest (domain 0)
<*> Backend driver support
<*> Block-device backend driver
<*> Block-device tap backend driver
<*> Block-device tap backend driver 2
>*> Network-device backend driver
(8) Maximum simultaneous transmit requests (as a power of 2)
[ ] Pipelined transmitter (DANGEROUS)
< > Network-device loopback driver
<*> PCI-device backend driver
PCI Backend Mode (Virtual PCI) --->
[ ] PCI Backend Debugging
< > TPM-device backend driver
<M> SCSI backend driver
<M> USB backend driver
<M> Block-device frontend driver
<M> Network-device frontend driver
<M> Network-device frontend driver acceleration for Solarflare NICs
<M> SCSI frontend driver
<M> USB frontend driver
[*] Taking the HCD statistics (for debug)
<*> User-space granted page access driver
<*> Framebuffer-device frontend driver








# make -j(x)(number_of_cores)
# make modules_install install
# mkinitramfs -o /boot/initrd-2.6.30.2.img 2.6.30.2

Different option is to install pvops enabled kernel 2.6.31-rc3 via download :-

# 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/rebase/master -b rebase/master
# make menuconfig
# make
# make modules_install install
# mkinitramfs -o /boot/initrd-2.6.31-rc3.img 2.6.31-rc3

To test 2.6.30.2 xenified kernel setup Xen 3.4.1 on to top of Ubuntu Jaunty Server. First – install on Uubuntu 9.04 Server all packages required for Xen build along with Ubuntu-Desktop ( via tasksel). Of course, Xen Host doesn’t require GUI. Install Ubuntu-Desktop just make work comfortable and faster.

apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
python2.6-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc

Second – build Xen from source

# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
# cd xen-3.4-testing.hg
Set in Config.mk
PYTHON = python
PYTHON_PREFIX_ARG =
# make install-xen
# make install-tools
# make install-stubdom

Tuning Config.mk results Xen packages to be placed into /usr/local/lib/python2.6/dist-packages due to Changeset 19594 in xen-3.4-testing.hg. Otherwise, Xen packages would go to /usr/lib/python2.6/site-packages, which is not default location for python 2.6 on Ubuntu 9.04 ( vs F11 ). Thus you won’t be able to start xend in Dom0. Same thing happens when building Xen Unstable on Ubuntu 9.04 Server.
Add entry to /boot/grub/menu.lst:-

title Xen 3.4 / Ubuntu 9.04 kernel 2.6.30.2
uuid 34d2c0bd-fe30-47e0-990e-4921caf1e845
kernel /boot/xen-3.4.gz
module /boot/vmlinuz-2.6.30.2 root=/dev/sdb2 ro console=tty0
module /boot/initrd-2.6.30.2.img

and rebooted into xen host.Tested OSOL 2009.06 loaded with PV Drivers in HVM and STUB domains OK , also tested OSOL 2009.06 PV DomU ,F11 PV DomU, Ubuntu Jaunty HVM and PV DomUs sharing same image device.









Update OSOL 2009.06 PV DomU







References
1.Gentoo-xen-kernel
2.2.6.30 dom0 Xen patches

11 Responses to “Building Xen 3.4.1 Dom0 via xenified 2.6.30.2 kernel on top Ubuntu 9.04 Server”

  1. krominet Says:

    hello
    i don’t understand,
    the second way don’t produces a linux dom0 2.6.30.1
    kernel but this ones :
    ls /usr/lib/xen/boot/ -tl
    total 3648
    -rw-r–r– 1 root root 757380 2009-07-23 20:32 pv-grub-x86_32.gz
    -rw-r–r– 1 root root 1869290 2009-07-23 20:31 ioemu-stubdom.gz
    -rw-r–r– 1 root root 787028 2009-07-23 20:31 pv-grub-x86_64.gz
    -rw-r–r– 1 root root 295416 2009-07-23 20:27 hvmloader

    where is my dom0 ?

  2. dbaxps Says:

    Linux xenified kernel 2.6.30.1 is located under /boot, after you issued
    # make install_modules install

    What kind of kernel you expect to find under /usr/lib/xen/boot/ ?
    Target folder for :-
    # make install-xen
    # make install-stubdom

  3. krominet Says:

    ok ,
    i forgot this step …

    but what are the files in /usr/lib/xen/boot/ ?


    i compiled 2.6.30.1 with patches but my computer don’t boot (xen starts, but dom0 is nowhere, no scree, boot loops)

  4. dbaxps Says:

    Check your Grub Entry :

    title Xen 3.4 / Ubuntu 9.04 kernel 2.6.30.1
    # uuid 34d2c0bd-fe30-47e0-990e-4921caf1e845
    kernel /boot/xen-3.4.gz
    module /boot/vmlinuz-2.6.30.1 root=/dev/sda14 ro console=tty0
    module /boot/initrd-2.6.30.1.img

    Specially root= ? and presence xenified /boot/vmlinuz-2.6.30.1 and /boot/initrd-2.6.30.1.img

  5. krominet Says:

    i want to have
    xen3.4 stable version (official tarball)
    linux kernel 2.6.30 lastest stable (vanilla?)
    ubuntu 9.04 server
    on
    nvidia motherbord amd64 phenom II processor …

  6. dbaxps Says:

    > xen3.4 stable version (official tarball)
    http://www.xen.org/download/
    However, i would recommend wait until 3.4.1 official tarball. It’s up to you.
    >linux kernel 2.6.30 lastest stable (vanilla?)
    http://www.icewalkers.com/Linux/Software/515380/Linux-Kernel-2.6.html
    >ubuntu 9.04 server
    http://www.ubuntu.com/getubuntu/download-server

    Personally, i don’t like and don’t assemble for myself AMD&NVIDIA Boards based boxes. However,this hardware works for Xen and is very popular.

  7. krominet Says:

    thank’s a lot ,
    my last try was with theses ..

    but i am stopping on the resulting dom0 ….

    my unique success was with your post “Setup Fedora 11 PV DomU at Xen 3.4.1 Dom0 (kernel 2.6.30-rc6-tip) on top of Fedora 11″ applied to Ubuntu
    but without tty console, just a gui one.

  8. dbaxps Says:

    If you want send me your step by step actions on Ubuntu 9.04 server. E-mail : bderzhavets@yahoo.com

  9. Setup Xen 3.4.1 Dom0 on top of Ubuntu 9.04 Server via Marc – A. Dahlhaus’s UDEV patch « Xen Virtualization on Linux and Solaris Says:

    [...] patches set # wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.30-3.tar.bz2 followed by building 2.6.30.2 xenified kernel # make menuconfig # make -j(x)(number_of_cores) # make modules_install install # mkinitramfs -o [...]

  10. SK Says:

    Hi,

    when i try this, i get:
    LD .tmp_vmlinux1
    ld: kernel image bigger than KERNEL_IMAGE_SIZE
    ld: kernel image bigger than KERNEL_IMAGE_SIZE
    ld: kernel image bigger than KERNEL_IMAGE_SIZE

    How can i solve this?

  11. BicoTech » Running Xen 3.4.1 with TXT on Ubuntu Server 9.04 Says:

    [...] the instructions here to build a xenified kernel (2.6.30.2) (via the first [...]

Leave a Reply