SLES 12 SP3 was released some time ago and as we have customers running on that I thought it might be a good idea to test the upgrade from SP2 to SP3. Actually it turned out this is quite easy and can be done online. The supported methods for doing this is either by using YaST or Zypper directly. As I wanted to stay on the command line I’ll use Zypper for the scope of this post. Lets go…

As said above I’ll be upgrading from SLES 12 SP2:

postgres@sles12sp2:/home/postgres/ [pg963] cat /etc/os-release 
NAME="SLES"
VERSION="12-SP2"
VERSION_ID="12.2"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp2"

When you have another setup make sure that the upgrade path is supported, which you can check here.

My current kernel version is:

postgres@sles12sp2:/home/postgres/ [pg963] uname -a
Linux sles12sp2 4.4.74-92.38-default #1 SMP Tue Sep 12 19:43:46 UTC 2017 (545c055) x86_64 x86_64 x86_64 GNU/Linux

The first thing you should do is to apply the latest patches:

postgres@sles12sp2:/home/postgres/ [pg963] sudo zypper patch
Refreshing service 'Containers_Module_12_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP2_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Software_Development_Kit_12_SP2_x86_64'.
Retrieving repository 'SLES12-SP2-Updates' metadata ...............................................................................................[done]
Building repository 'SLES12-SP2-Updates' cache ....................................................................................................[done]
Retrieving repository 'SLE-SDK12-SP2-Updates' metadata ............................................................................................[done]
Building repository 'SLE-SDK12-SP2-Updates' cache .................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 4 NEW patches are going to be installed:
  SUSE-SLE-SERVER-12-SP2-2017-1597 SUSE-SLE-SERVER-12-SP2-2017-1602 SUSE-SLE-SERVER-12-SP2-2017-1606 SUSE-SLE-SERVER-12-SP2-2017-1622

The following 8 packages are going to be upgraded:
  autofs gtk3-data gtk3-lang gtk3-tools libgtk-3-0 typelib-1_0-Gtk-3_0 xinetd yast2-xml

8 packages to upgrade.
Overall download size: 6.4 MiB. Already cached: 0 B. After the operation, additional 12.0 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package autofs-5.0.9-28.3.5.x86_64                                                                       (1/8), 407.0 KiB (  2.0 MiB unpacked)
Retrieving delta: ./x86_64/autofs-5.0.9-27.2_28.3.5.x86_64.drpm, 160.5 KiB
Retrieving: autofs-5.0.9-27.2_28.3.5.x86_64.drpm ..................................................................................................[done]
Applying delta: ./autofs-5.0.9-27.2_28.3.5.x86_64.drpm ............................................................................................[done]
Retrieving package gtk3-data-3.20.10-17.3.20.noarch                                                                 (2/8), 162.7 KiB ( 10.8 KiB unpacked)
Retrieving: gtk3-data-3.20.10-17.3.20.noarch.rpm ..................................................................................................[done]
Retrieving package xinetd-2.3.15-8.8.1.x86_64                                                                       (3/8), 126.6 KiB (286.4 KiB unpacked)
Retrieving delta: ./x86_64/xinetd-2.3.15-8.5.1_8.8.1.x86_64.drpm, 17.8 KiB
Retrieving: xinetd-2.3.15-8.5.1_8.8.1.x86_64.drpm .................................................................................................[done]
Applying delta: ./xinetd-2.3.15-8.5.1_8.8.1.x86_64.drpm ...........................................................................................[done]
Retrieving package yast2-xml-3.1.2-2.3.1.x86_64                                                                     (4/8),  48.2 KiB (127.7 KiB unpacked)
Retrieving delta: ./x86_64/yast2-xml-3.1.1_3.1.2-1.46_2.3.1.x86_64.drpm, 10.3 KiB
Retrieving: yast2-xml-3.1.1_3.1.2-1.46_2.3.1.x86_64.drpm ..........................................................................................[done]
Applying delta: ./yast2-xml-3.1.1_3.1.2-1.46_2.3.1.x86_64.drpm ....................................................................................[done]
Retrieving package gtk3-tools-3.20.10-17.3.20.x86_64                                                                (5/8), 237.8 KiB (294.2 KiB unpacked)
Retrieving: gtk3-tools-3.20.10-17.3.20.x86_64.rpm .................................................................................................[done]
Retrieving package libgtk-3-0-3.20.10-17.3.20.x86_64                                                                (6/8),   2.5 MiB (  8.4 MiB unpacked)
Retrieving delta: ./x86_64/libgtk-3-0-3.20.10-16.2_17.3.20.x86_64.drpm, 175.6 KiB
Retrieving: libgtk-3-0-3.20.10-16.2_17.3.20.x86_64.drpm ...........................................................................................[done]
Applying delta: ./libgtk-3-0-3.20.10-16.2_17.3.20.x86_64.drpm .....................................................................................[done]
Retrieving package typelib-1_0-Gtk-3_0-3.20.10-17.3.20.x86_64                                                       (7/8), 335.2 KiB (879.3 KiB unpacked)
Retrieving delta: ./x86_64/typelib-1_0-Gtk-3_0-3.20.10-16.2_17.3.20.x86_64.drpm, 159.9 KiB
Retrieving: typelib-1_0-Gtk-3_0-3.20.10-16.2_17.3.20.x86_64.drpm ..................................................................................[done]
Applying delta: ./typelib-1_0-Gtk-3_0-3.20.10-16.2_17.3.20.x86_64.drpm ............................................................................[done]
Retrieving package gtk3-lang-3.20.10-17.3.20.noarch                                                                 (8/8),   2.6 MiB ( 18.8 MiB unpacked)
Retrieving delta: ./noarch/gtk3-lang-3.20.10-16.2_17.3.20.noarch.drpm, 178.6 KiB
Retrieving: gtk3-lang-3.20.10-16.2_17.3.20.noarch.drpm ............................................................................................[done]
Applying delta: ./gtk3-lang-3.20.10-16.2_17.3.20.noarch.drpm ......................................................................................[done]
Checking for file conflicts: ......................................................................................................................[done]
(1/8) Installing: autofs-5.0.9-28.3.5.x86_64 ......................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/autofs...


