Document navigation

Scenario

  • Product: ZCF
  • Component: ZStack Cloud
  • Version: 4.8.x
  • Storage type: sharedblock
  • Scope: x86 hosts only
  • Current kernel: 4.19.90-25.21.v2101.ky10.x86_64
  • Target kernel package: 4.19.90-25.54.tar.gz
  • Trigger: Production x86 host kernels must be upgraded one by one. ARM hosts are outside this change scope.

Symptoms

  • x86 host kernels must be upgraded.
  • Other VM workloads must remain normal during the change.
  • The target host must be restarted, so its VMs must be live-migrated first.

Assessment

  1. Confirm that the target host has no running VM before upgrade.
  2. Check whether uname -r changes to the target kernel after restart.
  3. Check VM status and resource connections after upgrade.

Cause

This is a host-kernel upgrade, not a platform-version upgrade. Because the new kernel takes effect only after restart, evacuate the host, install the kernel, set the grubby default entry, restart one host at a time, and verify.

Resolution

  1. Preparation
  • Risk level: High.
  • Disable global high availability in ZStack Cloud.
  • Live-migrate all VMs from each host to be upgraded.
  • It is recommended to perform the change during a low-traffic window.
  1. Upload and verify the kernel package
  2. Upload the package:

~~~text 4.19.90-25.54.tar.gz ~~~

  1. Verify md5:

~~~text 4e16d393945e9f479c9b05062a4eb2a9 ~~~

  • Expected result: The upgrade package is intact.
  1. Install the new kernel
  2. Extract the package:

~~~bash tar -zxvf 4.19.90-25.54.tar.gz cd 4.19.90-25.54/ ~~~

  • Expected result: The kernel package directory is open.
  1. Install the kernel:

~~~bash yum install --disablerepo= ./kernel- ~~~

  • Expected result: The new kernel is installed.
  1. Set the default boot entry and restart
  2. Display all boot entries:

~~~bash grubby --info=ALL | grep -E '^title|^index' ~~~

  • Expected result: The index for Kylin Linux Advanced Server (4.19.90-25.54.v2101.ky10.x86_64) V10 (ZStack) is found.
  1. If the new kernel is not the default, set it:

~~~bash grubby --set-default-index=<index> ~~~

  • Expected result: The next restart uses the new kernel.
  1. Confirm that no VM is running:

~~~bash virsh list ~~~

  • Expected result: The target host is evacuated.
  1. If the host is a management node, stop management services first, then restart:

~~~bash sync;sync;reboot ~~~

  • Expected result: The host starts with the new kernel.
  1. Verify after restart:

~~~bash uname -r ~~~

  • Expected result: The target kernel version is displayed.
  1. Closeout
  2. Check VM state.
  3. Check resource connection status.
  4. Enable global high availability.
  • Expected result: Normal platform protection is restored.

Verification

  • Verify that virsh list is empty before restart.
  • Verify that uname -r shows the target kernel after restart.
  • Verify normal VM state and platform resource connections.
  • Verify that high availability is enabled.

Risks and rollback

  • Risk: Kernel upgrade requires a restart; failing to evacuate the host interrupts workloads.
  • Risk: It is recommended to perform live migration during a low-traffic window.
  • Risk level: High.

Rollback

  1. Display the old kernel boot entry:

~~~bash grubby --info=ALL | grep -E '^title|^index' ~~~

  1. Set the default entry back to 4.19.90-25.21.v2101.ky10.x86_64:

~~~bash grubby --set-default-index=<old_kernel_index> ~~~

  1. Restart and verify:

~~~bash sync;sync;reboot uname -r ~~~

  • Expected result: The host returns to the previous kernel version.
Upgrade Host Kernels for ZStack Cloud 4.8.x | 技术方案 · KB | ZStack Resource Center