Installing Xen 3.0 upon Debian Sarge

Posted by Steve on Tue 6 Dec 2005 at 11:27

Xen 3.0 is the latest release of the popular virtualisation platform. It allows you to install "virtual servers" upon your base operating system, allowing you to create and run several instances of GNU/Linux upon one host. Here we'll take a simple overview at using Xen to install virtual servers.

Xen Overview

Xen is a virtualisation technology, which allows you to setup a host which may run an arbitrary number of virtual operating systems. Unlike Qemu (which we covered a long time ago) or VMWare Xen expects the operating systems it hosts to be modified. (This limitation will eventually be removed when used with hardware which supports virtualisation.)

What does this mean? Well to be honest it means very little, in practise you're restricted in the operation systems you can install and host - GNU/Linux is fine, Microsoft Windows will not run.

Xen will only work upon x86 systems, sadly it is unlikely to ever be available for other platforms.

Installation Overview

Getting started with Xen can be a little confusing, partly because there are several unfamiliar terms used in the documentation, and partly because of the complexity of actually installing it.

To help ease this introduction this is what we're going to do:

  • Taking a single real computer called "lappy.my.flat" and installing Xen 3.0 upon it.
  • Once Xen has been installed this will be the host. In Xen documentation this is referred to as "dom0".
  • After the host is running we'll create and install a new virtual Debian installation:
    • vm01.my.flat - A minimal installation of Debian Sarge.

Xen is a fairly non-standard package to install upon a system. Rather than being a binary or two and some support files, it actually contains its own Linux kernel.

This means that in order to install it you will need to either rebuild a complete Linux kernel yourself, or install the binaries available for download, then reboot into it.

Clearly this is a more involved installation than other packages, however the process is fairly simple so long as you are aware of the potential problems and side effects:

  • If your host system uses some proprietary kernel modules they will need to be rebuilt, or they will not work.
  • If you make any mistakes and aren't comfortable upgrading a kernel you should probably avoid this software.
  • Installation on a remote host is not for the faint of heart.

That said I found the installation fairly painless. YMMV

Installation

To get started you'll need to download the software.

Currently there do not appear appear to be any Debian packages available, so we're going to install the binaries from the Xen homepage:

root@lappy:~# mkdir /home/xen/bin
root@lappy:~# cd /home/xen/bin
root@lappy:/home/xen/bin# wget \
 http://bits.xensource.com/Xen/latest/xen-3.0.0-install-x86_32.tgz
root@lappy:/home/xen/bin# tar -pzxf xen-3.0.0-install-x86_32.tgz
root@lappy:/home/xen/bin# cd xen-unstable-install
root@lappy:/home/xen/bin/xen-unstable-install# sh ./install.sh

After running the install.sh script we'll have the kernel, modules, and tools installed upon the host system. But before trying out our new kernel we need to complete two more steps. Firstly we need to ensure that the Xen init scripts run when we reboot by running the following two commands:

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

The next step is to disable the TLS libraries upon the host system. This can be achived by running:

mv /lib/tls /lib/tls.disabled

After performing this step we're ready to reboot into our new kernel - but to do that we'll first need to make it available to our boot loader.

For systems which are using the Grub boot loader this means adding the kernel to the startup menu by editing the file /boot/grub/menu.lst. To do this add the following lines to the end of that file:

title Xen 3.0 / XenLinux 2.6
kernel /boot/xen-3.0.gz dom0_mem=262144
module /boot/vmlinuz-2.6-xen0 root=/dev/hda1 ro console=tty0

NOTE #1: If your root is not /dev/hda1 you will need to adjust that line - you should be able to see what your root is from examining the entries already present in your menu.lst file.

NOTE #2: For users of other boot loaders you will need to add your kernel by following your documentation.

Booting Xen

Once your system has booted with the new Xen kernel running you should test that it works as expected. By this I mean test that your kernel modules for networking, hardware access, etc, all work correctly. If something is not working you'll most likely need to install Xen from source instead and that is very much beyond the scope of this introduction.

Assuming that everything is working correctly we're now ready to start working with Xen and creating the virtual installations.

Creating Virtual Installations

