Tux

...making Linux just a little more fun!

XEN Installation Problems on Ubuntu 7.04

Amit Kumar Saha [amitsaha.in at gmail.com]


Tue, 19 Jun 2007 15:43:40 +0530

Hi all,

I am trying to install Xen 3.1.0 from source. When I do a "make world", after some processing I get this

Cannot find linux-2.6.18.tar.bz2 in path .
and it starts retrieving the file from www.kernel.org

I do not want this. I have got a local copy of linux-2.6.18.tar.bz2 in /usr/src as well as the directory where Xen source code is stored. PATH setting did not help either.

How can I get around this?

I did install Xen 3.0 from synaptic,but it did not seem to work either. It is not able to boot into the Xen kernel, because the file vmlinuz-xen-0 is not created at all.

Please suggest how I can get Xen up and running!

Thanks

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Tue, 19 Jun 2007 16:39:27 +0530

Hello,

On Tue, 19 Jun 2007, Amit Kumar Saha wrote:

> I am trying to install Xen 3.1.0 from source.

If you only want to create and use virtual machines then this is not the preferred path on Debian and its derivatives.

> I did install Xen 3.0 from synaptic,but it did not seem to work
> either. It is not able to boot into the Xen kernel, because the file
> vmlinuz-xen-0 is not created at all.

If you are following the instructions from the Xen site then you may not be doing things the "Debian way". The instructions on the Debian (or Ubuntu) wiki may be more appropriate. Specifically, http://wiki.debian.org/Xen is probably the place to start.

If you understand how these things work then dom0 is a Debian with the kernel "linux-image-xen-686" with "libc6-xen" and "xen-hypervisor-*-i386" or the pae version for > 4GB of RAM. This and other "xen" Debian packages can be used to start and stop the other "dom"s.

The remaining "dom"s are Debian or other systems as appropriate and can run with most kernels and/or libc variants.

I have not run such a system for anything except some minimal tryouts so YMMV. In particular, if you figure things out then an article for LG would be good :-)

Regards,

Kapil. --


Top    Back


René Pfeiffer [lynx at luchs.at]


Tue, 19 Jun 2007 13:19:07 +0200

Hello!

On Jun 19, 2007 at 1543 +0530, Amit Kumar Saha appeared and said:

> Hi all,
> I am trying to install Xen 3.1.0 from source. When I do a "make world"
> , after some processing I get this
> Cannot find linux-2.6.18.tar.bz2 in path .
> and it starts retrieving the file from www.kernel.org

This is the normal behaviour of a Xen source installation. The Xen sources use a specific Linux kernel from www.kernel.org and patches for this very kernel version. There's no harm done since you can boot your distribution's kernel any time you don't want to use Xen. Xen requires "Xen-ified" kernels.

> I do not want this. I have got a local copy of linux-2.6.18.tar.bz2 in
> /usr/src as well as the directory where Xen source code is stored.
> PATH setting did not help either.
> How can I get around this?

Your only alternative option is to use Xen packages from Ubuntu.

> I did install Xen 3.0 from synaptic,but it did not seem to work
> either. It is not able to boot into the Xen kernel, because the file
> vmlinuz-xen-0 is not created at all.
> Please suggest how I can get Xen up and running!

When installing Xen I usually build new Xen0 and XenU kernels after having done "make world". The Xen source install often doesn't build kernels matching my hardware (and obviously my needs). Just do a "make world" and reenter the kernel source directories. Then build a Xen0 and a XenU kernel, install it into /boot/ and /lib/modules/ and you should have a working Xen installation. Don't forget to check the paths in the config file of your boot loader. In the case of Grub there should be something similar to this in /boot/grub/menu.lst:

title           Xen 3.0 / XenLinux 2.6
root            (hd0,0)
kernel          /boot/xen-3.0.gz dom0_mem=3D262144
module          /boot/vmlinuz-2.6-xen root=3D/dev/sda1 ro console=3Dtty0
module          /boot/initrd.img-2.6.16-xen
/boot/xen-3.0.gz is the Xen hypervisor.

