主要版本升级

This method covers major version upgrades such as SUSE Linux Enterprise Server 12 to SUSE Linux Enterprise Server 15. The upgrade is controlled by YaST and AutoYaST, it does not use Zypper.

客户端必须有所安装操作系统的最新可用服务包 (SP) 且已应用所有最新更新。开始前,请确保系统是最新的,并且已成功安装所有更新。

This method does not apply to the upgrade from SUSE Linux Enterprise Server 15 to SUSE Linux Enterprise Server 16. To upgrade from SUSE Linux Enterprise Server 15 SP7 to SUSE Linux Enterprise Server 16.0, use product migration instead. For more information, see 产品迁移.

1. 准备迁移

需要先完成以下步骤,才能将客户端从 SLE 12 迁移到 SLE 15:

  1. 准备安装媒体

  2. 声明自动安装发行套件

  3. 创建激活密钥

  4. 创建自动安装配置文件

1.1. 准备安装媒体

过程:准备安装媒体
  1. 在容器主机上,下载包含安装源的 ISO 映像。

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

    mgradm distribution copy <映像名称>.iso <映像名称>
  3. Take a note of the distribution path reported by mgradm. You will need it when you declare the distribution to SUSE Multi-Linux Manager.

此映像可用于多个自动安装发行套件。

有关详细信息,请参见 可自动安装的发行套件

1.2. 声明自动安装发行套件

过程:声明自动安装发行套件
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到系统  自动安装  发行套件

  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. * 可选:指定引导此发行套件时要使用的内核选项。 可以通过多种方式来提供内核选项。 此处仅添加了发行套件通用的选项。

  3. 单击 创建可自动安装的发行套件

1.3. 创建激活密钥

例如,要从旧 SLE 12 基础通道切换到新的 SLE 15 通道,需要有激活密钥。

Procedure: Creating an Activation Key
  1. In the SUSE Multi-Linux Manager Web UI, as an administrator, navigate to Systems  Activation Keys.

  2. Click the Create Key button.

  3. On the Activation Key Details page, in the Description field, enter a description of the activation key.

  4. In the Key field, enter a name for the activation key. For example, SLES15-SP7 for SUSE Linux Enterprise Server 15 SP7.

    • Do not use commas or double quotes in the Key field for any SUSE products. However, you must use commas for Red Hat Products.

    • All other characters are allowed, but <> (){} (this includes the space) are removed automatically.

    • If the field is left empty, a random string is generated.

  5. In the Usage add number of times the key can be used, or leave it blank for unlimited usage.

  6. In the Base Channels drop-down box, select the appropriate base software channel, and allow the relevant child channels to populate. For more information, see 安装向导 and 自定义通道.

  7. Select the Child Channels you need (for example, the mandatory SUSE Multi-Linux Manager tools and updates channels).

  8. Check the Add-On System Types checkbox if you need to enable any of the options. For more information about system types, see 系统类型.

  9. We recommend you leave the Contact Method set to Default. For more information about contact methods, see 客户端联系方法.

  10. We recommend you leave the Universal Default setting unchecked.

  11. Click Create Activation Key to create the activation key.

  12. After the activation key is created, the page shows additional checkbox Configuration File Deployment below the list of Add-On System Types. To enable deploying configuration files to systems on registration, select this checkbox.

  13. Click Update Activation Key to save the change.

1.4. 创建自动安装配置文件

自动安装配置文件包含安装系统所需的所有安装和配置数据,还包含在完成安装后需要执行的脚本。例如,可用作着手点的脚本,请参见 https://github.com/SUSE/manager-build-profiles/tree/master/AutoYaST

有关有效的 AutoYaST 升级设置,请参见 https://doc.opensuse.org/projects/autoyast/#CreateProfile-upgrade

过程:创建自动安装配置文件
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到系统  自动安装  配置文件,然后上载自动安装配置文件脚本。

    有关可用作着手点的示例脚本,请参见:

  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. 粘贴自动安装配置文件或使用文件上载字段。

  4. 单击 创建 保存设置。

  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.

    使用以下格式指定所需的变量:

    <key>=<value>

2. 迁移

在开始前,需检查自动安装配置文件中引用的所有通道是否可用并已完全同步。

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

过程:迁移
  1. In the SUSE Multi-Linux Manager 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. 单击 安排自动安装并完成。系统会下载所需的文件,更改引导加载程序项,重引导并开始升级。

Next time the client synchronizes with the SUSE Multi-Linux Manager 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.

客户端下次引导时,会使用 grub 来引导新内核及其 initrd。此过程中不会使用 PXE 引导。

提取作业约 3 分钟后,客户端会关闭以重引导。

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