After upgrading the platform version, you can upgrade the host kernel as needed. Restart the host after installing the new kernel for it to take effect.
- The platform version upgrade is complete, and management services are running properly.
- An ISO that matches the target platform version, host operating system, and architecture is available. This task uses the H84r ISO as an example.
- A maintenance window has been scheduled, and migration or downtime has been planned for VMs on the hosts to be upgraded.
Note: Before upgrading a production environment, we recommend that you contact technical support to confirm the upgrade plan and related precautions.
Different platform versions may use different kernel versions. A platform version upgrade does not automatically update the kernel on hosts. After upgrading the platform version, you can upgrade the host kernel as needed to use the features and security fixes provided by the new kernel.
-
Make sure the management node's local repository has been updated to the target version.
If the local repository has already been updated with the corresponding ISO, you do not need to repeat this operation. Otherwise, log in to the management node and run the following command. If management node HA is configured, run the command on each management node.
[root@localhost ~]# bash zstack-upgrade -r ZStack-ZSphere-x86_64-DVD-5.2.0-H84r.iso
-
Back up the management node database.
On the management node, run the following command to back up the database to the
/var/lib/zstack/mysql-backup/ directory. If management node HA is configured, run the command on each management node.
[root@localhost ~]# zstack-ctl dump_mysql --file-name zstack-db-backup
-
Check platform services and resource connections.
Make sure management services are running properly. In the management UI, check that the hosts to be upgraded and the related storage resources are connected.
-
Disable the VM HA policy.
Log in to the ZSphere management UI and click . Turn off the global VM HA switch.
-
Log in to the management node CLI.
Log in to the management node and run the following commands. If management node HA is configured, run the commands on the management node where the VIP resides. You can use
zsha2 status to identify that node. Replace
ADMIN_PASSWORD with the actual admin account password.
[root@localhost ~]# zstack-cli
- >>> LogInByAccount accountName=admin password=ADMIN_PASSWORD
-
Upgrade the kernel on hosts in the specified cluster.
Query clusters in the CLI to obtain the UUID of the cluster to upgrade. Replace
CLUSTER_UUID with the actual cluster UUID and run the upgrade command.
admin >>> QueryCluster
admin >>> UpdateClusterOS updatePackages=kernel excludePackages=python2-crypto uuid=CLUSTER_UUID
Record the UUID of the returned upgrade task. Replace LONG_JOB_UUID in the following command with that UUID to query the task status. A state of Succeeded indicates that the upgrade task is complete.
admin >>> QueryLongJob uuid=LONG_JOB_UUID
If other clusters need to be upgraded, upgrade them one cluster at a time.
-
Check the upgraded kernel version.
Log in to the host and run the following command to confirm that the kernel packages have been upgraded to the target version.
[root@localhost ~]# rpm -qa | grep -i kernel
-
Restart the hosts one at a time for the new kernel to take effect.
Restarting a host temporarily interrupts workloads on its VMs. Perform this operation outside of peak business hours.
-
Enable the VM HA policy.
Log in to the ZSphere management UI and click . Turn on the global VM HA switch.