/boot/vmlinuz-2.6-xen is your Dom0 kernel.

/boot/initrd.img-2.6.16-xen is the initial ramdisk to your Dom0 kernel (and is optional if your kernel supports all necessary driver to bootstrap the system).

I suggest having at least one additional entry for the Ubuntu kernel in the boot loader configuration. It simplifies the dorrection of errors.

Best wishes, René.


Top    Back


Amit Kumar Saha [amitsaha.in at gmail.com]


Tue, 19 Jun 2007 20:40:45 +0530

Hello René Pfeiffer,

> This is the normal behaviour of a Xen source installation. The Xen
> sources use a specific Linux kernel from www.kernel.org and patches
> for this very kernel version. There's no harm done since you can boot
> your distribution's kernel any time you don't want to use Xen. Xen
> requires "Xen-ified" kernels.
>
> Your only alternative option is to use Xen packages from Ubuntu.

I used Synaptic to install the xen-hypervisor, xen man, xen-utils etc except the Linux kernel xen images. However the result is same. It creates xen-3.0-amd64.gz but does not create the vmlinuz-xen*. I believe this is because I am not installing the linux kernel xen images. Is it?

Regards,

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back


René Pfeiffer [lynx at luchs.at]


Tue, 19 Jun 2007 17:27:21 +0200

On Jun 19, 2007 at 2040 +0530, Amit Kumar Saha appeared and said:

> Hello René Pfeiffer,
> > This is the normal behaviour of a Xen source installation. The Xen
> > sources use a specific Linux kernel from www.kernel.org and patches
> > for this very kernel version. There's no harm done since you can boot
> > your distribution's kernel any time you don't want to use Xen. Xen
> > requires "Xen-ified" kernels.
> >
> > Your only alternative option is to use Xen packages from Ubuntu.
> I used Synaptic to install the xen-hypervisor, xen man, xen-utils etc
> except the Linux kernel xen images. However the result is same. It
> creates  xen-3.0-amd64.gz  but does not create the vmlinuz-xen*. I
> believe this is because I am not installing the linux kernel xen
> images. Is it?

Yes, this looks like the Xen Linux kernel images are packaged seperately. You should have something like this

