ZSvirt Upgrade

Upgrade Management Node

This section uses H84r as an example to introduce a step-by-step guide for upgrading a single management node environment.

Procedure

  1. Check the current environment version and the operating system version.

    [root@localhost ~]# zstack-ctl status
    [root@localhost ~]# cat /etc/readhat-release
  2. Obtain the upgrade packages.

    Download the zstack-upgrade script,ISO software package, upgrade packages, and the HA suite for management node as needed.

  3. Disable the HA policy.

    Before the upgrade, you need to disable the global switch for virtual machine high availability to avoid triggering it accidentally, which could affect the upgrade. After the upgrade is complete, manually enable the HA policy.

    1. Log in to ZSvirt.

    2. Click Business Reliability > HA Policy to enter the HA Policy page.

    3. Disable the HA policy switch.

  4. Back up the database and upgrade script.

    Log in to the management node system and then 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
  5. Upgrade ZSvirt.

    # Two offline upgrade methods are supported. The first method is recommended.
    # Method 1: Upgrade the local repository and management services
    [root@zstack-1 opt]# zstack-upgrade ZSvirt-x86_64-DVD-1.0.0-h84r.iso
    
    # Method 2: First upgrade the local repository and then upgrade the management services
    [root@zstack-1 opt]# zstack-upgrade -r ZSvirt-x86_64-DVD-1.0.0-h84r.iso 
    [root@zstack-1 opt]# bash ZSvirt-installer-1.0.0.bin -u -P MYSQL_ROOT_PASSWORD

    Note:

    • If the database root password uses the system default password zstack.mysql.password, you can omit the -P MYSQL_ROOT_PASSWORD parameter.
    • Before executing the zstack-upgrade command, ensure that the prepared ISO is based on version H84r to avoid using other ISOs that may overwrite the local source.
  6. Clear the browser cache.

    To ensure that the new features work properly, it is recommended that after the upgrade is complete, you log in to the UI management interface and manually clear the browser cache by pressing Ctrl+F5 or Ctrl+Shift+R.

  7. Enable the HA policy.

On this page