Jump to content


[TuT] Debian Lenny Paravirtualization with XenTools [UPDATED]

Started by Drachenfels GmbH , 19 February 2010 - 02:31 PM
8 replies to this topic

Drachenfels GmbH Members

Drachenfels GmbH
  • 47 posts

Posted 19 February 2010 - 02:31 PM

Paravirtualization with XEN and Debian Lenny
(or: how to get XENTools running with Debian Lenny)

1.) Install Debian Lenny with "Other install media" default Template and update it with aptitude.
Add the GPG-KEY of Citrix to aptitude:
wget -q http://updates.vmd.citrix.com/XenServer/5.5.0/GPG-KEY -O- | apt-key add -

2.) Add XenTools ISO, mount and install it:
mount -t iso9660 /dev/cdrom /cdrom
cd /cdrom
dpkg –i Linux/xe-guest-utilities_5.6.0-xxx_i386.deb
dpkg –i Linux/debian-lenny/linux-image2.6*

If you have x64:
dpkg –i Linux/xe-guest-utilities_5.6.0-xxx_amd64.deb
dpkg –i Linux/debian-lenny/linux-image2.6*

3.) Change the name of your HDD from "hda" to "xvda".
(if your HDD is "hdb", change to"xvdb", also for "hdd")
Change it in "/etc/fstab/" and "/boot/grub/menu.lst".
"fstab" is easy, and on "menu.lst" you have to change:
"kernel /boot/vmlinuz-2.6.x root=/dev/hda1 ro quiet"
"kernel /boot/vmlinuz-2.6.x root=/dev/xvda1 ro quiet"
(or "hdb1" to "xvdb1")

4.) Next change "tty1" to "hvc0" in: "/etc/inittab".
"1:2345:respawn:/sbin/getty 38400 tty1"
"1:2345:respawn:/sbin/getty 38400 hvc0"

5.) Now Shutdown VM.

6.) Go to any XenConsole.
Get the UUID of the VM with "xe vm-list".

7.) xe vm-param-set uuid=<uuid> HVM-boot-policy=""
xe vm-param-set uuid=<uuid> PV-bootloader=pygrub
xe vm-param-set uuid=<uuid> PV-args="- - quiet console=hvc0"

8.) Now make the HDD of the VM bootable.
You need the VBD-UUID. Get it with:
"xe vm-disk-list uuid=<uuid>" .

9.) Activate the Blockdevice of the HDD and make it bootable:
"xe vbd-param-set uuid=<vbd-uuid> bootable=true"

10.) After boot, use: "aptitude update; aptitude dist-upgrade" .
After every kernel update, do again Step 3.) change "hda" to"xvda" in "/boot/grub/menu.lst"

Updated for XenServer 5.6 by: Drachenfels GmbH on 01.06.2010

Goncalo Gomes Citrix Employees

Goncalo Gomes
  • 89 posts

Posted 19 February 2010 - 03:46 PM

Hi "Drachenfels GmbH",

I have moved this thread from the XenServer SDK* forum in the *Citrix Developer Network* area to the to more appropriate *Linux Guest Installation forum in the support area. Please use this forum for Linux guests installation related how-tos/tutorials in the future.

Good work on this tutorial. Thanks for sharing it.


Drachenfels GmbH Members

Drachenfels GmbH
  • 47 posts

Posted 31 May 2010 - 12:37 PM

i updated the tutorial for XenServer 5.6


  • 5 posts

Posted 08 June 2010 - 06:53 AM


I have a question about it. After the second step i changed /etc/fstab file as you told but /boot/grub/menu.lst file is different on my VM. There's no raw like "kernel /boot/vmlinuz-2.6.x root=/dev/hda1 ro quiet".

There was no problem about first and second steps.

/boot/grub/menu.lst file is attached.

Did i make something wrong?

Thanks and regards.

Attached Files

Alan Wilson Members

Alan Wilson
  • 8 posts

Posted 08 June 2010 - 02:47 PM

Hi - I've been having all sorts of problems getting XenTools to install under Debian Lenny - I followed the instructions in this post but when I brought the VM back up it wouldn't boot and I got the error:

"The bootloader for this VM returned an error -- did the VM installation succeed? Error from bootloader: too many bootable disks (2 disks)"

Any ideas where I'm going wrong?



Peter Bats Citrix Employees

Peter Bats
  • 549 posts

Posted 08 June 2010 - 09:00 PM

Yes make sure you don't have a CD connected to the VM while booting up.


Shawn Hooton Members

Shawn Hooton
  • 14 posts

Posted 02 August 2010 - 10:48 PM

Thanks for the excellent tutorial. However, I've had some issues with the kernel packages provided by Citrix for Debian Lenny. The error below is generated at install time:

Hmm. There is a symbolic link /lib/modules/2.6.29-xs5.5.0.14/build.
However, I can not read it: No such file or directory
Therefore, I am deleting /lib/modules/2.6.29-xs5.5.0.15/build

I get the same error for the link for /lib/modules/2.6.29-xs5.5.0.14/source.

I assume this leads to modules not getting built. In fact, I have encountered some errors with the 2.6.29-xs5.5.0.17 kernel and its associated .ko kernel objects. Both the fan.ko (kernel/drivers/fan.ko) and the processor.ko (kernel/drivers/processor.ko) do not exist, as I am informed at load time (during bootup). Can anyone from Citrix point me the right direction, particularly what symlinks I need to put in the modules directory the kernel modules build correctly? I am beginning to think that Citrix's PV support for Debian is not quite ready for production use... I might just return to using HVMs (which would be too bad).

Have any other users with a similar platform and setup (Debian 5.0.5 and XenServer 5.5.0) seen this issue?


Patrick Mania Members

Patrick Mania
  • 29 posts

Posted 21 October 2010 - 11:05 AM

I have the same problem with the missing fan and processor.ko.
Are there any fixes for that?
I´ve just executed aptitude and installed the linux-image-2.6.29-xs5.5.0 Package on my Box...

Zsolt Wagner Members

Zsolt Wagner
  • 184 posts

Posted 25 October 2010 - 04:06 PM

For Lenny 32bits you dont need to do all this. There were some topics on this about doing a network install since the ISO from the site had something wrong with it.

Now, for 64bits, you might have to do the above.