(2/8) Installing: gtk3-data-3.20.10-17.3.20.noarch ................................................................................................[done]
(3/8) Installing: xinetd-2.3.15-8.8.1.x86_64 ......................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/xinetd...


(4/8) Installing: yast2-xml-3.1.2-2.3.1.x86_64 ....................................................................................................[done]
(5/8) Installing: gtk3-tools-3.20.10-17.3.20.x86_64 ...............................................................................................[done]
(6/8) Installing: libgtk-3-0-3.20.10-17.3.20.x86_64 ...............................................................................................[done]
(7/8) Installing: typelib-1_0-Gtk-3_0-3.20.10-17.3.20.x86_64 ......................................................................................[done]
(8/8) Installing: gtk3-lang-3.20.10-17.3.20.noarch ................................................................................................[done]

Once all is patched make sure you have the zypper-migration-plugin installed on your system (which is already there in my case):

postgres@sles12sp2:/home/postgres/ [pg963] sudo zypper install zypper-migration-plugin
Refreshing service 'Containers_Module_12_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP2_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Software_Development_Kit_12_SP2_x86_64'.
Loading repository data...
Reading installed packages...
'zypper-migration-plugin' is already installed.
No update candidate for 'zypper-migration-plugin-0.10-12.4.noarch'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.
postgres@sles12sp2:/home/postgres/ [pg963] 

Ready to migrate to SP3:

postgres@sles12sp2:/home/postgres/ [pg963] sudo zypper migration

Executing 'zypper  refresh'

Retrieving repository 'SLE-Module-Containers12-Pool' metadata .....................................................................................[done]
Building repository 'SLE-Module-Containers12-Pool' cache ..........................................................................................[done]
Repository 'SLE-Module-Containers12-Updates' is up to date.                                                                                              
Repository 'SLES12-SP2-12.2-0' is up to date.                                                                                                            
Retrieving repository 'SLES12-SP2-Pool' metadata ..................................................................................................[done]
Building repository 'SLES12-SP2-Pool' cache .......................................................................................................[done]
Repository 'SLES12-SP2-Updates' is up to date.                                                                                                           
Retrieving repository 'SLE-SDK12-SP2-Pool' metadata ...............................................................................................[done]
Building repository 'SLE-SDK12-SP2-Pool' cache ....................................................................................................[done]
Repository 'SLE-SDK12-SP2-Updates' is up to date.                                                                                                        
All repositories have been refreshed.

