主要版本升级

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

升级由 YaST 和 AutoYaST 控制,该过程不使用 Zypper。

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 通道,需要有激活密钥。

过程:创建激活密钥
  1. In the SUSE Multi-Linux Manager Server Web UI, navigate to Systems  Activation Keys and click Create Key.

  2. 输入密钥说明。

  3. 输入密钥或将其留空以生成自动密钥。

  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. 有关详细信息,请参见 https://documentation.suse.com/sles/15-SP7/html/SLES-all/article-modules.html

  7. 单击 创建激活密钥

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

  9. 单击 更新密钥

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.