Client - X Upgrade
Your clients must have the latest available SLE 12 Service Pack, 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.
Prepare to Migrate
Before you can migrate your client from SLE 12 to SLE 15 SP2, you need to make these preparations:
-
Prepare installation media
-
Create an auto-installation distribution
-
Create an activation key
-
Upload an AutoYaST profile
-
On the Uyuni Server, create a local directory for the SLE 15 SP2 installation media:
mkdir -p /srv/images/sle15sp2
-
Download an ISO image with the installation sources, and mount the ISO image on your server:
mount -o loop DVD1.iso /mnt/
-
Copy everything from the mounted ISO to your local file system:
cp -r /mnt/* /srv/images/sle15sp2
-
When the copy is complete, unmount the ISO image:
umount /mnt
This image is the unified installer and can be used for multiple autoinstallation distributions. |
-
In the Uyuni Web UI, navigate to
and click Create Distribution. -
In the
Create Autoinstallable Distribution
section, use these parameters:-
In the
Distribution Label
section, type a unique name for the distribution. Use only letters, numbers, hyphens, periods, and underscores, and ensure the name is longer than four characters. For example,sles15sp2-x86_64
. -
In the
Tree Path
field, type an absolute path to the installation source. For example,/srv/images/sle15sp2
. -
In the
Base Channel
field, selectSLE-Product-SLES15-SP2-Pool for x86_64
. -
In the
Installer Generation
field, selectSUSE Linux Enterprise 15
. -
In the
Kernel Options
field, type any options to be passed to the kernel when booting for the installation. Theinstall=
parameter and theself_update=0 pt.options=self_update
parameter are added by default. -
In the
Post Kernel Options
section, type any options to be passed to the kernel when booting the installed system for the first time.
-
-
Click Create Autoinstallable Distribution to save.
In order to switch from the old SLE 12 base channel to the new SLE 15 SP2 channel, you need an activation key.
-
In the Uyuni Server Web UI, navigate to
and clickCreate Key
. -
Enter a description for your key.
-
Enter a key or leave it blank to generate an automatic key.
-
OPTIONAL: If you want to limit the usage, enter your value in the
Usage
text field. -
Select the
SLE-Product-SLES15-SP2-Pool for x86_64
base channel. -
OPTIONAL: Select any
Add-On System Types
. For more information, see https://documentation.suse.com/sles/15-SP1/html/SLES-all/art-modules.html. -
Click Create Activation Key.
-
Click the
Child Channels
tab and select the required channels. -
Click Update Key.
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.
-
In the Uyuni Web UI, navigate to https://github.com/SUSE/manager-build-profiles/tree/master/AutoYaST.
and upload your autoinstallation profile script. For example scripts that you can use as a starting point, see -
In the
Kernel Options
field, typeautoupgrade=1
. Optionally, you can also include theY2DEBUG=1
option. The debug setting is not required but can help with investigating any future problems you might encounter. -
Paste the autoinstallation profile or use the file upload field.
-
Click Create to save.
-
When the uploaded profile requires variables to be set, navigate to
, select the profile to edit, and navigate to theVariables
tab. Specify the required variables, using this format:<key>=<value>
For clients that were registered using Salt, use the |
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
.
-
In the Uyuni Server Web UI, navigate to
Systems
and select the client to be upgraded. -
Navigate to the
Provisioning
tab, and select the autoinstallation profile you uploaded. -
Click Schedule Autoinstallation and Finish. The system will download the required files, change the bootloader entries, reboot, and start the upgrade.
Next time the client synchronizes with the Uyuni Server, it will receive a re-installation job.
The re-installation job fetches the new kernel and initrd packages.
It will also write a new /boot/grub/menu.lst
, containing pointers to the new kernel and initrd packages.
When the client next boots, it will use 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 will go down for reboot.
SP Mass Migration
If you want to migrate a large number of clients to the next SP version, you can use Uyuni API calls.
-
You need to know to which migration target you want to migrate. List available migration targets:
spacecmd api -- system.listMigrationTargets -A 1000010001
Create a list of system IDs you want to migrate.
-
For each system ID, call
listMigrationTarget
and check that it is an available target.-
If the system ID is an available target, call
system.scheduleSPMigration
. -
If it is not an available target, skip the system.
-
Adapt this template for your environment:
target = '[....]' basechannel = 'channel-label' system_ids = [1, 2, 3] session = auth.login(user, pass) for system in system_ids if system.listMigrationTargets(session, system).ident == target system.scheduleSPMigration(session, system, target, basechannel, [], False, <now>) else print "Cannot migrate to requested target -- skipping system" endif endfor