Problem with Xen, xvda and sda

cloudvirtualizationxen

I am creating a cloud for my university using Eucalyptus with Xen (PCs have Debian Squeeze 64 bit installed). I have a problem with the following guest configuration:

#
# Configuration file for the Xen instance evenmorefinalfoo, created
# by xen-tools 4.2 on Thu May 26 11:03:06 2011.
#

#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-2.6.32-5-xen-amd64'
ramdisk     = '/boot/initrd.img-2.6.32-5-xen-amd64'

vcpus       = '1'
memory      = '128'

#
#  Disk device(s).
#
root        = '/dev/sda2 ro'
disk        = [
                  'file:/home/xen/domains/evenmorefinalfoo/disk.img,sda2,w',
                  'file:/home/xen/domains/evenmorefinalfoo/swap.img,sda1,w',
              ]

As you can see, the disk and swap images are meant to be mounted on sda1 and sda2. However, when I start the guest, these are mounted on xvda1 xvda2, provoking an error. Is there anything that I can do about that? It seems like it is a Xen error.

Thank you in advance,

Best Answer

The boot device name is coded into the kernel. You can override this by passing the appropriate kernel-parameter (or by setting the bootdev in the kernel). My guess is that your "root"-parameter is not passed to the DomU-kernel - which might indeed be an error.

Apart from that it is better to use xvd becaude sd will use SCSI/SAS/SATA-drivers by default - and not the proper xenblk-driver.

Another tip: Use soft-links within the DomUs to point to the current kernel and initrd. That way you can use these soft-links in your DomU-configuration on the Dom0 and don`t have to change that config after a kernel-upgrade in your DomU.