Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Anonymous (not registered) on Wed, 2006-01-11 21:17.

Falko has done a brilliant job with this Howto. Apart from very minor things such as not mounting devpts after chrooting, it worked without a hitch. I've pasted a slightly modified version of section 3 below to show how I installed Xen 3.0.0 using Falko's Howto.

cheers,

Hizar

3.2 Installing From The Sources

Run the following commands:

apt-get remove exim4 exim4-base lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig
apt-get install iproute bridge-utils python-twisted gcc-3.3 binutils make libcurl3-dev zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap libcurl-dev libncurses5-dev
(1 line!)
cd ~
mkdir xen
cd xen
mkdir archive
cd archive

3.2.1 Install Xen

Now execute these commands:

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.0-src.tgz
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

cd ..

tar -xvzf archive/xen-unstable.7-src.tgz
tar -xvjf archive/linux-2.6.12.tar.bz2

cd xen-unstable
make world

make install
sh ./install.sh

Now Xen is installed. In order to start the Xen services at boot time, do the following:

update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20

3.2.2 Compile A New dom0 Kernel

Next we compile a new dom0 kernel with Xen-, iptables-, quota-, and dummy support. The kernel will be installed to ~/xen/install so that we can save it for other machines. From ~/xen/install we will install it to the real locations. Xen works with kernel 2.6.11, so I take the latest 2.6.12 kernel (2.6.12) instead of newer kernels, e.g. 2.6.14.

cd ..
mv /lib/tls /lib/tls.disabled
cp -al linux-2.6.12 linux-2.6.12-xen0
cd xen-unstable/linux-2.6-xen-sparse/
./mkbuildtree ../../linux-2.6.12-xen0/
cd ../..
echo "-xen0" > linux-2.6.12-xen0/localversion-xen
diff -Naur linux-2.6.12 linux-2.6.12-xen0 > archive/linux-2.6.12-xen0.patch

cd linux-2.6.12
patch -p1 < ../archive/linux-2.6.12-xen0.patch

3.2.2.1 Apply additional patches for Xen 3.0 (unstable) for dom0 Kernel

Patch –p1 < ~/xen/xen-unstable/patches/linux-2.6.12/smp-alts.patch

Patch –p1 < ~/xen/xen-unstable/patches/linux-2.6.12/rcu-nohz.patch

Patch –p1 < ~/xen/xen-unstable/patches/linux-2.6.12/pmd-shared.patch

Patch –p1 < ~/xen/xen-unstable/patches/linux-2.6.12/net-csum.patch

Patch –p1 < ~/xen/xen-unstable/patches/linux-2.6.12/cpu-hotplug-init.patch

cd ../
mkdir install
cd linux-2.6.12-xen0
cp arch/xen/configs/xen0_defconfig .config
ARCH=xen; INSTALL_PATH=../install; INSTALL_MOD_PATH=../install
export ARCH INSTALL_PATH INSTALL_MOD_PATH
make oldconfig
make menuconfig

In the kernel configuration menu that shows up we have to enable quota, iptables and the dummy network driver as modules. This is where you enable these modules:

File systems --> [*] Quota support
<M> Old quota format support
<M> Quota format v2 support

Device Drivers ---> Networking support ---> <M> Dummy net driver support

Device Drivers ---> Networking support ---> Networking options ---> [*] Network packet filtering (replaces ipchains) ---> IP: Netfilter Configuration ---> <M> IP tables support (required for filtering/masq/NAT)

[*] means: build into the kernel statically.
<M>
means: build as a kernel module.

Now we install the kernel to ~/xen/install:

make modules
make modules_install
make install

Finally, we copy the kernel to the "real" locations:

cd ../install/
cp boot/* /boot
cp -r lib/modules/2.6.12-xen0/ /lib/modules
cp -r usr/include/xen /usr/include

3.2.3 Configure The Bootloader And Reboot

I configured my kernel with SMP support, hence the name I have given my kernel. Make sure you change the other settings to suit as per falko’s howto.

title Xen 3.0.0 Debian SID dom0 2.6.12-6 SMP

root (hd0,0)

kernel /xen.gz dom0_mem=1024M vga=791

module /vmlinuz-2.6.12.6-xen0 root=/dev/hde2 ro console=tty0

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.