Step by Step guide to using Xen with Ubuntu Intrepid and Juanty - How to Set Up Xen Dom0 on Jaunty Jakalope 9.04
Related Articles about Ubuntu Xen
- Installing and Running Xen DomU Jaunty on Dom0 Ubuntu Juanty
- Compiling a Xen Dom0 Kernel for Ubuntu Jaunty
Introduction
Distribution: Ubuntu 9.04 (Jaunty Jackalope) 9.04 - Should also work with Ubuntu 8.10 (Intrepid Ibex)
This is tried and tested on a 32bit machine. I cannot use KVM with this machine as virtualization extensions are not supported. While this machine was built before Intel or AMD had introduced their virtualizaion extensions, I notice that even very new machines (such as laptops, netbooks and so on) are being sold with CPUs that don't have these extensions. For this reason alone KVM cannot be the only virtualization solution available on linux. For me, as I already have quite a bit of experience with Xen, Xen continues to be the best option.
Installing a Kernel Dom0 that works
To get started you will need a Debian Dom0 Kernel. There kernel I used is this one: linux-image-2.6.26-2-xen-686_2.6.26-15_i386.deb
Download from here:
Kernel: http://packages.debian.org/lenny/i386/linux-image-2.6.26-2-xen-686/download
Modules: http://packages.debian.org/lenny/i386/linux-modules-2.6.26-2-xen-686/download
Then install using
sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb linux-modules-2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb
Install Xen Hypervisor and tools
Obviously, in order to get Xen installed, I installed the latest versions of Xen available in the Xen repository, like as follows:
From the menus choose to System -> Administration -> Software Sources you will see several check boxes.
- Canonical-supported Open Source software (main)
- Community-maintained Open Source software (universe)
- Proprietary drivers for devices (restricted)
- Software restricted by copyright or legal issues (multiverse)
you should checked all these 4 boxes then click 'Close'. You should see a box that says "The information about available software is out of date". Click on the reload button. When these boxes have gone you should be able to use:
sudo apt-get install python2.5 ubuntu-xen-desktop
Configuring the bootloader
I use grub as my bootloader, so the entry in menu.lst to load and run Xen looks like this:
title Xen 3.3 / Ubuntu 9.04, kernel 2.6.26-2-xen-686
uuid bd2c08f6-e705-4c85-8fdb-aa884ca8a0b7
kernel /xen-3.3.gz
module /vmlinuz-2.6.26-2-xen-686 root=UUID=c397979f-01e0-4180-83eb-8c9324fced1e ro console=tty0
module /initrd.img-2.6.26-2-xen-686
quiet
If you are lucky, when you install the kernel and modules using dpkg -i, the utility grub-update should automatically create the right menu entry. root= should be pointing to the correct file system.
Getting Dom0 networking running
The key to getting the network running is removing the Ubuntu network manager
sudo apt-get remove network-manager
then update the file /etc/network/interfaces to look like this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
This should work fine for most people who have DHCP server running which is common in both a corporate environment and an environment where you have an ADSL router running.
Configuring and Installing DomU clients
Creating New DomU Clients
If you would like to run Jaunty DomU clients on your Ubuntu Dom0 machine, I have written another article on how to create DomU images using the Xen tool xen-create-image. This tool provides a largely automated way of creating the disk images and the configuration files required to run Jaunty DomU images. You can read the article here: http://www.infohit.net/blog/post/installing-and-running-xen-domu-jaunty-on-dom0-ubuntu-juanty.html
Installing Existing DomU images
You can use the Debian kernel installed in the earlier stage as a DomU kernel too, so this means you can create a configuration file something like this:
kernel = '/boot/vmlinuz-2.6.26-2-xen-686'
ramdisk = '/boot/initrd.img-2.6.26-2-xen-686'
memory = 1024
name = "ubuntu"
vif = [ 'bridge=xenbr0' ]
dhcp = "dhcp"
disk = ['file:/workarea/xen/images/ubuntu.img,xvda1,w',
'file:/workarea/xen/images/swapubuntu.img,xvda2,w']
root = "/dev/xvda1 ro"
You should note that the virtual console of this kernel is found on /dev/hvc0 therefore if you want to be able to use the xen console (xm create -c domain or xm console domain) you must run a getty on /dev/hvc0 either by updating /etc/inittab or placing an entry in /etc/event.d/
Related Articles
- Installing and Running Xen DomU Jaunty on Dom0 Ubuntu Juanty
- Compiling a Xen Dom0 Kernel for Ubuntu Jaunty
References
- www.chrisk.de/blog/2008/12/how-to-run-xen-in-ubuntu-intrepid-without-compiling-a-kernel-by-yourself/
- bderzhavets.wordpress.com/2009/01/03/setup-xen-330-ubuntu-intrepid-server-dom0-via-build-xen-kernel-based-on-httpxenbitsxensourcecomextlinux-2627-xenhg/
- blog.xen.org/index.php/2009/02/12/compling-and-installing-xen-331/
Hey there,
I'm about to start a XEN install and trying to choose a Distro.
I've got a buch of Exp. with Gentoo, but have had to port to ubuntu for work recently.
Have you managed to get the Dom0 fully running on jaunty yet?
Many thanks
Hi km0ti0n, Yes I have it running on Jaunty in a usable fashion now. My experience is much the same, moved to Ubuntu after about 4 years with Gentoo. I have just significantly updated the article so there should be enough clues to get you going. Otherwise drop a note here. I will continue to update the article in any case to add detail on DomU clients and so on.
Hi there.
Thanks to your notes I've been able to get the XEN kernel installed and the dom0 up and running, both using the wireless (wlan0) and using the cable (eth0).
I'm now starting to create my domU machines.
Many thanks.
Andy
I've tri
Dear Admin,
I have tried the steps according to ur notes, but couldnt able to run it till now. the link you provided for the xen kernel support, now it opens into -17 version rather than -15 as mentioned in ur document.
I am using jaunty and wants to run xen on it. i tried ur steps but it doesnt boot. i checked the menu.lst and its ok.
please help me
Why does network-manager need to be uninstalled? Managing wireless on a laptop without is more painful.
While applying patches as you said above I got an error
patch: ../xen-patches/60002_linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch1: extra operand
I have a static IP address but still it is not working
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
broadcast 192.168.1.255
dns-nameservers 192.168.1.254
My DNS is not in the same subnet and more over it is from an ADSL router in both the cases it is not working
ok i forgot to add the entries in /etc/resolv.conf
Ok finally it is working thanks a lot for your tutorial I had to restart my machine even after doing /etc/init.d/networking restart did not worked as I expected but then it worked later on
who so ever is having the static IP please note that dns-nameservers entry above I had deleted from my file so just google that and then you will be able to use it
Getting Dom0 networking running with a Static IP fails. I am getting
SIOCSIFADDR No Such Device
eth0:ERROR while getting interface flags:No Such Device
Following some pointers on other blogs I removed the entries in the /etc/udev/persistent-rules.d/70-percent-net.rules file.
I also tried the eth0 renamed as eth1
I tried adding e1000e module support even then I was getting the same error.
I have 64bit hardware. I tried the above on 32-bit Ubuntu as well as 64 bit.
But that error still remains.
Any idea what is causing that?
Hi,
Nice Article, I am trying to set up private cloud using XEN and EUCALYPTUS. I went through this procedure and every thing was working fine till I use xm or xend command is giving following error:
-----------------------------------------------------------------------
ERROR Internal error: Could not obtain handle on privileged command interface (2 = No such file or directory)
Traceback (most recent call last):
File "/usr/sbin/xm", line 8, in <module>
from xen.xm import main
File "/usr/lib/python2.6/dist-packages/xen/xm/main.py", line 61, in <module>
xc = xen.lowlevel.xc.xc()
xen.lowlevel.xc.Error: (1, 'Internal error', 'Could not obtain handle on privileged command interface (2 = No such file or directory)')
-----------------------------------------------------------------------
I am logged on as a super user in the PAE kernel. Still the handler of the privileged method xc() is missing.
Could you please Help me with this. Its been 4 days since i started installing XEN... Thanx in advance