Upgrade the Host QEMU

As the Cloud requires that all hosts in a cluster are installed with QEMU of the same version, we recommend that you use CLI commands to execute the QEMU upgrading to hosts in a cluster in batch.

Scenario Assumption: After upgrading an h79c Cloud t0 4.7.21 version, you find the host QEMU version is not consistent with the recommended version and an upgrading is needed.

You can follow these steps to upgrade the host QEMU to the recommended version:
  1. Prepare the latest ZStack Cloud ISO.
  2. Check the Cloud services and the connection of the hardware resources.
  3. Disable the VM high availability globally.
  4. Query the current host QEMU version.
  5. Backup the database of the management node(s).
  6. Update the local repo of the management node(s).
  7. Enable the global setting: zstack.experimental.repo.
  8. Update the QEMU version of the hosts in the cluster.
  9. Check the upgrading result.
  1. Prepare the latest ZStack Cloud ISO.
    Prepare the ISO according to your Cloud version. For example, if your Cloud is based on an h79c ISO, prepare a new h79c ISO of the latest version.
  2. Check the Cloud services and the connection of the hardware resources.
    Ensure the Cloud services are normal and hardware resources are connected properly.
  3. Disable the VM high availability globally.
    On the main menu of ZStack Cloud, choose Settings > Platform Setting > HA Policy. On the HA Policy page, click the Disable button on the upper right corner.
  4. Query the current host QEMU version.
    Log in to one host in the cluster, and run the following command to query the current QEMU:
    [root@localhost ~]# qemu-img -V
    Figure 1. Host QEMU Version Before Upgrade


  5. Back up the database of the management node(s).
    Before you upgrade the host QEMU, log in to the management node, and back up the database to/var/lib/zstack/mysql-backup/lib/zstack/mysql-backup/. The backup can be used for the recovery if an error occurs during the upgrade.
    [root@localhost ~]# zstack-ctl dump_mysql --file-name zstack-db-backup
    Note: If you deploy two management nodes for the Cloud, log in to the two nodes to back up the database respectively.
  6. Update the local repo of the management node(s).
    Upload the ISO you prepared to the directory /root/ of the management node, and run the following command to update the local repo:
    [root@localhost ~]# bash /root/zstack-upgrade -r ZStack-Cloud-x86_64-DVD-4.7.21-h79c.iso
    Note: If you deploy two management nodes for the Cloud, log in to the two nodes and update their local repo respectively.
  7. Enable the global setting zstack.experimental.repo.
    Run the following commands on the management node:
    [root@localhost ~]# zstack-cli # Enable the CLI command line. - >>>  LogInByAccount accountName=admin password=password # Log in to Cloud as the admin. The password of the account in this scenario is password. admin >>> UpdateGlobalConfig category=cluster name=zstack.experimental.repo value=true # Enable zstack.experimental.repo.
    Note: If you deploy two management nodes for the Cloud, execute this action on the management node whose IP address is correspond to the VIP you use.
  8. Update the QEMU version for the hosts in the cluster.
    Run the following command to upgrade the QEMU of the host in the cluster to the recommended version in batch:
    admin >>> UpdateClusterOS updatePackages=qemu-kvm-ev uuid=56a98a7ebd544f6782a9f1ed5c8920c4 # In this scenario, 823ca1c0578f4d638d77a2c4ed316b76 is the cluster UUID. You can view your cluster UUID on the cluster details page, or run QueryCluster to obtain it.

    Record the LongJob UUID returned.

    Figure 2. LongJob UUID


  9. Check the upgrading result.
    1. Check whether the upgrade is finished.
      Use the LongJob UUID returned the previous step to check whether the upgrading is finished. In this scenario, the UUID is 8e52dc79815e4baab006448eee3e3b8e
      admin >>> QueryLongJob uuid=8e52dc79815e4baab006448eee3e3b8e

      If the state value returned is Succeeded, the upgrading is finished.

      Figure 3. Check Whether the Upgrading is Finished


    2. Query the host QEMU version after the upgrading.
      Log in to the hosts in the cluster, and run the following command to query the QEMU version:
      [root@localhost ~]# qemu-img -V
      Figure 4. Host QEMU Version After Upgrading


    3. Check whether the host QEMU version is consistent with the recommend version after the upgrading.
      Run the following CLI commands on the management node:
      [root@localhost ~]# zstack-cli # Enbale the CLI command line. - >>>  LogInByAccount accountName=admin password=password # Log in to the Cloud as the admin. password is the account passowrd in this scenario. admin >>> GetVirtualizerInfo uuid=41d57de3f7204c6e9e12b180d530fa3f # 41d57de3f7204c6e9e12b180d530fa3f is the host UUID in this scenario.
      The returned matchState value as Matched means that you have successfully upgraded the host QEMU to the recommended version.
      Figure 5. Check Whether the QEMU is Upgraded to the Recommended Version


  10. Disable the global setting zstack.experimental.repo.
    After the upgrading, run the following CLI command to disable the global setting zstack.experimental.repo:
    admin >>> UpdateGlobalConfig category=cluster name=zstack.experimental.repo value=false
Now, you have finished the host QEMU upgrading with CLI commands. You need to reboot or migrate the VM instances, VPC vRouters, and LB instances running on the hosts to update the QEMU version of these virtual resources to the latest.

Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.