10.5 Upgrading an OES 2 VM Guest to OES 2 SP3

10.5.1 Upgrading an OES 2 VM Guest by Using the Update Channel

Patching or updating an OES 2 SP3 VM guest is essentially the same as updating an OES 2 SP3 physical server. For instructions on updating a physical OES 2 SP3 server, see Section 5.4.5, Using the Patch Channel to Upgrade (Online).

10.5.2 Performing an Offline Upgrade

You can perform an offline upgrade using either an ISO file or files on the network. Physical media upgrades are not supported for VM guests.

NOTE:The offline upgrade process is quite lengthy. If your guest VMs have access to a patch channel, we recommend that you upgrade by using the patch channel. See Section 5.4.5, Using the Patch Channel to Upgrade (Online).

Performing a down-server upgrade on an OES 2 VM guest is similar in many ways to upgrading a physical machine, but there are important differences as outlined in the following sections:

Before You Start the Upgrade Process

  1. Make sure you follow all of the applicable instructions and guidelines in Section 5.2, Planning for the Upgrade to OES 2 SP3 and Section 5.3, Meeting the Upgrade Requirements.

A Brief Overview of the Upgrade Process

When you perform a down-server upgrade on a physical server to OES 2 SP3, you must first shut down the server and then reboot it, using the installation kernel and initial RAM disk (initrd) files on the SLES 10 SP4 installation media. This is accomplished by booting the server through a SLES CD or DVD, an ISO image file, or by accessing a SLES installation image on the network through a PXE or other remote connection.

Upgrading a VM guest also requires that you shut down the guest. However, when a Xen VM guest reboots, it doesn’t scan the local storage devices or attempt a network PXE connection. Rather, it uses its configuration information to locate the kernel and other needed files on the host’s file system. The only way to affect the boot process of a VM guest is to modify its configuration.

Therefore, to upgrade a Xen VM guest, you must do the following high-level tasks as detailed in the sections that follow.

  1. Copy the installation/upgrade kernel and initial RAM disk (initrd) files to the VM host’s file system.

  2. Create two copies of the VM guest configuration:

    • A Modified Version: You use this to start the upgrade process and run the first portion of the process.

    • An Unmodified Version: You use this to restore the guest’s operating environment for the second portion of the upgrade process.

  3. Remove the VM guest’s configuration information from the Xen database so that it can boot using configuration files you create above.

Creating a Temporary Upgrade Directory on the VM Host

As explained in A Brief Overview of the Upgrade Process, the kernel and other files needed to run the upgrade must be accessible on the VM host’s file system.

  1. Create a directory on the VM host server for the following:

    • The installation kernel

    • The initial RAM disk (initrd) file

    • The configuration files that you need during the upgrade process.

    The instructions that follow assume the directory is /tmp/upgrade, but you can use a different directory if you prefer.

Creating a Directory and Copying the ISO Files to the VM Host

NOTE:This is not required for an installation over the network.

If you plan to install from ISO image files on the VM host:

  1. Create a directory for the files on your VM host server.

    Because the images need to be available for future maintenance operations, they should be kept in a permanent location so that YaST knows where to find them.

  2. Copy the ISO image files for your platform architectural type (32-bit or 64-bit).

    Refer to the information on obtaining OES software in Getting and Preparing OES 2 Software in the OES 2 SP3: Planning and Implementation Guide.

Checking the Kernel Type

If you are upgrading a 32-bit VM guest, and you don’t know whether it uses the non-PAE or PAE kernel:

  1. Open a terminal on the VM guest.

  2. Enter the following command:

    uname -r

  3. Note whether the kernel name ends in

    • xen: Indicates the non-PAE kernel.

      or

    • xenpae: Indicates the PAE kernel.

    This determines which version of the kernel you must copy to the temporary upgrade directory.

(Conditional) Obtaining the xenpae Kernel

The xenpae kernel was inadvertently left off the SLES 10 SP4 media. If your guest requires the xenpae kernel, refer to TID 7005079 for instructions on overcoming this limitation. If necessary, click the Login link to see the TID information.

Shutting Down and Preparing the VM Guest

  1. On the VM host server, open Virtual Machine Manager, right-click the OES 2 guest server you are upgrading, and select Shutdown.

  2. If you are upgrading using ISO image files, in Virtual Machine Manager click View > Details > Hardware > Add > Storage Device, then browse to and select the SLES 10 SP4 ISO file.

  3. Browse to and select the OES 2 SP3 ISO file.

