`

Set up Xen 3.4.3 Dom0 via xenified 2.6.31.12 kernel on top of Ubuntu 9.10 Server

阅读更多

Set up Xen 3.4.3 Dom0 via xenified 2.6.31.12 kernel on top of Ubuntu 9.10 Server

Following bellow is build Xen Host on top Ubuntu 9.10 Server.It is based on direct clone via “hg” and build Xen 3.4.3-rc4 from xensource.com , applying Andrew Lyon’s 2.6.31 patch set V12 to vanilla kernel 2.6.31.12 along with tuning patched kernel via “make menuconfig” and building aka Suse xenified kernel in Ubuntu 9.10 environment.Notice that forward porting of original patch set was done by Jan Beulich for 2.6.31.8 kernel on OpenSuse 11.2. Built in patched kernel open-source NVIDIA and Radeon HD drivers work just fine on Ubuntu 9.10, providing Gnome Desktop Environment right away.

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

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

# cd /usr/src/build/
# bzcat linux-2.6.31.8.tar.bz2 | tar xf -
# mkdir -p xen-patches-2.6.31-12
# cd xen-patches-2.6.31-12
# bzcat ../xen-patches-2.6.31-12.tar.bz2 | tar xf -
# cd ../linux-2.6.31.8

Run script

#!/bin/bash
for P in `ls ../xen-patches-2.6.31-12/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.31.12.img 2.6.31.12

Different option is to install pvops enabled kernel 2.6.32.9 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/xen/stable -b xen/stable

Notice :-

# git checkout origin/xen/master -b xen/master

will result building the most recent 2.31.6 version of pvops kernel. Branch above , actually is not required to be checked out . It’s default branch of “git clone”. Difference in meantime is “acpi” branch not merged yet to xen/stable. However, APIC rework has been committed for 2.6.32.9.

# make menuconfig
# make
# make modules_install install
# mkinitramfs -o /boot/initrd-2.6.32.9.img 2.6.32.9




With the most recent 2.6.32.9 i was able to enable DRM for Radeon and get positive dmesg report on F12 and Ubuntu Karmic Koala Server.





To test 2.6.31.12 xenified aka Suse kernel setup Xen 3.4.3 on to top of Ubuntu Karmic Server. First – install on Ubuntu Karmic 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.10 ( vs F12 ). Thus you won’t be able to start xend in Dom0. Same thing happens when building Xen Unstable on Ubuntu 9.10 Server.
Add entry to /boot/grub/grab.cfg:-

menuentry "Xen 3.4 / Ubuntu 9.10 kernel 2.6.31.12 xenified" {
insmod ext2
set root=(hd1,8)
multiboot (hd1,8)/boot/xen-3.4.gz
module (hd1,8)/boot/vmlinuz-2.6.31.12
module (hd1,8)/boot/initrd-2.6.31.12.img
}

and rebooted into xen host.Tested OSOL 133 PV DomU,F12 PV DomU, Ubuntu Kamic HVM and PV DomUs sharing same image device.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics