SUSE Support

Here When You Need Us

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

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

Environment

SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)

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.

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 "x86_64" can be replaced with the appropriate architecture. This example uses the SLES 12 SP1 media for x84_64. Replace SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso with the name of the ISO file you are using.

1.    Download the DVD for SLES 12 SP1 from download.suse.com

2.    Mount the the ISO
        mount -o loop /root/SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso /mnt
3.    Change directory to the boot loader location on the mounted ISO image.
        cd /mnt/boot/x86_64
4.    Create a directory e.g. in /etc/xen to store the kernel and the RAM disk that will be used to boot the problematic DomU.
        mkdir /etc/xen/rescue-sles12
5.    Copy the kernel and the RAM disk to the temporary location.
        cp /mnt/boot/x86_64/vmlinuz-xen /etc/xen/rescue-sles12
        cp /mnt/boot/x86_64/initrd-xen /etc/xen/rescue-sles12
6.    Umount the ISO image.
        umount /mnt
7.    Go to /etc/libvirt/libxl

When 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.

8.    Open the copy for editing. DO NOT EDIT THE ORIGINAL FILE
        cp <NAME_OF_VM> sles12-rescue
9.     Remove the line with UUID

10.    Comment out the bootloader and bootloader_args lines

11.    Change the "name=" directive. If you don't, the DomU will not boot. For example, change it to:
        name="rescue-sles12"
12.    Locate the tag "<disk"... It may look like this:

        <disk type='file' device='disk'>
          <driver name='qemu' type='raw'/>
          <source file='.../sles12.img'/>
          <target dev='xvda' bus='xen'/>
        </disk>

13. In order to add the rescue DVD to the DomU and use it for the rescue system add another disk pointing to the iso image:

        <disk device="cdrom" type="file">
          <driver name="file" />
          <source file=".../SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso" />
          <target dev="xvdh" />
          <readonly />
        </disk>

14.    The following will direct Xen to load the kernel and the RAM disk from /etc/xen/rescue12, and then to load the rescue system from the CD.

        <os>
          <type arch="x86_64" machine="xenpv">linux</type>
          <kernel>/etc/xen/rescue-sles12/vmlinuz-xen</kernel>
          <initrd>/etc/xen/rescue-sles12/initrd-xen</initrd>
          <cmdline> install=hd:xvdh rescue=1</cmdline>
        </os>

15.    Save and close the file

16.    Boot the rescue system.
    Since this is a rescue DomU, use the "virsh create" command. The configuration will not be saved after the DomU is shutdown
        virsh create /root/sles12-rescue.xml

17.    Perform the rescue steps that need to be done inside the DomU

18.    Shutdown the DomU

19.    Start the DomU normally with out using the rescue configuration file to make sure that it will start


example rescue configuration file

<domain type="xen">
  <name>rescue-system</name>
  <memory unit="KiB">2621440</memory>
  <currentMemory unit="KiB">2621440</currentMemory>
  <vcpu placement="static">1</vcpu>
  <os>
    <type arch="x86_64" machine="xenpv">linux</type>
    <kernel>/etc/xen/rescue-sles12/vmlinuz-xen</kernel>
    <initrd>/etc/xen/rescue-sles12/initrd-xen</initrd>
    <cmdline> install=hd:xvdh rescue=1</cmdline>
  </os>
  <clock adjustment="reset" offset="utc" />
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk device="cdrom" type="file">
      <driver name="file" />
      <source file=".../SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso" />
      <target dev="xvdh" />
      <readonly />
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='.../sles12.img'/>
      <target dev='xvda' bus='xen'/>
    </disk>
    <console type="pty">
      <target port="0" type="xen" />
    </console>
    <input type="mouse" />
    <input type="keyboard" />
    <graphics autoport="yes" port="-1" type="vnc" />
  </devices>
</domain>




Cause


Additional Information


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:7017649
  • Creation Date: 30-May-2016
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

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

SUSE Support Forums

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

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.

Open an Incident

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