Introduction
Product Version
This document applies to ZStack Cloud 5.4.12.
Intended Audience
- Technical support engineers
- Maintenance engineers
- Product consulting engineers
- People who are interested in ZStack Cloud
Overview

Management Node Maintenance
This section mainly describes how to maintain management nodes (MNs) in ZStack Cloud.
Considerations
- Before you perform any maintenance like upgrade or reboot , disable the VM HA globally. Method: On the main menu of the UI, choose . On the HA Policy page, disable the HA Policy option. You can manually enable this functionality after the maintenance is completed.
MN HA
Set Up a Dual-MN HA Environment
Overview
ZStack Cloud provides high availability (HA) for dual-management node by using separate HA suites. When any one of the MNs is disconnected, the HA will be triggered in seconds to ensure the business continuity.
HA Mechanism: Each MN runs a zsha2 HA process. This process monitors the critical services, including the MN service, UI service, and database service, on each MN in real time. When any critical service is down, the Cloud immediately triggers virtual IP (VIP) migration through Keepalived, and then attempts to restore the downtime service.
Taking the dual-MN HA scenario as an example, this section introduces how to install, deploy, and upgrade a dual-MN HA environment and other related considerations. For detailed information, see Dual-MN HA Tutorial.
Installation and Deployment
- Switch a Single-MN Scenario to a Dual-MN HA Scenario
- Download the latest software packages, including ZStack Cloud ISO, ZStack Cloud installation package and Multi-MN HA Suite.
- Upgrade ZStack Cloud to the latest version on the local MN (MN1).
- Install the latest ZStack Cloud on the new MN (MN2).
- Install the license for MN2. In this scenario, the license type of two MNs must be the same.
- Import the HA suite to MN1. Then decompress and install the suite.
- Deploy a New Dual-MN HA Scenario
- Download the latest software packages, including ZStack Cloud ISO, ZStack Cloud installation package and Multi-MN HA Suite.
- Install the latest ZStack Cloud on the two new MNs.
- Install the license for the two new MNs. In this scenario, the license type of two MNs also must be the same.
- Import the HA suite to either MN. Then decompress and install the suite.
Upgrade
- Upgrade the HA Suite
After you obtain the new HA suite, you can use the suite to upgrade the existing zsha2 service.
If the databases of the two MNs are automatically synchronized, import the HA suite to the active MN and decompress it. Run the following command on the active MN to complete the upgrade of the HA suite:[root@localhost ~]# ./zsha2 upgrade-ha - Upgrade the MNs
In the dual-MA HA scenario, you must upgrade the HA suite before upgrading the MNs.
Run the following commands on either MN. Then, both MNs will be upgraded:- If you upgrade the MN from the bin package, run the following
command:
[root@localhost ~]# zsha2 upgrade-mn -peerpass password ./ZStack-Cloud-installer-5.4.12.bin - If you upgrade the MN from ISO, run the following
command:
[root@localhost ~]# zsha2 upgrade-mn -peerpass password ./ZStack-Cloud-x86_64-DVD-5.4.12-h84r.iso
Note: The
-peerpassparameter is optional. You can use this parameter to set the SSH login password for the peer MN.
- If you upgrade the MN from the bin package, run the following
command:
Considerations
- MNs must meet the configuration requirements: 8 CPUs plus 12GB memory or higher.
- We recommend that you use a 10-Gigabit or above bandwidth for the management network. If the management network is deployed independently, a 1-Gigabit bandwidth is allowed.
- We recommend that you create a static bridge via zs-network-setting.
- The multi-MN HA suite requires and must be paired with ZStack Cloud of 2.6.0 version and above. For example, HA suite 2.6.0 must be paired with ZStack Cloud 2.6.0.
- The ZStack Cloud version and the license type of two MNs must be the same.
- To install the HA suite, you need to put zsha2 and zstack-hamon in the same directory. During installation, zsha2 will automatically deploy zstack-hamon and other related configuration files.
- During installation, the database of the standby MN will be overwritten by that of the active MN. Please exercise caution.
- To ensure the real-time synchronization of monitoring data between two MNs, we recommend that you configure SSH password-free login for the two MNs.
- The Chrome browser used to access MNs requires version 49 or later.
MN Disaster Recovery
Note:
- Prepare a new server of the same model and configurations as the original MN server.
- If an OS failure occurs on the original MN, you can continue to use the original MN server to reinstall ZStack Cloud.
Preparations
Local Database Backup
/var/lib/zstack/mysql-backup/ directory on the MN and
can be verified by using the crontab -l
command.30 0,12 * * * zstack-ctl dump_mysql --keep-amount 14crontab -e command: set Backup Cycle to Backup by Hour and Data
Retention Policy to by count. A maximum of 200 local backup can be
reserved.30 * * * * zstack-ctl dump_mysql --keep-amount 200Remote Database Backup
In case that MNs have no access to the system due to failures, we recommend that you make remote database backups.
# Generate an SSH key on the MN
ssh-keygen
# Copy the SSH key to the remote backup server. First-time login requires manual verification by typing yes, followed by the root password.
ssh-copy-id root@172.20.12.75Remote Database Redundancy
If two or more servers support data redundancy, you can make remote backup on the remote backup server.
crontab -e to
change crontab. You can schedule remote backups by using the
rsync command. This command copies the database directory
where the MN stores.
# At midnight and midnoon, back up the MN database to the /var/lib/zstack/from-zstack-remote-backup/ path. No more than 24 databases are allowed.
0 0,12 * * * zstack-ctl dump_mysql --host root@172.20.12.75 --d --keep-amount 24MN Disaster Recovery
About this task
Assume that MNs have no access to the system due to hardware or software failures, follow the steps below to achieve disaster recovery.Procedure
-
Install the operating system (OS) for the MNs.
Install the OS according to ZStack Cloud ISO. You can either reinstall the OS for the original MN, or select a new server as a new MN.
-
Install ZStack Cloud.
You can refer to the installation files on ZStack Cloud Official Website
Note: You have to install the working version prior to failures. For example, if
you use ZStack Cloud 3.8.0 before the failures occur,
redeploy the same version to ensure stability. -
Update licenses.
When the installation of ZStack Cloud is completed, you need to update the license before performing other operations.
-
Recover databases.
Select the latest database backup file on the remote backup server and name it like:
# To tell that the MN(172.20.1.123) backs up databases at 14:43:43 on May 7, 2022. 172.20.1.123-zstack-backup-db-2022-05-07_14-43-43.gzCopy the file to the newly-installed ZStack Cloud. Assuming the file is stored in the /root/ directory, you can run the following command to restore databases. Before restoration, ZStack Cloud will back up the current database. All associated MN services will temporarily unavailable until the restoration completes.zstack-ctl restore_mysql -f /root/ 172.20.1.123-zstack-backup-db-2022-05-07_14-43-43.gz --mysql-root-password zstack.mysql.password // -f introduces the database path to be restored, that is,root/172.20.1.123-zstack-backup-db-2022-05-07_14-43-43.gz. // --mysql-root-password zstack.mysql.password means using "zstack.mysql.password" as the root password of mysql.
Note:
- If a host serves as a node with management and compute roles before restoration, then the node is non-recoverable and must be manually removed.
-
If you have set consoleProxyOverriddenIp before restoration, you have to reset the parameter of the following file on the new MN to restore the original settings.
/usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties - If a MN's database backup is not synchronized to the remote backup server before a disaster occurs, such backup cannot be recovered.
- However, if you follow the steps above to recover the VM instances created between the last backup cycle and a disaster, they may become unmanaged after recovery. Whereas VM instances under other circumstances will be in sync with their original counterpart.
Change MN IP Address
When you use ZStack Cloud, if the IP address of the server where the MN is located changes, you need to change the IP address of the MN manually. This involves two scenarios: single-MN scenario and dual-MN HA scenario.
Single-MN Scenario
- On the MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Run the following command to manually change the NIC addresses of all servers
(Assume that bond0 is the management
network):
[root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the address as needed. - Run the following commands in sequence to change the IP address of the
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect.
Further Details
Note: Changing the IP address of a host could cause the host to be
disconnected. Please exercise caution.- Scenario One: The management node, compute node, and image storage (of the
ImageStore type) share the same server.
- Log in to the UI. On the Hardware page, find the target host and choose . Then disable the corresponding image storage.
- On the MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Run the following commands in sequence to manually change the
NIC addresses of all servers (Assume that bond0 is the
management
network):
[root@localhost ~]# zs-restore-network-setting -i br_bond0 #Clear the IP address on the bridge. [root@localhost ~]# zs-show-network #Check if the IP was successfully cleared. [root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the address as needed. - Run the following commands in sequence to change the IP address
of the
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - Log in to the UI and change the IP address of the host and image
storage, respectively.
Note:
- Changing the IP address of a host could cause the host to be disconnected. Please exercise caution.
- After you change the IP address of an image storage, you cannot perform operations on resources on the image storage during the reconnection.
- Scenario Two: The management node and storage node share the same server.
Here, the storage node uses the Ceph distributed deployment method.
- On the MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Change the management IP address of the Ceph storage.
- Run the following commands in sequence to change the IP address
of the
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect.
- On the MN, run the following command to back up the
database:
- Scenario Three: The management node, compute node, storage node, and image
storage share the same server. Here, the storage node uses the Ceph
distributed deployment method.
- On the MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Log in to the UI. On the Hardware page, find the target host and choose . Then disable the corresponding image storage.
- Change the management IP address of the Ceph storage.
- Run the following commands in sequence to change the IP of the
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - Log in to the UI and change the host IP, image storage IP, and
monitor node IP of the Ceph primary storage in sequence.
Note:
- Changing the IP address of a host could cause the host to be disconnected. Please exercise caution.
- After you change the IP address of an image storage, you cannot perform operations on resources on the image storage during the reconnection.
- If you cannot change the monitor node IP of a Ceph primary storage or image storage, contact the official technical support for assistance.
- On the MN, run the following command to back up the
database:
Dual-MN HA Scenario
- On either MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - On each MN, run the following commands in sequence to manually change the NIC
addresses of all servers (Assume that bond0 is the management
network):
[root@localhost ~]# zs-restore-network-setting -i br_bond0 #Clear the IP address on the bridge. [root@localhost ~]# zs-show-network #Check if the IP was successfully cleared. [root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the address as needed. - On each MN, run the following commands in sequence to change the IP address of
each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - On the MN of the backup database, run the install_ha command to reinstall the HA suite.
Further Details
- Scenario One: The management node, compute node, and image storage share the
same server.
- Log in to the user interface (UI). On the Hardware page, find the target host and choose . Then disable the corresponding image storage.
- On either MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - On each MN, run the following commands in sequence to manually
change the NIC addresses of all servers (Assume that bond0 is
the management
network):
[root@localhost ~]# zs-restore-network-setting -i br_bond0 #Clear the IP address on the bridge. [root@localhost ~]# zs-show-network #Check if the IP was successfully cleared. [root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the address as needed. - On each MN, run the following commands in sequence to change the
IP address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - Log in to the UI by using the MN IP address of the backup database. Then change the IP address of the host and image storage, respectively.
- On the MN of the backup database, run the install_ha command to reinstall the HA suite.
- Scenario Two: The management node and storage node share the same server.
Here, the storage node uses the Ceph distributed deployment method.
- On either MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Log in to the UI by using a virtual IP address (VIP). On the Hardware page, find the target host and choose . Then disable the corresponding image storage and primary storage. On the Resource Pool page, disable the VM instance.
- Change the management IP address of the Ceph storage.
- On each MN, run the following commands in sequence to change the
IP address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - On the MN of the backup database, run the install_ha command to reinstall the HA suite.
Note: Modifying an IP address in Ceph scenarios is a heavy operation.
Please contact the official technical support for assistance. - On either MN, run the following command to back up the
database:
- Scenario Three:The management node, compute node, storage node, and image
storage share the same server. Here, the storage node uses the Ceph
distributed deployment method.
- On either node, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql - Log in to the UI by using a VIP. On the Hardware page, find the target host and choose . Then disable the corresponding image storage and primary storage. On the Resource Pool page, disable the VM instance.
- Change the management IP address of the Ceph storage.
Note: Modifying
an IP address in Ceph scenarios is a heavy operation. Please
contact the official technical support for
assistance. - On each MN, run the following commands in sequence to change the IP
address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl config_ui --db-url jdbc:mysql://172.31.250.110:3306 #Modify UI database address. [root@localhost ~]# zstack-ctl stop && zstack-ctl start #Restart the MN and UI service process for configurations to take effect. - Log in to the UI by using the MN IP address of the backup database.
Then change the host IP, image storage IP, and monitor node IP of
the Ceph primary storage in sequence.
Note: If the type of the image
storage is Ceph, change the monitor IP address of the Ceph image
storage. For more information, contact the official technical
support. - On the MN of the backup database, run the install_ha command to reinstall the HA suite.
- Log in to the UI by using a VIP. On the Hardware page, enable the host, corresponding image storage and primary storage. On the Resource Pool page, enable the VM instance.
- On either node, run the following command to back up the
database:
Switch from MN1 to MN2
- Log in to MN1. Run the following command to back up the MN database and copy the
backup file to the
/root/directory:[root@localhost ~]# zstack-ctl dump_mysql #Back up the database, assuming the file located at /var/lib/zstack/mysql-backup/172.20.10.2-zstack-backup-db-2018-12-13_17-57-52.gz is the backup file. [root@localhost ~]# cp /var/lib/zstack/mysql-backup/172.20.10.2-zstack-backup-db-2018-12-13_17-57-52.gz /root #Copy the backup file to the /root/ directory. - On MN2, install a ZStack Cloud of the same version with that on the original MN. Then add license to it.
- On MN1, run the following command to stop its service:
[root@localhost ~]# zstack-ctl stop - On MN1, run the following command to copy its backup files to
MN2:
[root@localhost ~]# scp /root/172.20.10.2-zstack-backup-db-2018-12-13_17-57-52.gz root@MN2 IP:/root - On MN2, run the following command to restore the
database:
[root@localhost ~]# zstack-ctl restore_mysql -f /root/172.20.10.2-zstack-backup-db-2018-12-13_17-57-52.gz --mysql-root-password zstack.mysql.password #zstack.mysql.password is the database password. - On MN2, run the following command to start
it:
[root@localhost ~]# zstack-ctl start - Optional: Given data security, if MN2 runs properly, you can run the following
command to remove the relevant directories and all files within on
MN1:
[root@localhost ~]# rm –rf /user/local/zstack
Upgrade a Compute Node to a Management Node
- On the compute node scheduled for an upgrade, run the following commands to
verify if any processes are
running:
[root@localhost ~]# lsof +d /usr/local/zstack/ # List all open files accessing this directory [root@localhost ~]# ps aux|grep usr.local.zstack # Verify if any active processes are using this file - Disable the host as the compute node scheduled for an upgrade.
- Run the following command to disable the original
MN:
[root@localhost ~]# zstack-ctl stop - On the compute node scheduled for an upgrade, run the following commands in
sequence to stop the agent
service:
[root@localhost ~]# systemctl stop zstack-sharedblock-agent; [root@localhost ~]# /etc/init.d/zstack-network-agent stop; [root@localhost ~]# kill -15 `pgrep dnsmasq` - Run the following commands in sequence to upgrade the compute node to a
management
node:
[root@localhost ~]# mv /usr/local/zstack/ /mnt/ # mv /usr/local/zstack/ /mnt/ [root@localhost ~]# bash ZStack-Cloud-install.bin -E #Upgrade the node to a management node [root@localhost ~]# cp -r /mnt/zstack/* /usr/local/zstack/ #Copy the previously backed-up files (from /mnt/zstack/) back to /usr/local/zstack/. - Enable the host and subsequent optional operations (for example, replace the original management node with this one, or deploy a dual-MN environment).
Basic Platform Maintenance
This chapter provides solutions for errors encountered during fundamental operations in ZStack Cloud.
Installation and Deployment
- Assuming you choose the management node mode when installing the operating
system (OS). When the installation of OS is completed, ZStack Cloud is not installed at all.The causes could be as follows:
- The minimum hardware requirement is not satisfied: 4-core CPU and 8GB memory.
- No IP address is set when the OS is installed. The management node in ZStack Cloud requires the IP address.
Solution:- In this case, you need to run the
bash /opt/zstack-installer.bin -Ecommand to install ZStack Cloud; - Alternatively, you can run the
bash /opt/zstack-installer.bincommand to install ZStack Cloud Community.
- The error message below presents itself when installing ZStack Cloud.Error message:
Fail Reason: /usr/local/zstack is existing. Please delete it manually before installing a new ZStackCause:
Now, a ZStack Cloud already exists in the system. Repeated installation is not allowed.
Solution:- To upgrade ZStack Cloud, simply use the -u parameter.
- To reinstall ZStack Cloud, run the
rm -rf /usr/local/zstack; bash zstack-installer.bin -Dcommand.
- If the deployment fails, error details will be output on the screen.
Solution:
Check the /tmp/zstack_installation.log path. Then try to solve this problem according to error details.
- If an ISO version mismatch is encountered during the upgrade, an error message
similar to the following will be
displayed.
mount: /dev/loop0 is write-protected, mounting read-only /root Current release h79c not matched the new ISO h84r, Use zstack-upgrade -r xxx.iso to update current repo, Use zstack-upgrade -a/--add_repo xxx.iso to add a new repoSolution:
You need to follow the steps below:- Download the latest ISO by using the following
command:
wget http://cdn.zstack.io/product_downloads/iso/ZStack-Cloud-x86_64-DVD-5.4.12-h84r.iso - Run the following command to perform the upgrade. This will
synchronize the yum repository from the ISO to the local system and
directly upgrade the management
node.
zstack-upgrade ZStack-Cloud-x86_64-DVD-5.4.12-h84r.iso
- Download the latest ISO by using the following
command:
- If an upgrade fails due to custom software development or database
modifications, you wish to restore ZStack Cloud to the
pre-upgrade state.
Prerequisite for restoration:
When upgrading ZStack Cloud, the current core files and databases are backed up to the corresponding directory:- Core files in ZStack Cloud have been backed up in the/usr/local/zstack/upgrade/ directory by default. The backup files constitue a folder named the time when the upgrade occurs, for example, 2017-11-09-15-41-52.
- The database has been backed up in the /usr/local/zstack/db_backup/directory by default. The backup files constitue a folder named the time when the upgrade occurs, for example, 2017-11-09-15-42-43, while the files end with backup.sql.
Procedures for restoration:- To back up the core files in ZStack Cloud of
the previous version, run the following
command:
cp /usr/local/zstack/upgrade/2017-11-09-15-41-52 /root -r - To back up the database in ZStack Cloud of
the previous version, run the following
command:
cp /usr/local/zstack/db_backup/2017-11-09-15-42-43/backup.sql /root - To back up the database again, run the following
command:
zstack-ctl dump_mysql - To delete the current ZStack Cloud
environment, run the following
command:
zstack-ctl stop rm -rf /usr/local/zstack - Simply install ZStack Cloud by using the
previous bin
package:
bash ZStack-Cloud-installer.bin -D - Restore ZStack Cloud by using the backup
files generated in procedure
a.
zstack-ctl stop mv /usr/local/zstack/apache-tomcat/webapps/zstack /usr/local/zstack/apache-tomcat/webapps/zstack-bk cp /root/2017-11-09-15-41-52/zstack /usr/local/zstack/apache-tomcat/webapps -r chown zstack:zstack /usr/local/zstack/apache-tomcat/webapps/zstack -R - Restore the backup database generated in procedure
b.
cat /root/backup.sql |mysql -u root -pzstack.mysql.password zstack - Start the management node service in ZStack Cloud. Then ZStack Cloud has been successfully restored to the
pre-upgrade
state.
zstack-ctl start
- If you adopt all-in-one installation, we recommend you configure Reserved
Memory of Host after initialization. The method is as follows:
- For global setting:On the main menu of ZStack Cloud, choose . Set Reserved Memory of Host. The default is 1GB.
Note: If you set this parameter on the details
page of a cluster, this global setting does not take effect on
the cluster. - For a cluster:
On the main menu of ZStack Cloud, choose . Select the target cluster and enter its details page. Click Advanced Settings on the top row and you can configure Reserved Memory of Host. The default is 1GB.
Note: If you set this
parameter for certain host, this advanced setting of cluster does
not take effect on the host.。 - For a host:Currently, we support configuring Reserved Memory of Host by using CLI command line:
UpdateResourceConfig category=kvm name=reservedMemory resourceUuid=e2f4836723a2490095768fe611c540b1 value=10G # resourceUuid is the host UUID, while value is the reserved memory size of the host.
- For global setting:
Start Services
ZStack Cloud services will automatically start after the management node (MN) is restarted.
- The database should run properly:
You can check its status by using the
systemctl status/start/stop/restart mariadbcommand. - Troubleshooting case 1:Error message 1:
ERROR: failed to connect to the mysql server[hostname:10.0.0.18, port:3306, user:zstack, password:zstack.password]Solution 1:- Mae sure that the IP address, username and password related to the database are correct and accessible in the /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties path. You can use the mysql command to access it.
- For example, you can connect to the mysql
server by typing
mysql -u zstack -pzstack.password -h 10.0.0.18.
- Troubleshooting case 2:Error message 2:
8080 is occupied by some process. Please use netstat to find out and stop itSolution 2:
Run the
netstat -anp|grep 8080command to find out the occupied 8080 and stop it. Then restart ZStack Cloud. - Troubleshooting case 3:Error message 3:
MN status: Unknown, the management node seems to become zombie as it stops responding APIsSolution 3:
Insufficient memory may cause such messaging failures. To resolve this issue, allocate more memory and avoid reusing the management node for compute tasks.
zstack-ctl command
ZStack Cloud provides zstack-ctl command to control services and resources.
- Check the status:
zstack-ctl status - Control the status of the management node or the UI service:
zstack-ctl stop/start/stop_ui/start_ui/start_node/stop_node/restart_node/ - Collect diagnostic logs:
zstack-ctl configured_collect_log - Back up the database:
zstack-ctl dump_mysql - Restore the database:
zstack-ctl restore_mysql -f back.gz --mysql-root-password password - Update the management IP address:
zstack-ctl change_ip - Check the information about the zstack.properties configuration file:
zstack-ctl show_configuration - Check UI configurations:
zstack-ctl show_ui_configuration - Install the license of ZStack Cloud:
zstack-ctl install_license -f license_key.txt - Reset the password of the admin in ZStack Cloud:
zstack-ctl reset_password - Change the password of the MySQL database:
zstack-ctl change_mysql_password --root-password zstack.mysql.password --user-name zstack --new-password password
Note:
The zstack-ctl command has multiple subcommands. For detailed information about what these subcommands are and how to use them, see CTL Command Manual.
zstack-cli command
ZStack Cloud provides zstack-cli , a command line tool, to control the internal resources in ZStack Cloud.
- zstack-cli
login:
LogInByAccount accountName=admin password=passwordThe admin account uses a default login password: password. If you change the password, log in with the correct password.
- Keywords in zstack-cli Command:
- Keywords of resources:
zone cluster host vm primarystorage image L2 L3 backupstorage volume offering
- Keywords for operations:
add reconnect start stop destroy delete create get set update attach detach
- Keywords of resources:
- Tips for using zstack-cli commands:
- Enter keyword(s) of resource(s) and keyword(s) for operation(s).
- Utilize the Tab key. For example, when you type the keyword "cluster", press
Tab twice and all operations related to cluster will be listed, as shown
below:
AttachL2NetworkToCluster AttachPrimaryStorageToCluster ChangeClusterState CreateCluster DeleteCluster DetachL2NetworkFromCluster DetachPrimaryStorageFromCluster GetCandidateZonesClustersHostsForCreatingVm GetVmStartingCandidateClustersHosts QueryCluster QueryVCenterCluster UpdateCluster
To create another cluster, enter
CreateClusterbased on the operation list above. Again press Tab twice. The CLI will display the parameters for CreateCluster.
- To create a VM instance by using zstack-cli:
CreateVmInstance name=ceph instanceOfferingUuid=$instanceofferUuid l3NetworkUuids=$L3Uuid imageUuid=$imageUuid - To query the VM instance's status by using zstack-cli:
QueryVmInstance state=“Running” name~=test limit=3 fields=uuidIf the name contains the word "test", only three uuids of three VMs will be displayed.
Note:
For detailed information about how to use zstack-cli, see CLI Command Manual.
VM-Related Error
VM Instance Creation Procedures and Failure Analysis
- Associate the selected image with its image storage. Ensure that the image storage is in the Connected status.
- Select an available cluster based on the image storage. And then select a compatible host according to instance offering and the cluster. Ensure that the target host is in the Connected status.
- Select an available primary storage of the capacity not smaller than that of the selected image. The primary storage must be Connected with sufficient available capacity.
- Configure network settings (IP/MAC address allocation). Ensure the network availability as well as sufficient resources in the IP address pool.
- Download images from the image storage to the primary storage. And create a root volume.
- Assign IP addresses to the VM instance.
- Enable the VM on the host.
- The image storage is in the Disconnected status. Make sure the image storage is in the Enabled state and in the Connected status.
- The primary storage is not attached to any cluster. In this case, you cannot find an available host. Remember to attach a cluster to the primary storage.
- No hosts in the cluster meet the requirements of the instance offering. Verify whether there is an enabled host with a sufficient available quantity of CPU and Memory.
- The capacity of the primary storage does not match the image capacity. Ensure sufficient primary storage capacity.
- The cluster is not attached to any network or NIC. Attach the corresponding NIC or network to the cluster.
- IP addresses are insufficient within the range.
- Download images from the primary storage to the image storage. Ensure a correct transfer direction.
- Ensure that the built-in dnsmasq software and DHCP service provided by the host work properly so as to normally assign IP addresses.
- Ensure that the Libvirtd service provided by the host run properly so as to perform virtualization management tasks.
Resolve VM-Related Errors
| Error Message | Cause and Solution |
|---|---|
“code”:”HOST.1005”,”description”:”Failed
to start vm on hypervisor”, “details”:”failed to start ….,
Libvirt error: internal error no supported architecture for os
type ‘hvm’”or "details": "failed to start vm on kvm host,
because unable to start vm, libvirt error: invalid argument:
could not find capabilities for domaintype=kvm
" |
|
“details”: "cannot find either 'vmx' or
'svm' in /proc/cpuinfo, please make sure you have enabled
virtualization in your BIOS setting" |
|
"details": "the local primary storage has
no hosts with enough disk capacity[xxx bytes] required by the
vm[uuid:xxx]" |
|
"details": "unable to allocate hosts; due
to pagination is enabled, there might be several allocation
failures happened before; the error list is [{no host having
cpu[x HZ], memory [xxx bytes] found}]" |
|
"details": "failed to start vm[uuid:xxx
name:xxx] on kvm host[uuid:xxx, ip:x.x.x.x], because unable to
start vm[uuid:xxx, name:xxx], libvirt error: internal error:
early end of file from monitor: possible problem: Cannot set up
guest memory 'pc.ram': Cannot allocate memory" set up guest
memory 'pc.ram':Cannot allocate memory" |
|
"failed to migrate vm[uuid:xxx] from kvm
host[uuid:xxx, ip:xxx] to dest host[ip:xxx], unable to migrate
vm[uuid:xxx] to qemu+tcp://xxx/system, Unsafe migration:
Migration may lead to data corruption if disks use cache !=
none" |
|
"description": "Failed to start vm on
hypervisor",libvirt error: Unable to create tap device vnic15.0:
Device or resource busy |
|
Permission denied:
'/opt/zstack/nfsprimarystorage/prim-cd8075752a0b4c669afa79acfc433ca5/dataVolumes' |
|
internal error: unable to execute QEMU
agent command 'guest-set-user-password': failed to set password:
The user name could not be found. |
|
internal error: unable to execute QEMU
agent command 'guest-set-user-password': The command
guest-set-user-password has not been found |
|
"libvirt error: error from service:
ListActivatableNames: Connection is closed" or "libvirt error:
Activation of org.freedesktop.machine1 timed
out" |
|
{ "error": { "code": "HOST.1009",
"description": "Failed to migrate vm on hypervisor", "details":
"failed to migrate vm[uuid:90bb61f55e774f5f89c9e1ea46db7661]
from kvm host[uuid:e5105c61114a4efe8bcc025f744226bd,
ip:10.0.247.244] to dest host[ip:10.0.197.238], unable to
migrate vm[uuid:90bb61f55e774f5f89c9e1ea46db7661] to
qemu+tcp://10.0.197.238/system, internal error: Attempt to
migrate guest to the same host localhost.domain.com" },
"createdTime": 1488170137857, "type": { "_name":
"key.event.API.API_EVENT" }, "id":
"e6bcd7c33ad9446b919e11cd647fc8dc" } |
|
all mons failed to execute http
call[/ceph/primarystorageolume/clone |
|
failed to start
vm[uuid:4ef5a9e4ae6441c7b046c384c3ae6f7f name:stack_local] on
kvm host[uuid:d0d9800a09c34da4891e0cc624a0d349,
ip:192.168.1.166], because Traceback (most recent call last):
File
"/var/lib/zstack/virtualenv/kvm/lib/python2.7/site-packages/kvmagent/plugins/vm_plugin.py",
line 2721, in start_vm self._start_vm(cmd) File
"/var/lib/zstack/virtualenv/kvm/lib/python2.7/site-packages/kvmagent/plugins/vm_plugin.py",
line 2664, in _start_vm 'unable to start vm[uuid:%s, name:%s],
libvirt error: %s' % (cmd.vmInstanceUuid, cmd.vmName, str(e)))
KvmError: unable to start
vm[uuid:4ef5a9e4ae6441c7b046c384c3ae6f7f, name:stack_local],
libvirt error: internal error: early end of file from monitor,
possible problem: qemu-kvm:
/root/rpmbuild/BUILD/qemu-2.6.0/target-i386/kvm.c:1736:
kvm_put_msrs: Assertion `ret == n' failed. |
|
”code”:”SYS.1006”,description:An
operation failed, details:failed to check physical network
interfaces on lvm |
|
description": "A message or a operation
timeout","details": "[Async Http Timeout] url:
http://10.10.10.253:7272/init, timeout after
300000[MILLISECONDS], command:
{\"uuid\":\"78183b0a46094e30bc8a6128b30ee8cb\",\"restartDnsmasqAfterNumberOfSIGUSER1\":0}"
|
|
failed:Error in connection establishment:
net::ERR_CONNECTION_REFUSED |
|
Could not access KVM kernel module: No
such file or directory failed to initialize KVM: No such file or
directory. |
|
Log Analysis
Log paths are as follows.
| Type | Log Path | Log Server |
|---|---|---|
| Management Node Log | /usr/local/zstack/apache-tomcat/logs/management-server.log | Management Node |
| Management Node UI Log | /usr/local/zstack/apache-tomcat/logs/zstack-ui.log | Management Node |
| Console Proxy Log | /var/log/zstack/zstack-console-proxy.log | Management Node |
| Management Node Deploy Log | /var/log/zstack/deploy.log | Management Node |
| Shell Command Log | /var/log/zstack/zstack.log | Host |
| ZStack Kvmagent Log | /var/log/zstack/zstack-kvmagent.log | Host |
| Libvirt Log | /var/log/libvirt/qemu/vm_uuid.log | Host |
| Basic System Log | /var/log/messages | Management Node/Host and so on |
| Image Storage Log | /var/log/zstack/zstack-store/zstore.log | Image Storage |
| Ceph Primary Storage Log | /var/log/zstack/ceph-primarystorage.log | Ceph Mon Node |
| Ceph Backup Storage Log | /var/log/zstack/ceph-backupstorage.log | Ceph Mon Node |
| VPC v-Router Log | /home/vyos/zvr/zvr.log | VPC v-Router |
| Flat Network Configuration and Log | /var/lib/zstack/dnsmasq/ | Host |
- Analyze UI error messages first:
- Example: If VM creation fails because
no host found, possible causes include: No available hosts match the selected image storage, cluster, and network.Check whether there are any available hosts in the cluster as well as any L2 networks and primary storages attached to the cluster.
- Example: If VM creation fails because
- Investigate management node logs at
/usr/local/zstack/apache-tomcat/logs/management-server.log.
- Read error messages and conduct context-specific analyses of failed workflows.
- Also, you can track API calls and analyze them. For example, if you use
APICreateVmInstanceto create a VM, you can search this API on the management node log and analyze the workflow step by step so as to find the failure cause.
- Review agent logs for error details:
- Example: Check /var/log/zstack/zstack-kvmagent.log on hosts for error logs when performing operations that contrl the VM life-cycle.
Port Occupancy
The list of port occupancy on ZStack Cloud is as follow:
| Port Number | Process | Role of Node | Description |
|---|---|---|---|
| 22 | sshd | Management Node, Compute Node, Primary Storage Management Node, and Backup Storage Management Node | Default port for SSH service |
| 25 | master | / | Email Server |
| 53 | dnsmasq | Compute Node | DHCP service |
| 67 | dnsmasq | Barametal Gateway Node | DHCP service on Elastic Barametal Gateway Node |
| 80 | nginx | Management Node | Unified login service for multiple regions |
| 123 | ntpd | All Nodes | NTP/Chrony time sync service |
| 3306 | mysqld | Management Node | MySQL process |
| 4100~4200 | usbredirserve | Compute Node | USB redirection service |
| 4200 | baremetal2-agent | Barametal Instance Node | Elastic Barametal Linux console interface |
| 4369 | epmd | Compute Node | erlang port mapper daemon |
| 4747 | morph | Management Node | User data synchronization across regions |
| 4900 | consoleproxy | Management Node | Console Proxy |
| 4901 | console-proxy | Barametal Gateway Nod | VNC proxy in HTTP mode on Elastic Barametal Gateway Node |
| 5000 | /bin/java | Management Node | UI service (HTTP) on ZStack Cloud |
| 5345 | lttng-sessiond | Management node, Compute Node | Kernel tracing framework |
| 5443 | /bin/java | Management Node | UI service (HTTP) on ZStack Cloud |
| 5900~59XX | qemu-kvm | Compute Node | KVM console service |
| 6080 | websockify | Barametal Deployment Node | Server proxy service deployment |
| 7069 | python | Compute Node | |
| 7070 | kvmagent | Compute Node | KVM Agent proxy service |
| 7090 | baremetal2-agent | Barametal Instance Node | Elastic Barametal proxy service |
| 7123 | /bin/java | Management Node | Quick detection of host connection |
| 7171 | sftpbackupstorage | Image Storage Node | Sftp backup storage proxy service |
| 7272 | zstack-vyos agent | vyos | VPC vRouter proxy service |
| 7274 | zsn-agent | Compute Node | Auxiliary proxy service of network features |
| 7276 | zsblk-agent | Compute Node | Auxiliary proxy service of SharedBlock Storage |
| 7758 | python | Management Node | Console Proxy service |
| 7761 | python | Ceph Storage Node | Ceph Image server |
| 7762 | python | Ceph Storage Node | Ceph Primary Storage |
| 7770 | python | Barametal Deployment Node | Server deployment |
| 7771 | nginx | Barametal Deployment Node | Server proxy service deployment |
| 7772 | nginx | Barametal Deployment Node | Server proxy service deployment |
| 7800,7805 | Java | Management Node | Global search for Management Node synchronization |
| 8000 | zstore | ImageStore Node | zstore process occupancy |
| 8001 | zstore | ImageStore Node | zstore process occupancy |
| 8002 | ztore | ImageStore Node | CDP service |
| 8005 | /bin/java | Management Node | Management service on ZStack Cloud |
| 8080 | /bin/java | Management Node | Management service on ZStack Cloud |
| 8090 | nginx | Management Node | Management service (barametal console proxy on management nodes) on ZStack Cloud |
| 9089 | prometheus | Compute Node | Prometheus Read-Only monitoring process |
| 9090 | prometheus | Compute Node | Prometheus primary monitoring process |
| 9091 | pushgateway | Management Node | Data cache monitoring (Management Node) |
| 9092 | pushgateway | Compute Node | Data cache monitoring (Compute Node) |
| 9093 | pushgateway | Barametal Deployment Server | Data cache monitoring (Barametal Deployment Server) |
| 9100 | node_exporter | Management Node, Compute Node, Storage Node | Data collection monitoring |
| 9103 | collectd_expo | Management Node, Compute Node, Storage Node | Data collection monitoring |
| 9104 | collectd | ImageStore Node | Process monitoring on zstore node |
| 9112 | zssvc_exporter.service | All Nodes | Facilitate service monitoring. If you install ZStack Suite for Service Monitoring in the Application Market, this port will be occupied. |
| 9256 | process_exporter.service | All Nodes | Facilitate service monitoring. If you install ZStack Suite for Service Monitoring in the Application Market, this port will be occupied. |
| 10000-10500 | zstore→qemu-nbd | ImageStore Node | Export NBD from zstore to backup and CDP |
| 12000-15000 | nginx | Barametal Gateway Node | Nginx proxy listeing |
| 16509 | libvirtd | Compute Node | libvirtd service |
| 18081 | zstack-hamon | Management Node | Dual-MN HA monitoring service |
| 20000~30000 | mini storage drbd service | Mini host | Mini Storage Data Synchronization: Starting from port 20000, each replica occupies one port. |
| 32768~61000 | kernel dynamic | All Nodes | Automatically assigned by the system and controlled by net.ipv4.ip_local_port_range. For details, see https://en.wikipedia.org/wiki/Ephemeral_port. |
Network Script
- Run the command
zs-show-networkto check network connection and the status of Link Aggregation.[root@localhost ~]# zs-show-network 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: vmnic0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether fa:84:ba:34:92:00 brd ff:ff:ff:ff:ff:ff inet 172.20.54.194/16 brd 172.20.255.255 scope global vmnic0 valid_lft forever preferred_lft forever inet6 fe80::f884:baff:fe34:9200/64 scope link valid_lft forever preferred_lft forever ---------------------------------------------------------------- | Bond Name | SLAVE | BONDING_OPTS | ---------------------------------------------------------------- - Run the command
zs-network-settingto configure physical NIC network settings. This command supports two usage modes:- Mode
One:
# The parameter -i, meaning interface, helps to set network IP address. zs-network-setting -i [interface] [ipaddress] [netmask] [gateway] Interface IP Adderss Netmask Gateway # Example 1: zs-network-setting -i eth0 192.168.1.10 255.255.255.0 192.168.1.1 # Example 2: zs-network-setting -i eth0.10 192.168.1.10 255.255.255.0 192.168.1.1 - Mode
Two:
# The parameter -b, meaning bridge, helps to create a bridge based on the interface and set the network IP address. zs-network-setting -b [interface] [ipaddress] [netmask] [gateway] Interface IP Adderss Netmask Gateway # Example 1: zs-network-setting -b eth0 192.168.1.10 255.255.255.0 192.168.1.1 # Example 2: zs-network-setting -b eth0.10 192.168.1.10 255.255.255.0 192.168.1.1
- Mode
One:
- The command
zs-change-nichelps to change NIC names. After you change the NIC name, the relevant script path will be set at /etc/udev/rules.d/70-persistent-net.rules. If you reboot the host, the NIC name remains to be new NIC name.# The parameter -c means changing the NIC name. zs-change-nic -c [old-nic-name] [new-nic-name] Old NIC Name New NIC Name # Example: zs-change-nic -c eth0 em01 - The command
zs-vlanhelps to set VLAN interface. This command supports two usage modes:- Mode One: Create
VLAN
# The parameter -c means creating VLAN interface. zs-vlan -c [nic-name] [vlan] NIC Name VLAN # Example: zs-vlan -c zsnic0 10 - Mode Two: Delete
VLAN
# The parameter -d means deleting VLAN interface. zs-vlan -d [nic-name] [vlan] NIC Name VLAN # Example 1: zs-vlan -d zsnic0 10 # Example 2: zs-change-nic -c eth0 em01
Note:
- After creating a VLAN interface, the system generates corresponding network configuration files in /etc/sysconfig/network-scripts/. These configurations also take effect after host reboots. Deleting the VLAN interface removes these configuration files.
- When using this VLAN interface for cross-device communication, you need to configure your network equipment according to the vendor's VLAN implementation guide to enable traffic flow for this VLAN interface.
- For port-group configurations on network equipment, you can refer
to:
- Huawei: Click here.
- Cisco: Click here.
- Juniper: Click here.
- Mode One: Create
VLAN
- The command
helps to create and delete Bonding Link Aggregation. This command supports two usage modes:zs-bond-lacp- Mode One: Create Link
Aggregation
# The parameter -c means creating Link Aggregation interface. zs-bond-lacp -c [bond-name] Bonding interface # Example: zs-bond-lacp -c bond0 - Mode Two: Delete Link
Aggregation
# The parameter -d means deleting Link Aggregaion interface. zs-bond-lacp -d [bond-name] Bonding inerface # Example: zs-bond-lacp -d bond0
Note:
This command creates an interface based on the IEEE 802.3ad Dynamic Link Aggregation Protocol (LACP), which requires you to configure a port group of the network switch on the host access layer.
- Mode One: Create Link
Aggregation
- The command
zs-nic-to-bondhelps to configure Link Aggregation.-
# The parameter -a means attaching a physical interface to a Link Aggregation interface. zs-nic-to-bond -a [bond-name] [nic-name] Bonding Interface Physical Interface # Example: zs-nic-to-bond -a bond0 em1 -
# The parameter -d means detaching a physical interface from a bonsing interface. zs-nic-to-bond -d [bond-name] [nic-name] Bonding Interface Physical Interface # Example: zs-nic-to-bond -d bond0 em1
Note:
After running this command, the execution interface will show itself, displaying the relationship between the bonding interface and the physical interface. For example:------------------------------------------------------------------------------ | Bond Name | SLAVE(s) | BONDING_OPTS | ------------------------------------------------------------------------------ | bond0 | enp1s0f1 | miimon=100 mode=4 xmit_hash_policy=layer2+3 | | | enp1s0f0 | | ------------------------------------------------------------------------------- In this example, bond0 represents the bonding interface, while enp1s0f0 and enp1s0f1 are the physical interfaces, showing their binding relationship.
- Additionally, the physical ports of the network device corresponding to enp1s0f0 and enp1s0f1 form a port group. You must configure the port group based on the specific network device model.
- For port-group configurations on network equipment, you can
refer to:
- Huawei: Click here.
- Cisco: Click here.
- Juniper: Click here.
-
Delete Resources
Delete is a high-risk operation on ZStack Cloud for this operation directly impacts data plane. Improper operation may lead to severe consequences such as data loss. This section summarizes high-risk delete scenarios.
| Action | Consideration |
|---|---|
| Delete Zone | Deleting a zone will delete all of its sub-resources, for example, clusters, hosts, networks, primary storages, vCenters and so on. Please exercise caution. |
| Delete Cluster |
|
| Delete Host |
|
| Delete Primary Storage | Deleting a primary storage deletes all resources on it, for example, VM instances, volumes, snapshots and so on. Please exercise caution. |
| Delete Image Storage | Deleting an image storage will delete the image storage and image records on the Cloud. Please exercise caution. |
| Delete VXLAN Pool | Deleting a VXLAN pool also deletes the VXLAN networks in the pool and the associated L3 networks. |
| Detach L2 Network | Deleting an L2 network deletes associated L3 networks and VPC vRouters, and detaches associated VM NICs. Please exercise caution. |
| Delete Public Network | Deleting a public network also detaches the VM NICs that are using this network, and deletes the associated VPC vRouters, network services, and vRouter offerings. Please exercise caution. |
| Delete System Network | Deleting a system network deletes the associated VPC vRouters. |
| Delete Private Network | Deleting a private network detaches the VM NICs that are using this network. |
| Delete vCenter |
Deleting vCenter deletes all resources associated with vCenter. Please exercise caution. |
| Delete Deployment Server | Deleting deployment servers will expunge the deploying baremetal instances, while the consoles of the deployed baremetal instances cannot be accessed. Please exercise caution. |
| Delete VPC vRouter | Delete a VPC vRouter may render network services for associated VMs unavailable. You can only restore network services by rebooting the VM instance. Please exercise caution. |
| Delete vRouter Image | Deleting a vRouter image may lead to the inability to create vRouters. Please exercise cation. |
| Delete vRouter Offering | Deleting a vRouter offering may lead to the inability to create vRouters. Please exercise caution. |
| Delete VM Instance |
|
| Delete Snapshot |
|
| Delete Drive | Deleting a drive will detach the existing ISO within the drive. |
| Delete Auto-Scaling Group | Deleting auto-scaling groups will also delete all VM instances in the groups. Please exercise caution. |
| Delete Security Group | Deleting a security group also deletes the security rules created in the group. Please exercise caution. |
| Delete VIP | Deleting a VIP also deletes all services the VIP provides. |
| Delete EIP | Deleting an EIP will automatically remove the provided EIP service. To delete the corresponding VIP, select the "Delete VIP" option. |
| Delete Port Forwarding | Deleting a port forwarding rule will automatically remove the provided port forwarding service. The corresponding VIP and other services bound to it remain unaffected. |
| Delete Load Balancer | Deleting a load balancer will automatically remove all listeners and associated load balancing services. The corresponding VIP and other bound services remain unaffected. |
| Delete Listener | Deleting a listener will automatically remove the provided load balancing service. |
| Delete IPsec Tunnel | Deleting an IPsec Tunnel will automatically remove the provided IPsec tunnel service. The corresponding VIP and other bound services remain unaffected. |
| Delete Alarm | After you delete an alarm, resources related to this alarm will be removed and no more alarm messages will be generated. Please exercise caution. |
| Delete Scheduler | Deleting a scheduler causes the scheduled job on it to be detached. You can attach scheduled job to other running schedulers. |
| Delete Resource Stack | Deleting a resource stack expunges all created resources orchestrated by the resource stack, such as VM instances and volumes. Please exercise caution. |
| Delete Pricing List |
|
| Delete AccessKey | Deleting an AccessKey immediately disables all API access authorized by it and the console cannot be accessed. Please exercise caution. |
| Delete Account | If you set Deletion Policy to Direct, VMs and volumes under this account will be expunged as soon as you apply this policy. If you set Deletion Policy to Delay, VMs and volumes under this account will be marked as deleted. Resource ownership transfers to admin. |
| Delete User in Tenant Management | If a user is part of a ticket flow, deleting this user will disable this ticket flow, and all tickets associated with this flow will be withdrawn. |
Detach Resources
Detach is a high-risk operation on ZStack Cloud. This section summarizes all high-risk detach scenarios.
| Action | Consideration |
|---|---|
| Detach Cluster from Primary Storage | This operation has the following impacts, please
exercise caution:
|
| Detach L2 Network from Cluster | Detaching an L2 network also detaches the corresponding VM NIC. Please exercise caution. |
| Detach Primary Storage from Cluster | This operation has the following impacts, please
exercise caution:
|
| Detach Baremetal Cluster | Detaching baremetal clusters will expunge the deploying baremetal instances, while the consoles of the deployed baremetal instances cannot be accessed. Please exercise caution. |
| Detach Cluster from VXLAN Pool | Detaching a cluster from a VXLAN pool also detaches the associated VM NICs. Please exercise caution. |
| Detach Cluster from L2 Network | Detaching a cluster from an L2 network also detaches the associated VM NICs. Please exercise caution. |
| Detach VPC vRouter from VPC Network | To detach VPC vRouter from VPC network, ensure that the VPC network is not accessed by any VM instance. |
| Detach Volume from VM Instance |
|
| Detach NIC from VM Instance |
|
| Detach ISO |
|
| Detach LUN | You can detach LUNs from a VM instance in the running and stopped state. |
| Detach pGPU Device |
|
| Detach vGPU Device | Detach vGPU devices from a VM instance. You must ensure that the VM instance is in the stopped state before attaching or detaching vGPUs. |
| Detach USB Device | You can detach USB devices from a VM instance in the running and stopped state. |
Other Platform Maintenance
Upgrade Shared Volumes on SharedBlock Primary Storage
- Run the following command to check whether there are any volumes need to be
converted into the correct format among the detached shared volumes to be
upgraded:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation convert_volume --admin-password password - Run the following command to convert the volume format of the shared volumes
fixed by step 1 from qcow2 to
raw:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation convert_volume --admin-password password --dryrun False - Run the following command to check deletable shared volumes that were originally
in qcow2
format:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation delete_qcow2_volume --admin-password password - Ensure the data integrity after format conversion. Then run the following
command to delete those shared volumes which were originally in qcow2
format:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation delete_qcow2_volume --admin-password password --dryrun False - Run the following command to create the image file based on the shared volume
snapshots to make a
backup:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation commit_snapshot_to_image --admin-password password --backup-storage-uuid XXXXX --dryrun False - Run the following command to delete the shared volume snapshots that were
originally in qcow2
format:
[root@localhost ~]# zstack-ctl fix_sharedvolume --operation delete_shared_volume_snapshots --admin-password password --dryrun False
Physical Infrastructure Maintenance
This chapter provides operational guidelines for physical infrastructure maintenance. For operations in production environment, you must follow the standardized procedures documented here to avoid unmanageable risks.
Power Maintenance in Equipment Room
Planned Shutdown
- Stop all running businesses and power off all VM instances.
- Make all primary storages enter maintenance mode.
- Make all hosts enter maintenance mode.
- Stop the management node (MN). Methods of stopping MNs vary depending on
deployment scenarios:
- In a single-MN scenario, run the
zstack-ctl stopcommand to stop the MN. - In a dual-MN HA scenario, run the
zsha2 stop-nodecommand on each MN to stop MNS and the zsha2 service.
- In a single-MN scenario, run the
- Verify that no I/O operation is performed in the primary storages of the
Cloud, and run the
poweroffcommand on each host to normally shut down all hosts. - Disable the storages such as NFS, Ceph, SAN, or SMP.
- Power off the switches and other hardware facilities
Planned Power-On
- Power on the switches.
- Enable the storages such as NFS, Ceph, SAN, or SMP.
- Power on the servers.
- Check the status of the MN to make sure that the MN service starts
successfully. Methods of starting MN service vary depending on deployment
scenarios:
- In a single-MN scenario, run the
zstack-ctl statuscommand to view its status. - In a dual-MN HA scenario, on either MN, run the
zsha2 statuscommand to view the HA mode and the MN status.
- In a single-MN scenario, run the
- Log in to ZStack Cloud and enable all primary storages and hosts. Make sure that all hosts and primary storages are in the connected state.
- Enable the VM instances and resume the businesses.
Recovery from Unexpected Power Outage
- Power on the switches.
- Enable the storages such as NFS, Ceph, SAN, or SMP.
- Power on the servers.
- Check the status of the MN to make sure that the MN service starts
successfully. Methods of starting MN service vary depending on deployment
scenarios:
- In a single-MN scenario, run the
zstack-ctl statuscommand to view its status. - In a dual-MN HA scenario, on either MN, run the
zsha2 statuscommand to view the HA mode and the MN status.
- In a single-MN scenario, run the
- Log in to ZStack Cloud and enable all primary storages and hosts. Make sure that all hosts and primary storages are in the connected state.
- Enable the VM instances and resume the businesses.
Equipment Room Relocation
- Power off all involved facilities under normal conditions in sequence by referring to Planned Shutdown.
- Mark the access ports of all switches and hosts.
- Pack up the servers. Move the servers to the new equipment room and reconnect them.
- Power on all involved facilities in sequence by referring to Planned Power-On.
- Check the recovery status of the network, Cloud, and VM instances.
Switch Maintenance
Management Network Switch Maintenance
- Disable HA Policy in the Platform Setting.
- Stop management nodes (MNs). Methods of stopping MNs vary depending on
deployment scenarios:
- In a single-MN scenario, run the
zstack-ctl stopcommand to stop the MN. - In a dual-MN HA scenario, run the
zsha2 stop-nodecommand on each MN to stop MNS and the zsha2 service.
- In a single-MN scenario, run the
- Adjust or reboot the related management switches.
- Verify the IP connectivity of all hardware resources at the access end of
the switch (including host, primary storage, and image storage) to ensure
that all the management networks communicate with each other
properly.
Note: If a node fails to connect the MN, troubleshoot the issue
before you proceed with subsequent operations. - Enable the MN and check its status to ensure that the MN service starts
successfully. Methods of starting MN service vary depending on deployment
scenarios:
- In a single-MN scenario, run the
zstack-ctl startcommand to start the MN service and run the commandzstack-ctl statusto view its status. - In a dual-MN HA scenario, run the
zsha2 start-nodecommand on each MN respectively to start MN services. On either MN, run thezsha2 statuscommand to view the HA mode and the MN status.
- In a single-MN scenario, run the
- Ensure that all hosts and primary storages are in the connected status, and HA Policy is enabled in the Platform Setting.
Business Network Switch Maintenance
- Make the host connected to the switch enter maintenance mode.
- Reboot the related switch.
- Enable any host in the maintenance mode and check its connectivity. For example, supposing you create a test VM instance and then check its connectivity with other business VMs. If the connectivity succeeds, the switch interface configurations corresponding to the host is correct and available. If the connectivity fails, you have to continue to check the connectivity.
- Repeat Step 3 and check the connectivity in turn to ensure that all business networks are available.
Storage Network Switch Maintenance
- Make all primary storages associated with the storage switch on the Cloud enter maintenance mode.
- Log in to the user interface (UI) of Ceph Enterprise and choose .
- Adjust or reboot the related storage switches.
- Ensure that the storage networks of all storage nodes are interconnected and accessible.
- Log in to the UI of Ceph Enterprise and choose .
- Enable the primary storages that are in the maintenance mode and make sure that the primary storages are in the connected state.
- Start the stopped VM instances.