lynx@isis:~$ ls -1 /boot/*xen*
/boot/config-2.6.16.33-xen
/boot/initrd.img-2.6.16.33-xen
/boot/initrd.img-2.6.16-xen
/boot/System.map-2.6.16.33-xen
/boot/vmlinux-syms-2.6.16.33-xen
/boot/vmlinuz-2.6.16.33-xen
/boot/vmlinuz-2.6.16-xen
/boot/vmlinuz-2.6-xen
/boot/vmlinuz-2.6-xenU
/boot/xen-3.0.4-1.gz
/boot/xen-3.0.gz
/boot/xen-3.gz
/boot/xen.gz
/boot/xen-syms-3.0.4-1
lynx@isis:~$
in /boot/. xen-3.0.4-1.gz is the Xen hypervisor, vmlinuz-2.6-xen is the Domain 0 kernel and vmlinuz-2.6-xenU is the kernel for the guest domains. Try installing the Xen Linux kernel image package(s) and see if you get similar results.

Best wishes, René.


Top    Back


Amit Kumar Saha [amitsaha.in at gmail.com]


Wed, 20 Jun 2007 00:47:12 +0530

Hello René Pfeiffer

I installed xen0-linux-2.6.16-11.2-generic and all I have now is this:

config-xen0-2.6.16-11.2-generic
System.map-xen0-2.6.16-11.2-generic
xen0-linux-2.6.16-11.2-generic
xen0-linux-2.6.16-11.2-generic-xen0.initrd.img
xen-3.0-amd64.gz
xen-3.1.0.gz
xen-3.1.gz
xen-3.gz
xen.gz
xen-syms-3.1.0
I guess I have to manually create a initrd image, so I do a
sudo mkinitramfs -o
/boot/xen0-linux-2.6.16-11.2-generic-xen0.initrd.img
2.6.16-11.2-generic-xen0
which returns me
W: udev hook script requires at least kernel version 2.6.17
W: not generating requested initramfs for kernel 2.6.16-11.2-generic-xen0
Now what should I do? Install a later xen kernel package?

Regards,

-- 
Amit Kumar Saha
[URL]:http://amitsaha.in.googlepages.com

Top    Back


René Pfeiffer [lynx at luchs.at]


Wed, 20 Jun 2007 09:41:44 +0200

On Jun 20, 2007 at 0047 +0530, Amit Kumar Saha appeared and said:

> [...]
> I installed  xen0-linux-2.6.16-11.2-generic and  all I have now is this:
> config-xen0-2.6.16-11.2-generic
> System.map-xen0-2.6.16-11.2-generic
> xen0-linux-2.6.16-11.2-generic
> xen0-linux-2.6.16-11.2-generic-xen0.initrd.img
> xen-3.0-amd64.gz
> xen-3.1.0.gz
> xen-3.1.gz
> xen-3.gz
> xen.gz
> xen-syms-3.1.0

Looks good to me. I assume these were installed from the source distribution of Xen.

> I guess I have to manually create a initrd image,So i do a
> sudo mkinitramfs -o
> /boot/xen0-linux-2.6.16-11.2-generic-xen0.initrd.img
> 2.6.16-11.2-generic-xen0
> which returns me
> W: udev hook script requires at least kernel version 2.6.17
> W: not generating requested initramfs for kernel 2.6.16-11.2-generic-xen0
> Now what should I do? Install a later xen kernel package?

AFAIK there were some changes to udev both in the userspace daemon and in the kernel. It seems you have two options.

- Use your installed images without initrd (and make sure that the kernel has all necessary drivers to boot into a working system).

- Use Ubuntu's packages which should have a preinstalled initrd. This also means using Ubuntu's Xen package, not the source distribution of Xen.

Using no initrd is a feasible way. I did this on my Debian Sarge systems which I use with recent kernels from www.kernel.org. I had to deactivate udev and skip the initrd generation (BTW the initrd format has also changed in recent kernels, so old mkinitrd tools won't work anymore).

Best wishes, René.


Top    Back


Peter Knaggs [peter.knaggs at gmail.com]


Tue, 19 Jun 2007 22:14:00 -0700

On 6/19/07, Amit Kumar Saha <[email protected]> wrote:

> Please suggest how I can get Xen up and running!

I noticed on Ubuntu 7.04 Feisty Fawn, there's a couple of "metapackages" for xen, called "ubuntu-xen-desktop" and "ubuntu-xen-server". I just did

  apt-get install ubuntu-xen-desktop
and this adds the following entry to /boot/grub/menu.lst
title           Xen 3.0-i386 / Ubuntu, kernel 2.6.19-4-generic
root            (hd0,0)
kernel          /boot/xen-3.0-i386.gz
module          /boot/vmlinuz-2.6.19-4-generic root=UUID=6b1e7d60-05d2-4aa5-b117-6909cf153ba1 ro console=tty0
module          /boot/initrd.img-2.6.19-4-generic
quiet
savedefault
Where:
the /boot/xen-3.0-i386.gz              is the XEN hypervisor.
The /boot/vmlinuz-2.6.19-4-generic     is Dom0 the kernel
and /boot/initrd.img-2.6.19-4-generic  is its initial ramdisk.
The /boot/config-2.6.19-4-generic      is the xen kernel config.
The /boot/System.map-2.6.19-4-generic  contains the xen kernel symbols.
I haven't rebooted yet, but it looks promising :)

Cheers, Peter.


Top    Back