SUSE Support

Here When You Need Us

XEN: Unable to install or import DomU's on SLES 11; boot loader error returned

This document (7002815) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Desktop 11

Situation

Importing DomU's physical disks or images created on SLES 10 fail with:
   "Boot loader did not return any data!"
 
Creating DomU's on SLES 11 fail with:
       "Boot loader did not return any data!"

Resolution

With the release of SLES 11, a major architectural change effected the DomU boot loader, bringing SLES closer to what the greater Linux Community uses. Previously, SLES 10 Xen used the domUloader, which did not require a boot loader configuration. Under SLES 11, pygrub is the default DomU bootloader, which uses a grub boot loader configuration in order to start a domU.

pygrub has several advantages over the SLES 10.x behavior.  Most notably, under SLES 10, knowledge of the disk layout was needed in order to start a DomU. YaST and Virt-manager had special functionality to discover where the kernel and the initrd could be found. With pygrub, multiple kernels, as well as boot options can be defined giving administrators more options in controlling the booting of DomU's. Another significant advantage to pygrub is that a machine can migrate easily between physical and virtual environment, since the Grub boot loader is installed.

There are several configurations and use cases which are unaffected. In the following cases, the DomU's should load normally:
  • DomU's started within clustering such as Linux Heartbeat/Pacemaker
  • DomU's started via legacy files (i.e. /etc/xen/vm)
  • DomU's started within a management database on an upgraded machine
Affected configurations:
  • pre-SLES 11 DomU's physical or disk imported via Virt-Manager
  • Attempting to install DomU's without Grub installed

installation change: install a boot loader

During the installation of any Linux DomU under SLES 11, make sure to install Grub. Installing a boot loader will ensure that a /boot/grub/menu.lst file is populated, and will allow DomU's to boot normally.
running domU's on SLES 10 and SLES 11

If a DomU will be run on both SLES 10 and SLES 11 Dom0 hosts, install the DomU on SLES 10. After the DomU is created, use the /etc/xen/vm file to make changes to hardware and to start and stop the DomU.
pygrub: add a menu.lst file to existing hosts

TID 3312774, " Directly attaching Xen DomU disk images to Dom0 for system rescue" describes how to attach a DomU disk image to Dom0. By following the TID, you will be able to make available the disk image inside of DomU, which will allow modifications to the DomU. Make sure to mount the boot partition, if there is one under /mnt/boot prior to chrooting. At that point, create a /boot/grub/menu.lst file. Populate it with the following:

    default 0
    timeout 8

    title Default Kernel
        root (hd0,0)
        kernel /vmlinuz-xen root=/dev/xvda2 splash=silent showopts vga=0x31a
        initrd /initrd-xen

Save the file and follow the reset of the TID about cleaning up. You should then be able to import the DomU using Virt-Manager with out any problems.

domUloader: use or import legacy /etc/xen/vm files

domUloader still ships with SLES 11, but is not the default boot loader for "vm-install" which is used by Virt-Manager and YaST. If you have not modified the domU using "xm" commands, YaST, or "Virt-Manager", then you can re-import the DomU configuration. To do so simply type "xm new -f <configuration file>".

domUloader: create configuration file from hand

If the other techniques fail, you can create a DomU configuration from hand. This method will allow you to import a Xen DomU created on SLES 10 SP1 or SLES 10 SP2 without modifying the guest when the configuration file or configuration in the Xenstore is not available.

Below is an example of a SLES 11 default configuration file, which will use the pygrub DomU boot loader:

    name="sles11"
    memory=512
    maxmem=512
    vcpus=4
    on_poweroff="destroy"
    on_reboot="restart"
    on_crash="destroy"
    localtime=0
    keymap="en-us"
    builder="linux"
    bootloader="/usr/bin/pygrub"
    bootargs=""
    extra=""
    disk=[ 'file:/var/lib/xen/images/sles11/disk0,xvda,w', ]
    vif=[ 'mac=00:16:3e:76:3d:8b,bridge=br0', ]
    vfb=['type=vnc,vncunused=1']

The following is an example of a SLES 10 SP2 or SLES 10 SP1 default configuration that will use domUloader.sys.

    name="sles10"
    memory=512
    maxmem=512
    vcpus=4
    on_poweroff="destroy"
    on_reboot="restart"
    on_crash="destroy"
    localtime=0
    keymap="en-us"
    builder="linux"
    bootloader="/usr/lib/xen/domUloader.sys"
    bootargs="--entry=xvda2:/boot/vmlinuz-xen,/boot/initrd-xen"
    extra=""
    disk=[ 'file:/var/lib/xen/images/sles11/disk0,xvda,w', ]
    vif=[ 'mac=00:16:3e:76:3d:8b,bridge=br0', ]
    vfb=['type=vnc,vncunused=1']

Please make sure to define the disk and the vif (network) correctly. If you do not know the MAC address that the NIC should use, then you will need to reconfigure the network (alternavitely, the correct MAC address could be gleaned from /etc/sysconfig/network; files with ifcfg-eth-id- have the MAC address in the file name. After the MAC address is obtained, the configuration file can be modified to reflect the correct MAC address).  Then start the vm using "xm create <file name>". Once you are satified that the file is correct, you can import it with "xm new <file name>"
  • This is a trial and error process. The most common item that will need review is the location of the kernel image. In ths example we used the first virtual disk (xvda) on the first partition (xvda1)
  • If after typing "xm start...", the command hangs, pass it "control-C". Restart Xend ("rcxend restart"). Note that restarting Xend will not affect running Xen guests.
  • If the Xen guest is in any sort of clustering or if the physical host is in a cluster, shutdown the cluster or turn off clustering for the node at hand. If not, strange things can happen with clustering as a result.

Additional Information

In the event that this document does not resolve this information, please contact SUSE Technical Services to seek a resolution.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7002815
  • Creation Date: 24-Mar-2009
  • Modified Date:15-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.