Executing 'zypper  --no-refresh patch-check --updatestack-only'

Loading repository data...
Reading installed packages...

0 patches needed (0 security patches)

Available migrations:

    1 | SUSE Linux Enterprise Server 12 SP3 x86_64
        SUSE Linux Enterprise Software Development Kit 12 SP3 x86_64
        Containers Module 12 x86_64 (already installed)
       

[num/q]: 1

Executing 'snapper create --type pre --cleanup-algorithm=number --print-number --userdata important=yes --description 'before online migration''

Upgrading product SUSE Linux Enterprise Server 12 SP3 x86_64.
Found obsolete repository SLES12-SP2-12.2-0
Disable obsolete repository SLES12-SP2-12.2-0 [y/n] (y): y
... disabling.
Upgrading product SUSE Linux Enterprise Software Development Kit 12 SP3 x86_64.
Upgrading product Containers Module 12 x86_64.

Executing 'zypper --releasever 12.3 ref -f'

Warning: Enforced setting: $releasever=12.3
Forcing raw metadata refresh
Retrieving repository 'SLE-Module-Containers12-Pool' metadata ..............................................................................................[done]
Forcing building of repository cache
Building repository 'SLE-Module-Containers12-Pool' cache ...................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'SLE-Module-Containers12-Updates' metadata ...........................................................................................[done]
Forcing building of repository cache
Building repository 'SLE-Module-Containers12-Updates' cache ................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'SLES12-SP3-Pool' metadata ...........................................................................................................[done]
Forcing building of repository cache
Building repository 'SLES12-SP3-Pool' cache ................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'SLES12-SP3-Updates' metadata ........................................................................................................[done]
Forcing building of repository cache
Building repository 'SLES12-SP3-Updates' cache .............................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'SLE-SDK12-SP3-Pool' metadata ........................................................................................................[done]
Forcing building of repository cache
Building repository 'SLE-SDK12-SP3-Pool' cache .............................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'SLE-SDK12-SP3-Updates' metadata .....................................................................................................[done]
Forcing building of repository cache
Building repository 'SLE-SDK12-SP3-Updates' cache ..........................................................................................................[done]
All repositories have been refreshed.

Executing 'zypper --releasever 12.3  --no-refresh  dist-upgrade --no-allow-vendor-change '

Warning: Enforced setting: $releasever=12.3
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

The following 21 NEW packages are going to be installed:
  blog crash-kmp-default-7.1.8_k4.4.73_5-3.9 kernel-default-4.4.82-6.9.1 libefivar1 libfastjson4 libfreebl3 libibverbs libibverbs1 libmlx5-1 librados2 libsnapper4
  libsoftokn3 libtidyp-1_04-0 lttng-ust mozilla-nss mozilla-nss-certs patterns-sles-yast2 perl-HTML-Tidy python-talloc rdma-core sles-release-POOL

The following NEW pattern is going to be installed:
  yast2

The following 2 packages are going to be REMOVED:
  libsnapper3 pytalloc

