SUSE Support

Here When You Need Us

XEN: How to boot SLES para-virtual DomU's into the Rescue System for disaster recovery

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

Environment

SUSE Linux Enterprise Server 10 Support Pack 2
SUSE Linux Enterprise Server 10 Support Pack 1
SUSE Linux Enterprise Desktop 10 Support Pack 2

SUSE Linux Enterprise Desktop 10 Support Pack 1
 

Situation

In some cases where a para-virtual Xen DomU will not boot you may need to boot into the Rescue System.

Resolution

On SUSE Linux a basic, read-only file-system is included on the DVD or first CD called the"Rescue System." This tool is used for basic maintenance tasks, like file-system repair, or to fix booting problems. The procedure defined in this TID will allow you to boot a Xen para-virtual machine into the Rescue System.

recommendations


Due to difference in SLES 10 SP2 and SLES 9 SP4, you will need to use SLES 10 SP2's DVD or CD 1 ISO image.

Booting into the rescue system for a Xen DomU is more difficult than on bare-metal hardware.

Because of the Xen architecture, there are many methods that can be used to rescue a DomU. The vast majority of rescue methods can be employed in the Dom0 with out ever booting the DomU. In situations where file or file system manipulation is needed, please consider one of the following TIDs, all of which enable the mounting and editing of disk and/or disk images in Dom0.
  • 7000062 - XEN: Attaching disk images or raw disks with LVM volume groups in Dom0 for disaster recovery
  • 3312774 - XEN: Directly attaching Xen DomU disk images to Dom0 for system rescue
  • 3756370 - Mounting Xen DomU disk images in Dom0 using lomount
warning

This method only applies to para-virtual DomU's and WILL fail for fully-virtual DomU's. Further the method described in this TID will boot a para-virtualized rescue DomU. This method is only recommended on systems where there are issues with the emulated hardware, problems booting the installed kernel or troubleshooting issues regarding EVMS.

process
 
Each step needs to be taken, with attention to detail. For any step that has "i386" you can replace it with "x86_64" for 64-bit architectures. This example uses the SLES 10 SP2 media for i386. Replace SLES-10-SP2-DVD-i386-GM.iso with the name of the ISO file you are using.
 
  1. Download the DVD or CD1 for SLES 10 SP2
  2. Mount the the ISO
    mount -o loop /root/SLES-10-SP2-DVD-i386-GM.iso /mnt
  3. Change directory to the boot loader location on the mounted ISO image.
    cd /mnt/boot/i386
  4. Create a directory in /etc/xen to store the kernel and the RAM disk that will be used to boot the problematic DomU
    mkdir /etc/xen/rescue-sles10
  5. Copy the kernel and the RAM disk to the temporary location. Depending on the amount of RAM and CPU's allocated, you may wish to use the -xenpae files (for 32bit DomU's running on a 64-bit Xen or if Dom0 is running the -xenpae hypervisor, you MUST use the -xenpae kernel in order for this method to work. If you chose the wrong kernel type, then this method will fail.)
    cp /mnt/boot/i386/vmlinuz-xen /etc/xen/rescue-sles10
    cp /mnt/boot/i386/initrd-xen /etc/xen/rescue-sles10
  6. Umount the ISO image.
    umount /mnt
  7. Go to /etc/xen/vm
  8. If the installation file that was used to create the DomU is there, create a copy of it. If you do not have a copy, you may use the example at the bottom of this TID; copy and edit as needed.
  9. Open the copy for editing.DO NOT EDIT THE ORIGINAL FILE
    cp NAME_OF_VM sles10-rescue
  10. Remove the line with UUID
  11. Comment out the bootloader and bootloader_args lines
  12. Change the "name=" directive. If you don't, the DomU will not boot. For example, change it to:
    name="sles10-rescue"
  13. Locate the line starting with disk=... It may look like this:
    disk=['file:/var/lib/xen/images/sles9sp4-xen/disk0,xvda,w',]
  14. In order to add the rescue DVD to the DomU and use it for the rescue system add 'file:/etc/xen/SLES10-SP1-DVD-i386-GM.iso,xvdh,w', after the first "[".xvdh should be at least one letter higher than any other disk presented. In this example, "xvdh" was chosen because it clearly higher than xvda. It may look like this:
    disk=['file:/etc/xen/SLES10-SP1-DVD-i386-GM.iso,xvdh,w','file:/var/lib/xen/images/sles9sp4-xen/disk0,xvda,w',]
  15. The following will direct Xen to load the kernel and the RAM disk from /etc/xen/rescue10, and then to load the rescue system from the CD. (If you are using 32-bir XenPAE, replace vmlinuz-xen with vmlinuz-xenpae and initrd-xen with initrd-xenpae)
    kernel="/etc/xen/rescue-sles10/vmlinuz-xen"
    ramdisk="/etc/xen/rescue-sles10/initrd-xen"
    extra=" install=hd:xvdh rescue=1 xencons=tty"
  16. Save and close the file
  17. Boot the rescue system. Since this is a rescue DomU, use the "xm create" command. The configuration will not be saved after the DomU is shutdown
    xm create -c sles10-rescue
  18. Perform the rescue steps that need to be done inside the DomU
  19. Shutdown the DomU
  20. Start the DomU normally with out using the rescue configuration file to make sure that it will start

example rescue configuration file

For convenience, the following is an example configuration for booting into the rescue system. If you copy it, you will need to adjust for your configuration
 
name="rescue-system"
memory=256
vcpus=1
on_crash="destroy"
on_poweroff="destroy"
on_reboot="restart"
localtime=0
builder="linux"
kernel="/etc/xen/rescue10/vmlinuz-xen"
ramdisk="/etc/xen/rescue10/initrd-xen"
extra=" install=hd:xvdh rescue=1 xencons=tty"
disk=['file:/etc/xen/rescue.iso,xvdh:cdrom,r',
'file:/var/lib/xen/images/sles9sp4-xen/disk0,xvda,w',]
vif=[ 'mac=00:15:3e:22:f5:1b',]
vfb=['type=vnc,vncunused=1']
 

Additional Information

para-virtual versus fully virtual

There are several other guides on the internet on booting into the rescue system. Most of these guides, however, boot the server into a fully-virtual environment. These guides fail for several reasons. The most important reason is that older hardware may not be able to boot a fully-virtual DomU. Also, since para-virtual and fully-virtual environments are by definition, functionality different, certain repair methods may fails. For example, if a normally para-virtual environment is booted fully virtual for a repair, then kernel images may not be correctly made.

It is important to note that by default, the tools that ship in SLES will create a para-virtual DomU unless you explicitly select fully virtual.

 

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:3564240
  • Creation Date: 17-Mar-2008
  • Modified Date:05-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.