注册 SL Micro 客户端

本节包含有关注册运行 SL Micro 操作系统 6.0 x86-64、arm64 和 IBM Z (s390x) 的客户端的信息。

SL Micro 使用事务更新。事务更新是原子更新(仅当所有更新都成功时,才应用所有更新)且支持回滚。它们不会影响正在运行的系统,因为在系统重引导之前,任何更改都不会生效。

For more information on transactional updates and rebooting, see https://documentation.suse.com/sles/15-SP7/html/SLES-all/cha-transactional-updates.html.

1. 添加软件通道

将 SL Micro 客户端注册到 SUSE Multi-Linux Manager 服务器之前,您需要添加所需的软件通道,并同步这些通道。

可以使用 Web UI 或命令行添加软件通道。

In the following section, descriptions often default to the x86_64 architecture. Replace it with other architectures if appropriate.

如果使用 Web UI,您需要执行以下步骤:

Table 1. SL Micro 6.2 产品 - Web UI
操作系统版本 产品名称

SL Micro 6.2 x86-64

SUSE Linux Micro 6.2 x86_64

SL Micro 6.2 arm64

SUSE Linux Micro 6.2 arch64

SL Micro 6.2 s390x

SUSE Linux Micro 6.2 s390x

SL Micro 6.2 ppc64le

SUSE Linux Micro 6.2 ppc64le

Table 2. SL Micro 6.1 产品 - WebUI
操作系统版本 产品名称

SL Micro 6.1 x86-64

SUSE Linux Micro 6.1 x86_64

SL Micro 6.1 arm64

SUSE Linux Micro 6.1 arch64

SL Micro 6.1 s390x

SUSE Linux Micro 6.1 s390x

SL Micro 6.1 ppc64le

SUSE Linux Micro 6.1 ppc64le

Table 3. SL Micro 6.0 产品 - WebUI
操作系统版本 产品名称

SL Micro 6.0 x86-64

SUSE Linux Micro 6.0 x86_64

SL Micro 6.0 arm64

SUSE Linux Micro 6.0 arch64

SL Micro 6.0 s390x

SUSE Linux Micro 6.0 s390x

SL Micro 6.0 ppc64le

SUSE Linux Micro 6.0 ppc64le

过程:添加软件通道
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到管理  安装向导  产品

  2. Locate the appropriate products for your client operating system and architecture using the search bar, and check the appropriate product. This will automatically check all mandatory channels. Also all recommended channels are checked as long as the include recommended toggle is turned on. Click the arrow to see the complete list of related products, and ensure that any extra products you require are checked.

  3. 单击 添加产品 并等待产品完成同步。

或者,您也可以在命令提示符处添加通道。执行此过程需要以下产品:

Table 4. SL Micro 6.2 产品 - CLI
操作系统版本 基础通道

SL Micro 6.2 x86-64

sl-micro-6.2-pool-x86_64

Table 5. SL Micro 6.1 产品 - CLI
操作系统版本 基础通道

SL Micro 6.1 x86-64

sl-micro-6.1-pool-x86_64

Table 6. SL Micro 6.0 产品 - CLI
操作系统版本 基础通道

SL Micro 6.0 x86-64

sl-micro-6.0-pool-x86_64

过程:通过命令行添加软件通道
  1. 在 SUSE Multi-Linux Manager 容器主机的命令提示符处,以 root 身份命令添加相应的通道:

    mgrctl exec -- mgr-sync add channel <channel_label_1>
    mgrctl exec -- mgr-sync add channel <channel_label_2>
    mgrctl exec -- mgr-sync add channel <channel_label_n>
  2. 系统会自动启动同步。如果您要手动同步通道,请使用以下命令:

    mgrctl exec -- mgr-sync sync --with-children <channel_name>
  3. 确保同步已完成,然后再继续操作。

2. 检查同步状态

过程:通过 Web UI 检查同步进度
  1. In the SUSE Multi-Linux Manager Web UI, navigate to Admin  Setup Wizard and select the Products tab. This dialog displays a completion bar for each product when they are being synchronized.

  2. Alternatively, you can navigate to Software  Manage  Channels, then click the channel associated to the repository. Navigate to the Repositories tab, then click Sync and check Sync Status.

过程:通过命令行检查同步进度
  1. 要在跟踪日志前列出可用日志,请在容器主机上运行以下命令:

    mgrctl exec ls /var/log/rhn/reposync/
  2. 在 SUSE Multi-Linux Manager 容器主机的命令提示符处,以 root 身份检查通道日志文件的同步:

    mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log
  3. 每个子通道在同步过程中会生成自身的日志。您需要检查所有基础通道和子通道日志文件,以确保同步完成。

3. 注册客户端

SL Micro 客户端在注册后需要进行重引导。尽管系统在完成注册后会自动安排重引导,但会采用默认的重引导管理器维护时段。此时段在客户端注册后可能会持续几个小时。建议在注册脚本完成后手动重引导客户端,以加速注册过程并使系统显示在系统列表中。

要注册您的客户端,需要有引导储存库。系统默认会自动创建引导储存库,并且每天会为所有同步的产品重新生成该储存库。您可以在容器主机的命令提示符处手动创建引导储存库:

mgrctl exec -ti mgr-create-bootstrap-repo

有关注册客户端的详细信息,请参见 客户端注册

对 SL Micro 系统使用引导脚本时,请确保脚本的 certificate 部分包含以下内容:

ORG_CA_CERT=RHN-ORG-TRUSTED-SSL-CERT
ORG_CA_CERT_IS_RPM_YN=0

直接编辑引导脚本并添加该设置,或使用以下参数创建引导脚本:

mgrctl exec -ti -- mgr-bootstrap --script=bootstrap-sl-micro.sh \
    --ssl-cert=/srv/www/htdocs/pub/RHN-ORG-TRUSTED-SSL-CERT

4. 重引导 SL Micro

SL Micro is a transactional system. Transactional updates in general support several reboot methods. It is recommended to use systemd for rebooting in systems managed by SUSE Multi-Linux Manager. Using other methods can lead to undesired behavior.

When bootstrapping a transactional system on SUSE Multi-Linux Manager, systemd will be configured as the reboot method (REBOOT_METHOD), if the system is in its default configuration. Such a configuration allows SUSE Multi-Linux Manager to control the reboot action, and rebooting can be performed immediately or scheduled with SUSE Multi-Linux Manager as wanted.

4.1. 背景信息

By default, the reboot method during client installation is set to auto. With the auto boot method, rebootmgrd will be used to reboot the system according to the configured policies if the service is running. Policies can be to reboot instantly or during a maintenance window. For more information, see the rebootmgrd(8) man page. Otherwise if rebootmgrd is not running, SUSE Multi-Linux Manager will call systemctl reboot.

Using any method different from systemd may cause undesired behavior.