The following 168 packages are going to be upgraded:
  aaa_base aaa_base-extras augeas augeas-lenses autoyast2 autoyast2-installation binutils cpupower crash cups-filters-ghostscript dbus-1 dbus-1-x11 dracut
  efibootmgr ethtool filesystem gdb grub2 grub2-i386-pc grub2-snapper-plugin grub2-systemd-sleep-plugin hwinfo ipmitool iscsiuio kdump kexec-tools kpartx
  libaugeas0 libblkid1 libcpupower0 libdbus-1-3 libdcerpc0 libdcerpc-binding0 libdrm2 libdrm_amdgpu1 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libfdisk1
  libgbm1 libgnutls28 libldb1 libLLVM libmount1 libndr0 libndr-krb5pac0 libndr-nbt0 libndr-standard0 libnetapi0 libp11-kit0 libparted0 libsamba-credentials0
  libsamba-errors0 libsamba-hostconfig0 libsamba-passdb0 libsamba-util0 libsamdb0 libsmartcols1 libsmbclient0 libsmbconf0 libsmbldap0 libsolv-tools libstorage7
  libstorage-ruby libtalloc2 libtasn1 libtasn1-6 libtdb1 libtevent0 libtevent-util0 libuuid1 libwbclient0 libx86emu1 libyui7 libyui-ncurses7 libyui-ncurses-pkg7
  linux-glibc-devel logrotate makedumpfile mcelog mdadm Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 multipath-tools open-iscsi openslp openslp-server openssh
  openssh-helpers p11-kit p11-kit-tools parted patterns-sles-base patterns-sles-laptop patterns-sles-Minimal perl-Bootloader perl-solv postfix python-solv
  release-notes-sles rollback-helper rsyslog ruby2.1-rubygem-cfa ruby2.1-rubygem-cfa_grub2 samba-client samba-libs samba-winbind sle-sdk-release
  sle-sdk-release-POOL sles-release snapper snapper-zypp-plugin sudo SUSEConnect SuSEfirewall2 systemd-presets-branding-SLE sysvinit-tools util-linux
  util-linux-lang util-linux-systemd yast2 yast2-add-on yast2-bootloader yast2-ca-management yast2-core yast2-country yast2-country-data yast2-dhcp-server
  yast2-dns-server yast2-firewall yast2-ftp-server yast2-hardware-detection yast2-http-server yast2-installation yast2-iscsi-client yast2-kdump yast2-ldap
  yast2-mail yast2-migration yast2-network yast2-nis-client yast2-ntp-client yast2-packager yast2-pam yast2-perl-bindings yast2-pkg-bindings yast2-printer
  yast2-registration yast2-ruby-bindings yast2-samba-client yast2-schema yast2-services-manager yast2-slp yast2-smt yast2-snapper yast2-storage yast2-support
  yast2-theme-SLE yast2-trans-en_US yast2-update yast2-users yast2-vm yast2-ycp-ui-bindings zypper zypper-lifecycle-plugin zypper-log

The following 3 patterns are going to be upgraded:
  base laptop Minimal

The following 2 products are going to be upgraded:
  "SUSE Linux Enterprise Server 12 SP2" "SUSE Linux Enterprise Software Development Kit 12"

The following 19 packages are going to be downgraded:
  branding-SLE grub2-branding-SLE iptables kernel-firmware libapparmor1 libICE6 libiptc0 libjasper1 libldap-2_4-2 libxtables10 libzypp nfs-client
  nfs-kernel-server openldap2-client openldap2-devel plymouth-branding-SLE wallpaper-branding-SLE xtables-plugins yast2-auth-client

The following package is going to change architecture:
  yast2-network  x86_64 -> noarch


The following 5 packages are not supported by their vendor:
  libtidyp-1_04-0 openldap2-devel perl-HTML-Tidy sle-sdk-release sle-sdk-release-POOL

168 packages to upgrade, 19 to downgrade, 21 new, 2 to remove, 1 to change arch.
Overall download size: 171.1 MiB. Already cached: 0 B. After the operation, additional 184.6 MiB will be used.
Continue? [y/n/...? shows all options] (y): y

As I am fine with the summary I’ll proceed:

(Use arrows or pgUp/pgDown keys to scroll the text by lines or pages.)

In order to install 'SUSE Linux Enterprise Software Development Kit 12 SP3' (product), you must agree to terms of the following license agreement:

SUSE(R) Linux Enterprise Software Development Kit 12 Service Pack 3
 
SUSE End User License Agreement 

Of course you need to agree to the license agreement and then the migration starts. At the end you should see something like this:

    dracut: *** Creating image file '/boot/initrd-4.4.82-6.9-default' ***
    dracut: *** Creating initramfs image file '/boot/initrd-4.4.82-6.9-default' done ***

There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run 'zypper ps -s' to list these programs.

Executing 'snapper create --type post --pre-number 29 --cleanup-algorithm=number --print-number --userdata important=yes --description 'after online migration''

That’s all:

postgres@sles12sp2:/home/postgres/ [pg963] cat /etc/os-release 
NAME="SLES"
VERSION="12-SP3"
VERSION_ID="12.3"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp3"

Of course the kernel is still the old one and the new one will become active after the next reboot:

postgres@sles12sp2:/home/postgres/ [pg963] sudo systemctl reboot
...
...
postgres@sles12sp2:/home/postgres/ [pg963] uname -a
Linux sles12sp2 4.4.82-6.9-default #1 SMP Tue Sep 19 06:38:15 UTC 2017 (d4a2d80) x86_64 x86_64 x86_64 GNU/Linux

Quite easy.