As the operating systems we're going to install are virtual they will not have their own hardware. This means that we need to create disk images for them to use as their own "hard drives". (ie. The guest installations will believe they have /dev/hda - but in actual fact this disk is merely an ordinary file upon the host system.)

Once we've created these virtual files we'll install Debian Sarge upon them using the debootstrap package. The process looks like this:

  • Create two large files, one for the hard drive, one for swap.
  • Format/initialise them appropriately.
  • Install Debian Sarge upon the disk image.
  • Configure the installations with hostnames, networking addresses, etc.
  • Ensure they have an installation of OpenSSH upon them.
  • Configure Xen to boot them.
  • Actually start them up.

Each of these steps is fairly simple, but there are a lot of things to remember - so I wrote a small script to automate them all.

If you'd like to do this manually I found the following notes very useful. (Indeed my script was based upon performing these steps several times!)

The script I came up with is called create-xen-image.pl, and will perform all the basic setup we'll need. Whilst it isn't a great piece of code it will do the job, and any suggestions or improvements will be welcomed.

To ensure you have all the required software run:

apt-get install bridge-utils iproute debootstrap

Once you have the software you may create a new image, vm01, with the following command:

 ./create-xen-image.pl --hostname='vm01' \ 
   --ip=192.168.1.91     --gateway=192.168.1.1 \
   --network=192.168.1.0 --mask=255.255.255.0 \
   --dir=/home/xen

This creates two files:

  • /home/xen/domains/vm01/disk.img - The disk image.
  • /home/xen/domains/vm01/swap.img - The swap image.

The disk.img file will be formatted as an ext3 filesystem and will have static networking details setup along with a hostname, APT sources.list, etc.

Once the command has finished you should follow the instructions displayed at the end of the process to setup a root password, and make any additional tweaks which you might desire. The virtual instance should be setup to start OpenSSH upon boot - so you can connect to it as soon as it boots successfully.

Booting The Xen Images

The virtual installations which you'll run are each described in a configuration file inside /etc/xen - commonly these are named after the hostname of the servers.

If you used the create-xen-image.pl script presented above you will have a file created named after the hostname, eg /etc/xen/vm01.cfg. The simplest configuration file looks like this:

kernel = "/boot/vmlinuz-2.6.12-xenU"
memory = 96
name = "vm01"
#dhcp = "dhcp"
disk = [ 'file:/home/xen/domains/vm01/diskimage,sda1,w','file:/home/xen/domains/vm01/swapimage,sda2,w' ]
root = "/dev/sda1 ro"

Here dhcp is commented out because the creation scrip setup a static IP address for the new host. If you wish to change to using DHCP you will need to edit the creation script and adjust the information it writes to /etc/network/interfaces in the new disk image.

(When you install Xen several sample configuration files are installed into /etc/xen. Examing these will show most of the available configuration options.)

To start the virtual installation run:

xm create vm01.cfg -c

Here the "create" keyword is used to create a running instance, rather than create a fresh installation. You needn't worry that you're wiping anything if you wish to repeat the command!

Running this command will connect you to the console of the booting kernel (omit the -c flag to avoid this) once it has finished booting you should be able to ping your host, and connect to it via SSH.

To dismiss the console displaying the bootup messages press ^]. You may reconnect to the later by running "xm console vm01".

To shutdown the virtual server you may login as root and run /sbin/shutdown as normal or from the host run:

xm shutdown vm01
Further Information & Notes

Further information on using Xen is available from the Xen project homepage and the enormously informative Xen Wiki.

If you were wishing to run Xen on a production basis you should examine using LVM as a means of speeding things up. Personally I found running using plain disk images acceptable upon my hardware.

In terms of speed Xen is faster than both Qemu and VMWare, and I can comfortably run four or five virtual installations upon a PIII@1200Mhz with 1Gb of RAM. The only drawback of using Xen I've noticed so far is the lack of X11.

 

 


Posted by Anonymous (194.200.xx.xx) on Tue 6 Dec 2005 at 11:41
Once Xen has been installed this will be the host. In Xen documentation this is referred to as "domU".
Do you mean "dom0" here? I thought dom0 is the privileged initial guest while all the other guests are unprivileged "domU"s.

