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 1
SUSE Linux Enterprise Desktop 10 Support Pack 2
SUSE Linux Enterprise Desktop 10 Support Pack 1
Situation
Resolution
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
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
- Download the DVD or CD1 for SLES 10 SP2
- Mount the the ISO
mount -o loop /root/SLES-10-SP2-DVD-i386-GM.iso /mnt
- Change directory to the boot loader location on the mounted ISO image.
cd /mnt/boot/i386
- 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
- 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-sles10cp /mnt/boot/i386/initrd-xen /etc/xen/rescue-sles10
- Umount the ISO image.
umount /mnt
- Go to /etc/xen/vm
- 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.
- Open the copy for editing.DO NOT EDIT THE ORIGINAL FILE
cp NAME_OF_VM sles10-rescue
- Remove the line with UUID
- Comment out the bootloader and bootloader_args lines
- Change the "name=" directive. If you don't, the DomU will not boot. For example, change it to:
name="sles10-rescue"
- Locate the line starting with disk=... It may look like this:
disk=['file:/var/lib/xen/images/sles9sp4-xen/disk0,xvda,w',]
- 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',]
- 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"
- Save and close the file
- 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
- Perform the rescue steps that need to be done inside the DomU
- Shutdown the DomU
- 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
Additional Information
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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com