Prepare for Upgrade

Before upgrading ZSphere, confirm the current environment version, prepare the required upgrade packages, and complete the required protection operations.

Procedure

  1. Check the current environment version and operating system version.
    [root@localhost ~]# zstack-ctl status
    [root@localhost ~]# cat /etc/redhat-release
  2. Obtain the installation and upgrade packages.
    Download the zstack-upgrade script, ISO package, installation and upgrade package, and management node HA suite as needed.
  3. Disable the HA policy.
    Before the upgrade, disable the global switch for VM high availability to avoid accidentally triggering VM HA during the upgrade. Enable the HA policy manually after the upgrade is complete.
    1. Log in to ZSphere.
    2. Click Reliability > HA Policy to go to the HA Policy page.
    3. Disable the HA policy switch.
  4. Back up the database and upgrade script.
    Log in to the management node operating system and run the following commands to back up the database and upgrade script for emergency recovery.
    # Back up the database to the /var/lib/zstack/mysql-backup/ directory
    [root@localhost ~]# zstack-ctl dump_mysql --file-name zstack-db-backup
    
    # Back up the upgrade script to the /root/ directory
    [root@localhost ~]# cp /usr/local/bin/zstack-upgrade /root/zstack-upgrade-bk