Sunday, October 4, 2009

Installing Xen 3.4.1

Recently, there was need to install Xen on my laptop for project work.

Xen 3.3 is present in the ubuntu repositories and installation is very straight forward.

If you plan to use Xen 3.3, then the task is extremly easy.

Steps :

1.Installing the Xen hypervisor.

sudo apt-get install ubuntu-xen-desktop

2. Installing a Dom0 kernel. There are various options available.
i) You can either use the 2.6.18.8 xenified kernel available on the official website. Get it here.
ii) You can download Debian xenified kernel from here and the modules for the kernel from here.
iii) You can use download a vanilla kernel from here and patch it to work as a Dom0. You can get the patches here. Patches for version 2.6.29-6 are stable.
iv) You can download a vanilla kernel and configure it as a Dom0 using PVOPS. (There are still quite a few issues with this.)

3. Done.

Installing Xen 3.4.1 :

Detailed steps :

I am describing how to install Xen 3.4.1 from source and using the Debian xenified kernel (2.6.26) as Dom0. I compiled the 2.6.18.8 xenified kernel, but my keyboard would become unusable. I also tried patching the vanilla kernel, but ran into some problems. So I settled for the Debian xenified kernel.

Step 1: Satisfying the dependencies.

Special thanks to Furquan Shaikh, my senior, for providing me a comprehensive list of all the dependencies.

$ sudo apt-get install gcc make binutils zlib1g-dev pyhton-dev python2.6-dev python-opnessl libncurses5-dev libssl-dev xorg-dev bridge-utils iproute udev tetex-base tetex-bin latex-make texi2html texinfo texlive texlive-base gawk gettext-kde


Alternatively, you can automate the process using :
$ sudo apt-get build-dep package-anme


For more info on this, click here and here
Thanks to CDK :-)

will install all the required dependencies.



Step 2 : Downloading the latest Xen source. You can download the source from here.

Step 3 : Extract the source into a suitable directory. Then
i) # make install-xen
ii) # make install-tools
iii)# make install-stubdom

If all the dependencies were satisfied, step 3 should not give any problems at all.

Step 4 : The packages for Dom0 Debian kernel can be obtained from here and here.

Once downloaded, install the kernel using :

$ sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-19_i386.deb linux-modules-2.6.26-2-xen-686_2.6.26-19_i386.deb

This installs the Dom0 kernel and also updates the grub entries.

This completes installation of the hypervisor and the Dom0. Since the Dom0 kernel is 2.6.26, make sure that your root partition is not ext4. ext4 support was included since kernel 2.6.28.

Now, reboot your computer, you should boot into the Dom0 kernel if everything went right. :-)

I ran into some problems while booting the Dom0 kernel. I am posting them here.

No comments:

Post a Comment