Copying the Boot Files and Preparing the VM Guest Configuration Files

  1. Copy the installation kernel and initrd files from your SLES 10 SP4 installation source > the /boot/i386 or /boot/x86_64 directory (depending on which architectural version you are upgrading) to the temporary directory you created in Step 1.

    If you are upgrading a 64-bit VM guest installation, the files are named vmlinuz-xen and initrd-xen.

    If you are upgrading a 32-bit VM guest installation, choose the files that are appropriate for your hypervisor as determined in Checking the Kernel Type:

    • vmlinuz-xen and initrd-xen

      or

    • vmlinuz-xenpae and initrd-xenpae

  2. Capture the VM guest’s configuration in a file that you can modify to start the upgrade process.

    At a terminal prompt, enter the following command:

    xm list -l vm_name > /path/to/modify_config_file.sxp

    Replace vm_name with the name of the VM guest that you are upgrading as listed in the Virtual Machine Manager, and the path with your temporary directory created in Step 1 and specifies a filename that indicates it is modified for starting the upgrade process.

    For example:

    xm list -l myserver_vm > /tmp/upgrade/modify_myserver_vm.sxp

  3. Before modifying the configuration file you just created, change to the directory containing the file and use the following commands to make a copy of it to preserve the unmodified configuration:

    cd /path/to/upgrade_directory

    cp modify_config_file.sxp unmodified_config_file.sxp

    Replace modify_config_file.sxp with the name the configuration file you specified in Step 2 and replace unmodified_config_file.sxp with the name of the new file you will use to restore the VM guest’s original configuration for the second phase of the upgrade process.

    For example:

    cd /tmp/upgrade

    cp modify_myserver_vm.sxp unmodified_myserver_vm.sxp

  4. Verify that both of the configuration files are in your upgrade directory, then remove the VM guest’s configuration from the Xen VM database by using the following command:

    xm delete vm_name

    Replace vm_name with the name of the VM guest that you are upgrading.

    For example:

    xm delete myserver_vm

    The VM guest no longer appears in Virtual Machine Manager.

  5. Using a text editor, open the configuration file that you created in Step 2 and change it as follows:

    1. Remove the line that begins with (bootloader_args ….

    2. Change the line that reads

      (on_reboot restart)

      to

      (on_reboot destroy)

    3. Remove the line that contains

      (bootloader /usr/lib/xen/boot/domUloader.py).

    4. Find the following indented lines:

      (image
          (linux
              (kernel ...)
      
    5. In the kernel line, before the closing parenthesis ), modify the listed path (or insert a path if none is present) to point to the vmlinuz-xen or vmlinuz-xenpae file copied in Step 1.

      For example, modify the kernel line so that it reads:

      (kernel /tmp/upgrade/vmlinuz-xen)

      or

      (kernel /tmp/upgrade/vmlinuz-xenpae)

    6. Insert a ramdisk line below the kernel line (or if a ramdisk line already exists, modify it) to point to the initrd file you copied in Step 1.

      For example, insert or modify the line so that it reads:

      (ramdisk /tmp/upgrade/initrd-xen)

      or

      (ramdisk /tmp/upgrade/initrd-xenpae)

    7. In the args line, between the single quotes, insert the path to your SLES 10 SP4 installation source.

      For example, if you are upgrading a 64-bit installation from the network, you might modify the args line so that it reads:

      (args ‘install=http://myserver.mycompany.com/sles10-SP4/x86_64’)

      Or, if you are upgrading a 64-bit installation from ISO files, you might modify the args line so that it reads:

      (args ‘install=hd:///?device=/dev/xvdx’)

      Replace x with the letter assigned to the SLES 10 SP4 ISO image file, for example .../xvdc.

    8. Save the upgrade configuration file, then continue with Starting the Upgrade.

Starting the Upgrade

  1. On the VM host server at a terminal prompt, enter the following command:

    xm create -F /path/to/modify_config_file.sxp

    For example:

    xm create -F /tmp/upgrade/modify_myserver_vm.sxp

    The VM guest appears again in Virtual Machine Manager.

  2. Open the VM guest, then select the language and accept the SLES 10 SP4 license agreement.

  3. Complete the first phase of the upgrade process by following the standard upgrade instructions, starting with Section 5.4.6, Selecting the Installation Mode Options.

    IMPORTANT:Remember that you must specify the location URL for the OES 2 SP3 installation files, either by using a network protocol such as HTTP:// or by using the device path assigned to the OES ISO, such as hd:///?device=/dev/xvdd.

Resuming and Completing the Upgrade

After you complete the instructions in Section 5.4.11, Accepting the Installation Settings, the server doesn’t reboot automatically and the VM guest disappears from Virtual Machine Manager.

You must re-create the VM guest to continue the upgrade process and complete the second phase.

  1. Enter the following command at the terminal prompt:

    xm new -F /path/to/unmodified_config_file.sxp

    For example:

    xm new -F /tmp/upgrade/unmodified_myserver_vm.sxp

  2. Open the VM guest and follow the standard upgrade instructions to completion, starting with Section 5.4.12, Specifying Configuration Information.

When the upgrade process is complete, you can remove the upgrade directory that you created in Step 1.