Major Version Upgrade

The clients must have the latest available service pack (SP) for the installed operating system, with all the latest updates applied. Before you start, ensure that the system is up to date and all updates have been installed successfully.

The upgrade is controlled by YaST and AutoYaST, it does not use Zypper.

1. Prepare to Migrate

Before you can migrate your client from SLE 12 to SLE 15, you need to:

  1. Prepare installation media

  2. Declare an autoinstallation distribution

  3. Create an activation key

  4. Create an autoinstallation profile

1.1. Prepare Installation Media

Procedure: Preparing Installation Media
  1. On the container host, download an ISO image with the installation sources.

  2. Use mgradm to import the installation data from the ISO image:

    mgradm distribution copy <image_name>.iso <image_name>
  3. Take a note of the distribution path reported by mgradm. You will need it when you declare the distribution to Uyuni.

This image can be used for multiple autoinstallation distributions.

For more information, see Autoinstallable Distributions.

1.2. Declare an Autoinstallation Distribution

Procedure: Declaring an Autoinstallation Distribution
  1. In the Uyuni Web UI, navigate to Systems  Autoinstallation  Distributions.

  2. Click Create Distribution , and complete these fields:

    In the Distribution Label field, enter a name to identify your autoinstallation distribution. For example, sles15sp6-x86_64. * In the Tree Path field, enter the path to the installation media you already saved. * Select the matching Base Channel. This must match the installation media. * Select the Installer Generation. This must match the installation media. * OPTIONAL: Specify kernel options to use when booting this distribution. There are multiple ways to provide kernel options. Only add options here that are generic for the distribution.

  3. Click Create Autoinstallable Distribution.

1.3. Create an Activation Key

For example, to switch from the old SLE 12 base channel to the new SLE 15 channel, you need an activation key.

Procedure: Creating an Activation Key
  1. In the Uyuni Server Web UI, navigate to Systems  Activation Keys and click Create Key.

  2. Enter a description for your key.

  3. Enter a key or leave it blank to generate an automatic key.

  4. OPTIONAL: If you want to limit the usage, enter your value in the Usage text field.

  5. Select the SLE-Product-SLES15-SP6-Pool for x86_64 base channel.

  6. OPTIONAL: Select any Add-On System Types. For more information, see https://documentation.suse.com/sles/15-SP4/html/SLES-all/article-modules.html.

  7. Click Create Activation Key.

  8. Click the Child Channels tab and select the required channels.

  9. Click Update Key.

1.4. Create an Autoinstallation Profile

Autoinstallation profiles contain all the installation and configuration data needed to install a system. They can also contain scripts to be executed after the installation is complete. For example scripts that you can use as a starting point, see https://github.com/SUSE/manager-build-profiles/tree/master/AutoYaST.

For valid AutoYaST upgrade settings, see https://doc.opensuse.org/projects/autoyast/#CreateProfile-upgrade.

Procedure: Creating an Autoinstallation Profile
  1. In the Uyuni Web UI, navigate to Systems  Autoinstallation  Profiles and upload your autoinstallation profile script.

    For example scripts that you can use as a starting point, see:

  2. In the Kernel Options field, type autoupgrade=1.

    Optionally, you can also include the Y2DEBUG=1 option. The debug setting is not required but can help with investigating any future problems you might encounter.

    Clients running in Azure cloud must add textmode=1 console=ttyS0 to Kernel Options.

  3. Paste the autoinstallation profile or use the file upload field.

  4. Click Create to save.

  5. When the uploaded profile requires variables to be set, navigate to Systems  Autoinstallation  Profiles, select the profile to edit, and navigate to the Variables tab.

    Specify the required variables, using this format:

    <key>=<value>

2. Migration

Before you begin, check that all the channels referenced in the autoinstallation profile are available and fully synchronized.

You can monitor the mirroring progress in /var/log/rhn/reposync/<channel-label>.log.

Procedure: Migrating
  1. In the Uyuni Server Web UI, navigate to Systems and select the client to be upgraded.

  2. Navigate to the Provisioning tab, and select the autoinstallation profile you uploaded.

  3. Click Schedule Autoinstallation and Finish. The system downloads the required files, change the bootloader entries, reboot, and start the upgrade.

Next time the client synchronizes with the Uyuni Server, it receives a re-installation job. The re-installation job fetches the new kernel and initrd packages. It also writes a new /boot/grub/menu.lst (GRUB Legacy) or /boot/grub2/grub.cfg (GRUB 2), containing pointers to the new kernel and initrd packages.

When the client next boots, it uses grub to boot the new kernel with its initrd. PXE booting is not used during this process.

Approximately three minutes after the job was fetched, the client goes down for reboot.

For clients, use the spacewalk/minion_script snippet to register the client again after migration has completed.