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
- Confirm that the target host has no running VM before upgrade.
- Check whether uname -r changes to the target kernel after restart.
- 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
- 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.
- Upload and verify the kernel package
- Upload the package:
~~~text 4.19.90-25.54.tar.gz ~~~
- Verify md5:
~~~text 4e16d393945e9f479c9b05062a4eb2a9 ~~~
- Expected result: The upgrade package is intact.
- Install the new kernel
- 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.
- Install the kernel:
~~~bash yum install --disablerepo= ./kernel- ~~~
- Expected result: The new kernel is installed.
- Set the default boot entry and restart
- 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.
- 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.
- Confirm that no VM is running:
~~~bash virsh list ~~~
- Expected result: The target host is evacuated.
- 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.
- Verify after restart:
~~~bash uname -r ~~~
- Expected result: The target kernel version is displayed.
- Closeout
- Check VM state.
- Check resource connection status.
- 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
- Display the old kernel boot entry:
~~~bash grubby --info=ALL | grep -E '^title|^index' ~~~
- Set the default entry back to 4.19.90-25.21.v2101.ky10.x86_64:
~~~bash grubby --set-default-index=<old_kernel_index> ~~~
- Restart and verify:
~~~bash sync;sync;reboot uname -r ~~~
- Expected result: The host returns to the previous kernel version.