[ Parent | Reply to this comment ]

Posted by ijc (194.200.xx.xx) on Tue 6 Dec 2005 at 11:41
oops. that was me...

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 6 Dec 2005 at 11:42
[ View Steve's Scratchpad | View Weblogs ]

Yes I did, well spotted.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (213.140.xx.xx) on Tue 6 Dec 2005 at 13:25
There are debs since a long time it seems: ITP debian.org

[ Parent | Reply to this comment ]

Posted by Anonymous (213.140.xx.xx) on Tue 6 Dec 2005 at 13:39
There are not yet 3.0 packages, those are 2.x ones.

Help building them anyone ?

Xen 3.0 is released, and should be in debian too.

[ Parent | Reply to this comment ]

Posted by Anonymous (24.226.xx.xx) on Tue 6 Dec 2005 at 22:19
the package maintainer was waiting for an official release, as tracking the beta was tough to do. Hopefuly someone reminds him nicely that the full release is now out, and he can package without risk of a change in the API or other upgradability issues.

[ Parent | Reply to this comment ]

Posted by Anonymous (213.164.xx.xx) on Tue 6 Dec 2005 at 14:10
NOTE #2: For users of other boot loaders you will need to add your kernel by following your documentation.
My impression was that there is no other bootloader but grub that works with xen. Isn't that true anymore? ...

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 6 Dec 2005 at 14:12
[ View Steve's Scratchpad | View Weblogs ]

I don't know for sure, but since it is just the loading of a kernel I'd expect any loader to work - lilo, chos, etc.

I know that the documentation I found was entirely grub based but I didn't have the impression this was for any technical reason.

Steve

[ Parent | Reply to this comment ]

Posted by grifferz (82.44.xx.xx) on Tue 6 Dec 2005 at 14:35
AFAIK Xen requires grub because the ability to load an extra module (in this case the linux kernel) after the kernel (in this case xen.gz) is only present in grub.

Steve, it would be nice if you went into the process of building a custom kernel too, as this is a daunting process under Xen. I could do this later if no one else finds time, though.

Finally, I would second the notion to use LVM for any Xen installation, if you already use it on your dom0. It makes life a lot easier as you can just shrink and grow (even online if using filesystems that support it) and is really very simple once the basic concepts are understood.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 6 Dec 2005 at 14:42
[ View Steve's Scratchpad | View Weblogs ]

I'm not liable to have time for experimentation with the kernel building in the next week or two, so if you're prepared to do it I'm sure others would be very greatful.

Running Xen in production environment is an interesting topic in itself as there are a few performance tweaks you can make. The obvious one being the use of LVM instead of disk images, but I think there is probably a lot of scope for studing this further - I'm strongly tempted to cover this in the future once I have more experience with using it.

So far I'm very pleased with the performance and there aren't too many downsides that I've spotted yet. Running upon a laptop means that ACPI and suspend/resume isn't available - also the binary kernel supplied doesn't have a module for my onboard sound, so I have to choose "Listen to music" vs. "Run virtual instances", but that isn't anything other than a minor annoyance.

Steve

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Sat 24 Dec 2005 at 06:00
[ View Steve's Scratchpad | View Weblogs ]

You might find this link useful:

Following the instructions I got xen 3.0 running upon a Sid system with the kernel built from source in about an hour.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (213.89.xx.xx) on Tue 6 Dec 2005 at 22:57
$ perl -c create-xen-image.pl
Global symbol "$NETWORK" requires explicit package name at create-xen-image.pl line 62.
Global symbol "$NETWORK" requires explicit package name at create-xen-image.pl line 193.
Global symbol "$NAME" requires explicit package name at create-xen-image.pl line 258.
create-xen-image.pl had compilation errors.

$ grep Id create-xen-image.pl
# $Id: create-xen-image.pl,v 1.2 2005/12/06 04:35:27 steve Exp $

/Jon

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 6 Dec 2005 at 23:30
[ View Steve's Scratchpad | View Weblogs ]

Two stupid typos. Thanks for reporting it, I've fixed it in CVS and updated the copy available for download.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (81.1.xx.xx) on Wed 7 Dec 2005 at 13:56
s/vitalisation/virtualisation/

[ Parent | Reply to this comment ]

Posted by Anonymous (65.218.xx.xx) on Wed 7 Dec 2005 at 19:20
One thing we need to manage XEN is GUI console. People are working on that end as well. Enomalism: XEN Virtualization Management Console looks very promising.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 8 Dec 2005 at 10:41
[ View Steve's Scratchpad | View Weblogs ]

That'll be aspell making a bad suggestion; fixed now, thanks.

Steve

[ Parent | Reply to this comment ]

Posted by samb (213.106.xx.xx) on Thu 8 Dec 2005 at 08:17
Great article Steve!

One of the major problems I found with Xen was the poor 64-bit support - it's being worked on, but is behind 32bit devlopment. Given that all the most powerful x86 processors are now x86_64 this is a bit of a drawback.


Sam Bashton
Bashton Ltd - Linux Consultancy

[ Parent | Reply to this comment ]

Posted by Anonymous (193.158.xx.xx) on Tue 13 Dec 2005 at 14:16
A really nice and witty Webpage covering Xen and Debian is:
http://www.option-c.com/xwiki/Xen_Debian_Quick_Start

[ Parent | Reply to this comment ]

Posted by Anonymous (68.124.xx.xx) on Mon 26 Dec 2005 at 21:33
Nice and witty, yes, but based on the Debian Xen 2.x packages :(

[ Parent | Reply to this comment ]

Posted by Mustafa (80.92.xx.xx) on Tue 13 Dec 2005 at 16:32
In terms of speed Xen is faster than both Qemu and VMWare, and I can comfortably run four or five virtual installations upon a PIII@1200Mhz with 1Gb of RAM. The only drawback of using Xen I've noticed so far is the lack of X11.

wrong. it is possible. its not easy though. heres a post on the xen mailing list.


hi,
DomUs or non zero domains do not have access to graphics devices, since unlike the disks and network devices which are virtualised, only Dom0 has direct access to display hardware.
As such an X-Server can only be run in domain 0.
However Programs like Virtual Network Computing(VNC) can solve this problem.
So follow the following steps:
Steps:
Step 1 : Download Real Vnc from http://www.realvnc.com, if vncserver,vncpasswd,vncviewer,vncconfig are not installed in dom0 and domU.

DomUs Dom0

Step2:
Set a passwd
vncpasswd
Step3:
Start the vncserver
vncserver &
step 4:
Make a note of the display no.
that vncserver is using

e.g LinuxGuestOS:1 step:5 Start the vncviewer

vncviewer LinuxGuestOS:1

step:6 Enter the passwd


Once the window manager is displayed an X-terminal will be provided.
It can be invoked by in domU

cd /etc/X11/xinit
./Xclients



Thanks and Regards
Amit Kumar




heres another thread on the mailing list.

how can i run X (gnome) in xen.
10 messages
Mustafa Abbasi <lordverminard@gmail.com> Wed, Nov 30, 2005 at 5:49 PM
To: xen-users@lists.xensource.com
i want to be able to run gnome in xen. i used a ubuntu partition and used that as domU. now i can't seem to get gnome to work. everytime i try /etc/init.d/gdm start it say that gdm is already started. what am i doing wrong. is ti because gdm is running on another run-level?? how do i change run-levels in the DomU.
i am using debian sarge as Dom0
Petersson, Mats <mats.petersson@amd.com> Wed, Nov 30, 2005 at 7:05 PM
To: Mustafa Abbasi <lordverminard@gmail.com>
It's probably that the error message is a bit incorrect - You don't have a graphics card in DomU - it lives in Dom0-land - so X can't get access to the graphics card in DomU. I can certainly see how this can be interpreted as "The graphics card isn't available - someone else is using it" rather than "The graphics card isn't available - maybe there isn't one".

You need to use something like vncserver or ssh -X to channel your X-windows to another machine.

--
Mats

From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Mustafa Abbasi
Sent: 30 November 2005 12:49
To: xen-users@lists.xensource.com
Subject: [Xen-users] how can i run X (gnome) in xen.

i want to be able to run gnome in xen. i used a ubuntu partition and used that as domU. now i can't seem to get gnome to work. everytime i try /etc/init.d/gdm start it say that gdm is already started. what am i doing wrong. is ti because gdm is running on another run-level?? how do i change run-levels in the DomU.
i am using debian sarge as Dom0

Michael McCabe <mccabemt@gmail.com> Wed, Nov 30, 2005 at 7:35 PM
To: Mustafa Abbasi <lordverminard@gmail.com>
In order to run Gnome in a user level image you'll need to setup VNC
and then VNC to that guest. There are various threads and web pages
that should be able to help you set this up.
[Quoted text hidden]
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xensource.com
> http://lists.xensource.com/xen-users

Anthony Liguori <aliguori@us.ibm.com> Thu, Dec 1, 2005 at 12:17 AM
To: Mustafa Abbasi <lordverminard@gmail.com>
Cc: xen-users@lists.xensource.com
You cannot run X in a DomU as DomU's don't have physical access to the
graphics hardware.

You can, however, run Xvnc within the DomU and run GDM within that. See
the wiki for more details.

Regards,

Anthony Liguori
[Quoted text hidden]
>------------------------------------------------------------- -----------
[Quoted text hidden]
Paul Dorman <paul.dorman@solnetsolutions.co.nz> Thu, Dec 1, 2005 at 2:16 AM
To: Mustafa Abbasi <lordverminard@gmail.com>
Just my 2 cents worth, but I've had great success running the free
nxserver and nx client software to get to gnome on VMs. You should be
able to run any desktop you like, and it's faster than X.
[Quoted text hidden]
[Quoted text hidden]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDjhaiB8Id2hG6URURAneDAKDwerOSkgWHsAqSD74T/1EcTmtzowCg5lbt
QquoT4I6Rbp6aluwuyAlx9M=
=gPih
-----END PGP SIGNATURE-----


Mustafa Abbasi <lordverminard@gmail.com> Thu, Dec 1, 2005 at 3:12 PM
To: Paul Dorman <paul.dorman@solnetsolutions.co.nz>


On 12/1/05, Paul Dorman <paul.dorman@solnetsolutions.co.nz> wrote:

Just my 2 cents worth, but I've had great success running the free
nxserver and nx client software to get to gnome on VMs. You should be
able to run any desktop you like, and it's faster than X.

umm could you point me a good tutorial or perhaps provide some info on how to setup nxserver and nxclient. just a few hints and tips are enough to get me started.
Paul Dorman <paul.dorman@solnetsolutions.co.nz> Fri, Dec 2, 2005 at 1:55 AM
To: Mustafa Abbasi <lordverminard@gmail.com>
Now I can't remember what distro you are using (SuSE?), but you
shouldn't have too much trouble getting the nxserver installed. I'm a
Debian user and there's a package I can just install. All you do is
install it and add a user account for authentication.

All the information you should need can be found here:

https://mail.kde.org/mailman/listinfo/freenx-knx

Good luck! I think you'll be very happy with NX as a way of having a GUI
for your VMs.

Kind regards,
Paul
[Quoted text hidden]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDj2NUB8Id2hG6URURAs9fAJ43Y8E0g7plbLiu63yd1FHXYxU9QACeNFHS
HCigC7TCZS3i3b7GU7EohUs=
=9jWc
-----END PGP SIGNATURE-----


Mustafa Abbasi <lordverminard@gmail.com> Fri, Dec 2, 2005 at 6:04 AM
To: Paul Dorman <paul.dorman@solnetsolutions.co.nz>


On 12/2/05, Paul Dorman <paul.dorman@solnetsolutions.co.nz> wrote:

Now I can't remember what distro you are using (SuSE?), but you
shouldn't have too much trouble getting the nxserver installed. I'm a
Debian user and there's a package I can just install. All you do is
install it and add a user account for authentication.

All the information you should need can be found here:

https://mail.kde.org/mailman/listinfo/freenx-knx

Good luck! I think you'll be very happy with NX as a way of having a GUI
for your VMs.

Kind regards,
Paul



oh thanks. i am using debian 3.1r0 so i'll install nxserver using apt. thanks.


Paul Dorman <paul.dorman@solnetsolutions.co.nz> Fri, Dec 2, 2005 at 6:17 AM
To: Mustafa Abbasi <lordverminard@gmail.com>
Cool! You'll want to add this line to your /etc/apt/sources.list file:

# FreeNX
deb http://ace-host.stuart.id.au/russell/files/debian/sarge/ ./

Do an "apt-get update && apt-cache search nx|grep nx" after.

Paul
[Quoted text hidden]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDj6CyB8Id2hG6URURAqBOAKCEborQWPpbe/9yvyiRRYkjhSSLQgCfazr8
Pn1rMojnk4RQt8si2lLbvuo=
=Q66O
-----END PGP SIGNATURE-----


wmarvel <wmarvel%marvel@us.ibm.com> Thu, Dec 1, 2005 at 12:08 AM
To: xen-users@lists.xensource.com
isn't gdm started from init 2 ?

how are you connecting to the domU ? VNC ?
=====
[Quoted text hidden]
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xensource.com
> http://lists.xensource.com/xen-users

--
================================================================= ======
Sincerely, Woody Marvel Linux Technology Center - Beaverton, Oregon
Open Source Projects - Open Virtualization tel: 503-578-3833/775-3833
internet/imap email: marvel@us.ibm.com notes email: wmarvel@us.ibm.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
"None so empty of grace as he that thinks he is full." - Thomas Watson
================================================================= ======
[Quoted text hidden]

[ Parent | Reply to this comment ]

Posted by Anonymous (80.126.xx.xx) on Tue 20 Dec 2005 at 22:46
Thanks for the great article. I know what to do in the holidays between xmas and newyear ;)
Anyone any experience with the moving of virtual instances from 1 piece of hardware to another in real time ? The flash movie about xen3 talks about this but it's hard to find docs on it.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 20 Dec 2005 at 22:49
[ View Steve's Scratchpad | View Weblogs ]

Look at the manpage for xm - specifically the section on 'migrate'.

Something like:

xm migrate instance newHostName --live

That should do the job.

(Obviously you need Xen installed upon two hosts.)

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (80.126.xx.xx) on Wed 21 Dec 2005 at 17:55
Thanks :)
Going to setup a test enviroment this xmas holidays.
You just saved me from a week af excessive php coding ;)

[ Parent | Reply to this comment ]

Posted by grifferz (82.69.xx.xx) on Mon 26 Dec 2005 at 00:29
Hi Steve,

I've been pondering writing my own wrapper to debootstrap to make things easier, but now seeing your xen-tools I may not have to.

Thing is though, I run my domains exclusively from LVM logical volumes. Is it possible to use xen-create-image to set up domains in a mounted LV as opposed to a loopback image?

Andy

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Mon 26 Dec 2005 at 11:33
[ View Steve's Scratchpad | View Weblogs ]

Several people have asked me about this already, and I am afraid all I can say is that I have no access to an environment where I can develop, or test, LVM support.

However I would accept code to use LVM if anybody were to contribute it...

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (80.129.xx.xx) on Tue 7 Feb 2006 at 09:48
Dom0 on my hardware (dpt_i2o) would not boot, if I had hotplug enabled in rcS. With irqbalance installed it did not work, too.

BTW, 3.0.1 ist here:
http://bits.xensource.com/Xen/latest/xen-3.0.1-install-x86_32.tgz

[ Parent | Reply to this comment ]

Posted by Anonymous (84.60.xx.xx) on Wed 1 Nov 2006 at 20:10
there is also a version for x86_64-systems

http://bits.xensource.com/Xen/latest/xen-3.0.1-install-x86_64.tgz

[ Parent | Reply to this comment ]

Posted by Krietjur (212.203.xx.xx) on Thu 23 Mar 2006 at 09:43
Auto-starting xend en xendomains is not working properly on my system when used this way:
update-rc.d xend defaults
update-rc.d xendomains defaults

It is starting correctly, but when I reboot the server, it gives errors about xend not running, so the system is not able to cleanly shutdown the running domains.

So I've used this:
update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20

and that worked for me.

[ Parent | Reply to this comment ]

Posted by grimoire (80.5.xx.xx) on Thu 23 Mar 2006 at 23:30
The Xen dom0 kernel supplied by the installer does not play nicely with root LVM. My Sarge box is set up as follows:
green-bytch:/home/grimoire# fdisk -l /dev/hdb Disk /dev/hdb: 33.8 GB, 33820286976 bytes 255 heads, 63 sectors/track, 4111 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdb1 1 12 96358+ 83 Linux /dev/hdb2 13 3988 31937220 8e Linux LVM /dev/hdb3 3989 4111 987997+ 82 Linux swap / Solaris green-bytch:/home/grimoire# mount /dev/mapper/wholedisk-root on / type ext3 (rw,errors=remount-ro) /dev/hdb1 on /boot type ext3 (rw)

[ Parent | Reply to this comment ]

Posted by grimoire (80.5.xx.xx) on Thu 23 Mar 2006 at 23:36
Didn't mean to post that :(

[ Parent | Reply to this comment ]

Posted by grimoire (80.5.xx.xx) on Thu 23 Mar 2006 at 23:35
The Xen dom0 kernel supplied by the installer does not play nicely with root LVM. My Sarge box is set up as follows:

green-bytch:/home/grimoire# fdisk -l /dev/hdb
Disk /dev/hdb: 33.8 GB, 33820286976 bytes
255 heads, 63 sectors/track, 4111 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 12 96358+ 83 Linux
/dev/hdb2 13 3988 31937220 8e Linux LVM
/dev/hdb3 3989 4111 987997+ 82 Linux swap / Solaris

green-bytch:/home/grimoire# mount
/dev/mapper/wholedisk-root on / type ext3 (rw,errors=remount-ro)
/dev/hdb1 on /boot type ext3 (rw)


I tried matching my Grub stanza for the Xen kernel with my standard Debian kernel:

title Debian GNU/Linux, kernel 2.6.8-2-k7
root (hd1,0)
kernel /vmlinuz-2.6.8-2-k7 root=/dev/mapper/wholedisk-root ro
initrd /initrd.img-2.6.8-2-k7
savedefault
boot

title Xen 3.0 / XenLinux 2.6
root (hd1,0)
kernel /xen-3.0.gz dom0_mem=262144
module /vmlinuz-2.6-xen0 root=/dev/mapper/wholedisk-root ro console=tty0


However, on booting the Xen kernel I had the following error:

Root-NFS: No NFS server available, giving up
VFS: Unable to mount root fs via NFS, trying floppy
VFS: Insert root floppy and press ENTER


Having no root floppy, I hit enter and the system rebooted.

Following the documentation at http://www.option-c.com/xwiki/Xen_Debian_Quick_Start#The_system_d idn.27t_boot I tried to build an initrd for the Xen kernel:

# mkinitrd -o /boot/initrd-xen-2.6.12.6-xen0 2.6.12.6-xen0
File descriptor 3 left open
File descriptor 4 left open
File descriptor 5 left open
File descriptor 6 left open
File descriptor 7 left open
Finding all volume groups
Incorrect metadata area header checksum
Finding volume group "wholedisk"
/usr/sbin/mkinitrd: /dev/mapper/wholedisk-root: Kernel does not support LVM

[ Parent | Reply to this comment ]

Posted by Anonymous (80.156.xx.xx) on Fri 7 Apr 2006 at 14:35
The Dokumentation at http://www.option-c.com/xwiki/Xen_Debian_Quick_Start#The_system_d idn.27t_boot
is for Xen 2.x

I have the same problem that the Xen kernel is booting, and then it came this error:

Root-NFS: No NFS server available, giving up
VFS: Unable to mount root fs via NFS, trying floppy
VFS: Insert root floppy and press ENTER

When i press any key the system will restart. Does anyone has an idea how to solve this problem?

[ Parent | Reply to this comment ]

Posted by Eirik (129.177.xx.xx) on Fri 2 Jun 2006 at 17:24
Sounds like (one of) the problems I was having -- basically if you're using udev and lvm, you need to use initramfs-tools for making the initrd (or roll your own). See my other comment

[ Parent | Reply to this comment ]

Posted by Anonymous (194.24.xx.xx) on Thu 27 Apr 2006 at 16:26
Mm, I have a big Quad-Opteron.. thing.. that I'm trying to get Xen onto. I've used the 3.0.2-from-binary-install mode, updated menu.lst but I need an initrd which contains the HP cciss RAID driver..

Now I notice xen-3.0.2-2-install/install/lib/modules/2.6.16-xen/kernel/drivers /block/cciss.ko

But I can't get this into an initrd :/

the Xen README suggests using "mkinitrd -v -f --with=cciss" etc. but the version of mkinitrd in Debian does not support that syntax. Any ideas? :)

Cheers,
Gavin. (g d h ... at... a c e n t r al dotcodot uk)

[ Parent | Reply to this comment ]

Posted by Anonymous (86.129.xx.xx) on Thu 11 May 2006 at 15:03
So use FreeNX for access to the VM's X11 :)

[ Parent | Reply to this comment ]

Posted by Eirik (129.177.xx.xx) on Fri 2 Jun 2006 at 17:21

I've recently managed to force a HP Compaq Proliant DL145 G2 Opetron server to accept a Sarge install. I've set it up with md-raid and lvm, and it took a bit of work (see end of this post for a couple of pointers -- added for later reference/anyone searching with google).

In all this, I discovered[1] that the best way to build initrd's for Debian, that work with udev and lvm, is using the mkintramfs-packages.

They also do the trick with getting xen to boot:

mkinitramfs -o /boot/initrd.img-2.6.16-1-xen-amd64-k8 2.6.16-1-xen-amd64-k8

relevant section from /boot/grub/menu.lst:

title Debian GNU/Linux Xen dom0 kernel
#Boot on seperate partition (actually a raid1 volume);
#adjust your paths adding /boot/ if you have /boot on the /root-volume
root (hd0,0)
#Boot xen, and *don't* reboot on error!
kernel /xen.gz console=vga noreboot
#Load dom0 kernel
module /xen0 root=/dev/mapper/raid1-debian64 ro console=tty0
#With initrd
module /initrd.img-xen
savedefault
boot

Some additional notes for Sarge/amd64 on the DL145 G2:

  • First disabele one of the two GB ethernet ports in BIOS (I experienced wierd timeouts with both enabled -- possibly an irq issue)
  • Then install in expert-mode with a daily build of the Debian Installer[2] (I used netinst/hd-image boot via usbkey. Check the Debian Install manual[3] for how to make usbkeys) -- Installing Sarge
  • Before the reboot, add backport apt-sources and installing a kernel that works (2.6.15). Use initramfs-tools[2] to make an initrd-image

Adding backports sources from the second console, or from a shell inside the installer, basically consists of doing:
NB: These commands have not been verified against a running instance of the installer, they're based on what I recall from the process!

chroot /target
echo "deb http://www.backports.org/debian/ sarge-backports main" >> /etc/apt/sources.list

cat < /etc/apt/preferences
Package: *
Pin: release o=Debian,a=stable
Pin-Priority: 900

Package: *
Pin: release a=sarge-backports
Pin-Priority: 200
EOF

apt-get update
apt-get install initramfs-tools
apt-get -t sarge-backports install kernel-image-2.6

Then update grub, eg:

update-grub && grub-install /dev/sda

[1] http://wiki.debian.org/InitrdReplacementOptions
[2] http://www.debian.org/devel/debian-installer/
[3]
http://www.us.debian.org/releases/sarge/i386/ch04s04.html.en

Note: I've tried to use a combination of uuids and a-name-refs for making internal links in this post, not sure if they work yet :-)

[ Parent | Reply to this comment ]

Posted by itsec (85.177.xx.xx) on Fri 13 Oct 2006 at 17:35
[ View Weblogs ]
These suckers at www.xensource.com want your e-mail now (required).

Can someone please spit at them!

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 459 votes ~ 5 comments )

 

 

Related Links