Getting Xen 4.0.1 working in Debian 6.0

I’ve decided to expand this post a bit as I’ve run into a lot more problems.  I think I will try evaluating XCP 1.0.  Hard to imagine it being worse than Xen on Debian.

Sadly a person installing Xem 4.0.1 on a freshly installed Debian 6.0 install is in for some trouble getting Xen to work.  You’ll see errors about hotplug scripts not working related to the tap driver.  The problem stems from Debian Bug #591456.  The solution is to create /etc/xen/scripts/hotplugpath.sh with the following contents:


SBINDIR="/usr/sbin"
BINDIR="/usr/bin"
LIBEXEC="/usr/lib/xen/bin"
LIBDIR="/usr/lib64"
SHAREDIR="/usr/share"
PRIVATE_BINDIR="/usr/lib64/xen/bin"
XENFIRMWAREDIR="/usr/lib/xen/boot"
XEN_CONFIG_DIR="/etc/xen"
XEN_SCRIPT_DIR="/etc/xen/scripts"

It’s also important to note that Debian stripped out the blktap2 module so only the blktap module is available in Debian 6.0 currently.  I’d follow Debian Bug #586772 to see if it ever gets re-added.  More likely blktap2 may be added through a backport at some point.

Next you might want to fix an error in /etc/xen/scripts/xen-hotplug-cleanup.  You can change line 24 from:

if [ $(xenstore-read “$vm_dev” 2>/dev/null) != “” ]

to:

if [ “$(xenstore-read ‘$vm_dev’ 2>/dev/null)” != “” ]

Alternatives not guaranteed to work:

Other bugs and problems:

  • no pv_grub is present
  • block-attach and block-detach in dom0 seem to not work – attach doesn’t seem to give a usable disk and detach fails unless the –force option is used
  • domu’s do not have there xenstore entries cleaned up after shutting down (this may be fixed by patching xen-hotplug-cleanup)

All in all I’d say Xen 4.0.1 in Debian 6.0 is a mess.  Not sure if this is a buggy Xen release or related to Debian changes.  But I’d advise a lot of caution and testing before implementing a Xen server using Debian 6.0.

3 Comments

  1. Pingback: Windows server running under Xen under OpenNebula « CeRch Systems Blog

Leave a Reply

Your email address will not be published. Required fields are marked *