Introduction
CTL is a system command of ZStack Cloud. You can use this command to complete various system settings. The CTL command has multiple subcommands, which simplifies the system installation and environment configuration.
This Manual describes what these subcommands are and how to use them.
Basic ctl Commands
status
Description
Displays the status and other information of ZStack Cloud on a specified node.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Displays the status and other information on the current node. | zstack-ctl
status |
| --host HOST | Displays the status and other information on the specified node. | zstack-ctl status
--host 192.168.0.10 |
start
Description
Starts services related to ZStack Cloud, including the management node and the UI service.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Starts the related services, including the management node and UI service. | zstack-ctl
start |
| --daemon | Displays the daemon mode. | zstack-ctl start
--daemon |
stop
Description
Stops services related to ZStack Cloud, including the management node and the UI service.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Stops the related services, including the management node and UI service. | zstack-ctl
stop |
start_ui
Description
Starts the UI service of ZStack Cloud.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | The IP address of the UI server. Default: localhost. | zstack-ctl start_ui
--host 172.20.11.122 |
| --mn-host MN_HOST | The IP address of the management node. Default: 127.0.0.1. | zstack-ctl start_ui
--mn-host 127.0.0.1 |
| --mn-port MN_PORT | The port of the management node. Default: 8080. | zstack-ctl start_ui
--mn-port 8080 |
| --webhook-host WEBHOOK_HOST | The IP address of the webhook host. Default: 127.0.0.1. | zstack-ctl start_ui
--webhook-host 127.0.0.1 |
| --webhook-port WEBHOOK_PORT | The port of the webhook host. Default: 5000. | zstack-ctl start_ui
--webhook-port 5000 |
| --server-port SERVER_PORT | The port of the UI server. Default: 5000. | zstack-ctl start_ui
--server-port 5000 |
| --log LOG | The directory to store UI logs. Default: /usr/local/zstack/apache-tomcat/logs. | zstack-ctl start_ui
--log /usr/local/zstack/apache-tomcat/logs |
| --enable-ssl | Enables UI login through HTTPS. | zstack-ctl start_ui
--enable-ssl |
| --ssl-keyalias SSL_KEYALIAS | The alias of the UI certificate. | zstack-ctl start_ui
--ssl-keyalias zstackui |
| --ssl-keystore SSL_KEYSTORE | The path of the UI certificate. Default: /usr/local/zstack/zstack-ui/ui.keystore.p12. | zstack-ctl start_ui
--ssl-keystore
/usr/local/zstack/zstack-ui/ui.keystore.p12 |
| --ssl-keystore-type SSL_KEYSTORE_TYPE | The type of the UI certificate. Default: PKCS12. | zstack-ctl start_ui
--ssl-keystore-type PKCS12 |
| --ssl-keystore-password SSL_KEYSTORE_PASSWORD | The private key password of the UI certificate. Default: password. | zstack-ctl start_ui
--ssl-keystore-password password |
| --db-url DB_URL | The URL of the UI database. Default: jdbc:mysql://10.0.46.243:3306. | zstack-ctl start_ui
--db-url jdbc:mysql://10.0.46.243:3306 |
| --db-username DB_USERNAME | The username of the UI database. Default: zstack_ui. | zstack-ctl start_ui --db-username
zstack_ui |
| --db-password DB_PASSWORD | The password of the UI database. Default: zstack.ui.password. | zstack-ctl start_ui
--db-password zstack.ui.password |
| --timeout TIMEOUT | The time used for the UI to start up. Default: 120s. | zstack-ctl start_ui
--timeout 120 |
Note: If you want to change the username or password of the UI
database, make sure that the zstack_ui database can be accessed by using the
new username and password.stop_ui
Description
Stops the UI service on the specified node.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | The IP address of the UI server. Default: localhost. | zstack-ctl stop_ui
--host 172.20.12.111 |
start_node
Description
Starts the management node service of ZStack Cloud on a specified node.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the SSH URL of the management node to be started. | zstack-ctl
start_node --host 172.20.11.122 |
| --timeout TIMEOUT | Sets the time used for ZStack Cloud to start up. Default: 300s. | zstack-ctl
start_node --timeout 600 |
| --daemon | Displays the daemon mode. | zstack-ctl
start_node --daemon |
| --simulator | Enable the display of the simulator mode. | zstack-ctl
start_node --simulator |
stop_node
Description
Starts the management node service of ZStack Cloud on a specified node.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the SSH URL of the management node to be stopped. | zstack-ctl
stop_node --host 172.20.12.111 |
| --force, -f | Forcibly stops the java process. | zstack-ctl stop_node
--force |
restart_node
Description
Restarts a management node.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Restarts a management node. | zstack-ctl restart_node |
configured_collect_log
Description
Collects diagnostic logs. The configured_collect_log command can be
used to collect new logs and view the log size. You can also specify the log
collection time, whether to collect logs of a single management node, database, or
compute node, and whether to collect logs of all nodes.
Usage
| Parameter | Description | Example |
|---|---|---|
| -p | Customizes the YAML configuration file path for log collection. | zstack-ctl configured_collect_log -p
/var/lib/zstack/ |
| --check | Only checks and displays the log size without collecting logs. | zstack-ctl configured_collect_log
--check |
| --full | (Default) Collects all logs other than database logs, including management node logs, compute node logs, backup storage logs, primary storage logs, and vRouter logs. | zstack-ctl configured_collect_log
--full |
| --full-db | Collects all logs, including the database logs. | zstack-ctl configured_collect_log
--full-db |
| --mn-db | Collects management node logs, including the database logs. | zstack-ctl configured_collect_log
--mn-db |
| --mn-only | Collects only management node logs, excluding database logs. | zstack-ctl configured_collect_log
--mn-only |
| --mn-host | Collects management node and compute node logs, excluding database logs. | zstack-ctl configured_collect_log
--mn-host |
| --since SINCE | Collects logs within N days (Nd) or N hours (Nh). | zstack-ctl configured_collect_log --since
2d |
| --from-date FROM_DATE |
|
zstack-ctl configured_collect_log
--from-date 2018-11-22 |
| --to-date TO_DATE |
|
zstack-ctl configured_collect_log
--to-date 2018-11-23 |
dump_mysql
Description
Saves the database to a backup file.
Usage
| Parameter | Description | Example |
|---|---|---|
| --file-name FILE_NAME | Specify a name for the backup database. Default:
zstack-backup-db. Note: The system auto-generates the IP
address of the management node as the prefix of the backup file
name and the file generation date and time as the suffix of the
backup file name. In case of a double management node
environment, the auto-generated IP address is the IP address of
the management node where the VIP resides. For example,
172.20.1.123-zstack-backup-db-2016-12-07_14-43-43.gz
indicates the database backup file of the management node
172.20.1.123 generated at 14:43:42 of 7 Dec,
2016. |
zstack-ctl dump_mysql --file-name
'zstack-backup-db' |
| --file-path FILE_PATH | Specify an absolute path for the database backup file. Default: /var/lib/zstack/mysql-backup. | zstack-ctl
dump_mysql --file-path
'/var/lib/zstack/mysql-backup' |
| --keep-amount KEEP_AMOUNT | Specify the number of database backup files. Default: 60. If the number of database backups exceeds the threshold, excessive database backups will be deleted. | zstack-ctl dump_mysql --keep-amount
50 |
| --host-info HOST_INFO | Specify the remote host to which the
database and UI data is synchronized. The format of the value is
root@ip_address:port.
|
zstack-ctl
dump_mysql --host-info root@172.20.0.30:22 |
| --host HOST_INFO | zstack-ctl
dump_mysql --host root@172.20.0.30:22 |
|
| --h HOST_INFO | zstack-ctl
dump_mysql --h root@172.20.0.30:22 |
|
| --delete-expired-file | Delete the expired files on the /var/lib/zstack/from-zstack-remote-backup/ directory of the remote host. | zstack-ctl dump_mysql
--delete-expired-file |
| --delete | zstack-ctl dump_mysql
--delete |
|
| --d | zstack-ctl dump_mysql
--d |
|
| --append-sql-file APPEND_SQL_FILE | Append a SQL file to operate on the database. | zstack-ctl dump_mysql
--append-sql-file SQL_File |
change_ip
Description
Updates the management IP address from the configuration file of ZStack Cloud.
Usage
| Parameter | Description | Example |
|---|---|---|
| --ip IP | Sets a new IP address for a management node. The
new IP address is automatically synchronized to the configuration
file of ZStack Cloud. Note: If you changed the
OS IP address of the current management node, you can use this
command to change the IP addresses of all configuration file
related to ZStack Cloud to the new IP
address. |
zstack-ctl change_ip --ip
172.20.12.47 |
| --mysql_ip MYSQL_IP | Sets a new IP address for a database. By default, the IP address is the same as that of the corresponding management node. | zstack-ctl change_ip --mysql_ip
172.20.12.47 |
| --cloudbus_server_ip CLOUDBUS_SERVER_IP | Sets a new IP for CloudBus. By default, the IP address is the same as that of the corresponding management node. | zstack-ctl change_ip --cloudbus_server_ip
172.20.12.47 |
show_configuration
Description
Displays information about the zstack.properties configuration file of ZStack Cloud.
| Parameter | Description | Example |
|---|---|---|
| none | Displays the information about the zstack.properties configuration file of ZStack Cloud. | zstack-ctl
show_configuration |
configure
Description
Modifies the configuration file of ZStack Cloud.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Sets the IP address or domain name for a management node. Default: localhost. | zstack-ctl configure --host
root@192.168.0.10 |
| --duplicate-to-remote DUPLICATE_TO_REMOTE | Synchronizes the configuration file of the current management node to a remote node. | zstack-ctl configure
--duplicate-to-remote root@192.168.0.10 |
| --use-file USE_FILE | Sets the location of the configuration file. | zstack-ctl configure --use-file
/usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties |
show_ui_config
Description
Displays UI configurations, such as the service port.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Displays UI configurations, such as the service port. | zstack-ctl
show_ui_config |
config_ui
Description
Configure the UI address, port, and other information.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | The IP address of the UI server. Default: localhost. | zstack-ctl config_ui --host
172.20.11.122 |
| --init | Initializes zstack.ui.properties. | zstack-ctl config_ui
--init |
| --restore | Resets zstack.ui.properties to the default value. | zstack-ctl config_ui
--restore |
| --mn-host MN_HOST | The IP address of the management node. Default: 127.0.0.1. | zstack-ctl config_ui --mn-host
127.0.0.1 |
| --mn-port MN_PORT | The port of the management node. Default: 8080. | zstack-ctl config_ui --mn-port
8080 |
| --webhook-host WEBHOOK_HOST | The IP address of the webhook host. Default: 127.0.0.1. | zstack-ctl config_ui --webhook-host
127.0.0.1 |
| --webhook-port WEBHOOK_PORT | The port of the webhook host. Default: 5000. | zstack-ctl config_ui --webhook-port
5000 |
| --server-port SERVER_PORT | The port of the UI server. Default: 5000. | zstack-ctl config_ui --server-port
5000 |
| --ui-address UI_ADDRESS | Changes the IP address of the UI server. | zstack-ctl config_ui --ui-address
172.20.0.10 |
| --log LOG | The UI log directory. Default: /usr/local/zstack/apache-tomcat/logs. | zstack-ctl config_ui --log
/usr/local/zstack/apache-tomcat/logs |
| --enable-ssl {True,False} | Enables or Disables UI login through HTTPS. Default: False. | zstack-ctl config_ui --enable-ssl
True |
| --ssl-keyalias SSL_KEYALIAS | The alias of the UI certificate. Default: zstackui. | zstack-ctl config_ui --ssl-keyalias
zstackui |
| --ssl-keystore SSL_KEYSTORE | The path of the UI certificate. Default: /usr/local/zstack/zstack-ui/ui.keystore.p12. | zstack-ctl config_ui --ssl-keystore
/usr/local/zstack/zstack-ui/ui.keystore.p12 |
| --ssl-keystore-type {PKCS12,JKS} | The type of the UI certificate. Default: PKCS12. | zstack-ctl config_ui --ssl-keystore-type
PKCS12 |
| --ssl-keystore-password SSL_KEYSTORE_PASSWORD | The private key password of the UI certificate. Default: password. | zstack-ctl config_ui
--ssl-keystore-password password |
| --db-url DB_URL | The URL of the UI database. Default: jdbc:mysql://10.0.46.243:3306. | zstack-ctl config_ui --db-url
jdbc:mysql://10.0.46.243:3306 |
| --db-username DB_USERNAME | The username of the UI database. Default: zstack_ui. | zstack-ctl config_ui --db-username
zstack_ui |
| --db-password DB_PASSWORD | The password of the UI database. Default: zstack.ui.password. | zstack-ctl config_ui --db-password
zstack.ui.password |
Note: If you want to change the username or password of the UI
database, make sure that the zstack_ui database can be accessed by using the
new username and password.ui_status
Description
Checks the UI service status of a specified node.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the IP address of the UI server to be checked. Default: localhost. | zstack-ctl ui_status --host
172.20.11.12 |
install_license
Description
Installs the license of ZStack Cloud. Note that you need to refresh the UI after installing the license.
Usage
| Parameter | Description | Example |
|---|---|---|
| --license LICENSE, -f LICENSE | Specifies the complete path for the license. | zstack-ctl install_license --license
/root/trailext-license-100days-6hosts.txt |
| --prikey PRIKEY | Optional. Specifies the path for the generated license private key. | zstack-ctl install_license --prikey
/root/tmp |
reset_password
Description
Resets the password of the admin in ZStack Cloud.
Usage
| Parameter | Description | Example |
|---|---|---|
| --password PASSWORD |
Resets the password of the admin in ZStack Cloud. If not set, the default one (password) is used. |
zstack-ctl reset_password --password
123456 |
change_mysql_password
Description
Changes the password of the MySQL database.
Usage
| Parameter | Description | Example |
|---|---|---|
| --root-password ROOT_PASSWORD, -root ROOT_PASSWORD | The original root password of the MySQL database. | zstack-ctl change_mysql_password
--root-password oldpswd |
| --user-name USER_NAME, -user USER_NAME | The username whose password to be changed. | zstack-ctl change_mysql_password
--user-name root |
| --new-password NEW_PASSWORD, -new NEW_PASSWORD | The new password. | zstack-ctl change_mysql_password
--new-password newpswd |
| --remote-ip REMOTE_IP, -ip REMOTE_IP | The remote IP address to be set if you need to change the password of a remote database. | zstack-ctl change_mysql_password
--remote-ip 10.0.0.2 |
Advanced ctl Commands
install_management_node
Description
Installs ZStack Cloud management node on the current node or a remote node according to the configuration file. Before you can install other nodes, configure the current node first.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the IP address of the management node to be installed. | zstack-ctl install_management_node --host
172.20.12.111 |
| --install-path INSTALL_PATH | Specifies the path for installing the management node. Default: /usr/local/zstack. | zstack-ctl install_management_node
--install-path /usr/local/zstack |
| --source-dir SOURCE_DIR | Specifies the path for installing Apache Tomcat. Default: /usr/local/zstack/apache-tomcat/. | zstack-ctl install_management_node
--source-dir /usr/local/zstack/apache-tomcat/ |
| --debug | Displays Ansible debugging details. | zstack-ctl install_management_node
--debug |
| --force-reinstall | Deletes the existing Apache Tomcat and re-installs the management node. | zstack-ctl install_management_node
--force-reinstall |
| --yum YUM | Uses the YUM repos predefined by ZStack Cloud. Available repos: alibase, aliepel, 163base, ustcepel, and zstack-local. | zstack-ctl install_management_node --yum
163base |
| --ssh-key SSH_KEY | Sets a private key path for SSH login. | zstack-ctl install_management_node
--ssh-key /root/.ssh/id_rsa |
upgrade_management_node
Description
Upgrades the management node to a specified version.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the SSH URL of the node to be upgraded. | zstack-ctl upgrade_management_node --host
172.20.31.34 |
| --war-file WAR_FILE | Sets the URL for the zstack.war package. The URL can be an HTTP URL or a complete path. | zstack-ctl upgrade_management_node
--war-file /usr/local/zstack/zstack.war |
| --debug | Displays Ansible debugging details. | zstack-ctl upgrade_management_node
--debug |
| --ssh-key SSH_KEY | Sets a private key path for SSH login. | zstack-ctl upgrade_management_node
--ssh-key /root/.ssh/id_rsa |
rollback_management_node
Description
Rolls back to the management node status if the upgrade fails.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Specifies the IP address of the management node to be rolled back. | zstack-ctl rollback_management_node
--host 172.20.12.111 |
| --war-file WAR_FILE | Sets the URL for the zstack.war package. The URL can be an HTTP URL or a complete path. | zstack-ctl rollback_management_node
--war-file /usr/local/zstack/zstack.war |
| --debug | Displays Ansible debugging details. | zstack-ctl rollback_management_node
--debug |
| --ssh-key SSH_KEY | Sets a private key path for SSH login. | zstack-ctl rollback_management_node
--ssh-key /root/.ssh/id_rsa |
| --property-file PROPERTY_FILE | Specifies the configuration file to be rolled back. | zstack-ctl rollback_management_node
--property-file
/usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties |
taillog
Description
Displays log updates of the management node.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Displays log updates of the management node. | zstack-ctl taillog |
install_ui
Description
Installs ZStack Cloud UI.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST |
Specifies the node on which ZStack Cloud UI is installed. By default, the UI is installed on the current management node. |
zstack-ctl install_ui --host
172.20.12.144 |
| --ssh-key SSH_KEY | Sets a complete path for the private key. Ansible will automatically log in to the specified node to install the UI. | zstack-ctl install_ui --ssh-key
/root/.ssh/id_rsa |
install_db
Description
Installs ZStack Cloud database.
Usage
| Parameter | Description | Example |
|---|---|---|
| --host HOST | Sets an IP address or a domain name for the database server. Default value: localhost. | zstack-ctl install_db --host
|
| --root-password ROOT_PASSWORD | Sets a new password for root users of the MySQL database. | zstack-ctl install_db
--root-password |
| --login-password LOGIN_PASSWORD | Sets an original login password for the MySQL database. | zstack-ctl install_db --login-password
password1 |
| --yum YUM | Uses the YUM repos predefined by ZStack Cloud. Available repos: alibase, aliepel, 163base, ustcepel, and zstack-local. | zstack-ctl install_db --yum
163base |
| --no-backup NO_BACKUP | Disables auto backup if your database is large and you want manual backup. Default: false, that is, the database is automatically backed up. | zstack-ctl install_db
--no-backup |
| --ssh-key SSH_KEY | Sets a private key path for SSH login. | zstack-ctl install_db --ssh-key
/root/.ssh/id_rsa |
upgrade_db
Description
Upgrades the database to the latest version.
Usage
| Parameter | Description | Example |
|---|---|---|
| --force | Upgrades the database without checking the management node status. | zstack-ctl upgrade_db
--force |
| --no-backup NO_BACKUP | Disables auto backup if your database is large and you want manual backup. Default: false, that is, the database is automatically backed up. | zstack-ctl upgrade_db
--no-backup |
| --dry-run | Checks whether the database can be upgraded. | zstack-ctl upgrade_db
--dry-run |
deploydb
Description
Configures ZStack Cloud database.
Usage
| Parameter | Description | Example |
|---|---|---|
| --root-password ROOT_PASSWORD | Creates a MySQL root user and sets a password. | zstack-ctl deploydb --root-password
root123 |
| --zstack-password ZSTACK_PASSWORD | Creates a user with the name ZStack and sets a password. | zstack-ctl deploydb --zstack-password
zstack123 |
| --host HOST | Sets an IP address or a domain name for the database server. Default: localhost. | zstack-ctl deploydb --host
172.20.11.133 |
| --port PORT | Sets the MySQL port. Default: 3306. | zstack-ctl deploydb --port
3300 |
| --no-update | Does not upgrade the database information to the configuration file. | zstack-ctl deploydb
--no-update |
| --drop | Deletes existing databases. | zstack-ctl deploydb
--drop |
| --keep-db | Keeps existing databases from being upgraded. | zstack-ctl deploydb
--keep-db |
rollback_db
Description
Rolls back to the database status if the upgrade fails.
Usage
| Parameter | Description | Example |
|---|---|---|
| --db-dump DB_DUMP | Specifies backup files to be recovered. | zstack-ctl rollback_db --db-dump
/zstackdb/backupdb.bk |
| --root-password ROOT_PASSWORD | The MySQL root password, which is blank by default. | zstack-ctl rollback_db --root-password
password |
| --force |
Ignores to check the management node status.
Note: Exercise
caution. Make sure that you totally understand the
consequence before you run this command. |
zstack-ctl rollback_db
--force |
clear_license
Description
Clears and backs up ZStack Cloud licenses.
restore_config
Description
Restores ZStack Cloud from the configuration file in a specified directory, including keys of zstack.properties and ssh host.
Usage
| Parameter | Description | Example |
|---|---|---|
| --restore-from RESTORE_FROM | Specifies the path of the configuration file to be used. | zstack-ctl restore_config --restore-from
/usr/local/zstack/apache-tomcat/webapps/zstack |
save_config
Description
Saves the configuration file of ZStack Cloud to a specified path under ZSTACK_HOME.
Usage
| Parameter | Description | Example |
|---|---|---|
| --save-to SAVE_TO | Specifies the path for the configuration file of ZStack Cloud. | zstack-ctl save_config --save-to
/usr/local/zstack/apache-tomcat/webapps/zstack |
set_deployment
Description
Sets the cluster deployment scale of ZStack Cloud.
Usage
| Parameter | Description | Example |
|---|---|---|
| --size | Specifies the cluster deployment scale of ZStack Cloud. Options: small, large, medium, and default. | zstack-ctl set_deployment --size
small |
Scenario
From version 3.10.0, ZStack Cloud allows you to specify the cluster deployment scale and assign different attribute values to clusters accordingly. Options: default, small, medium, and large, where default is the default scale.
| Attribute | Default | Small | Medium | Large |
|---|---|---|---|---|
| Existing attribute: DbFacadeDataSource.maxPoolSize | 100 | 64 | 128 | 128 |
- default: Default environment, which allows for 50 hosts.
- small: Small-size environment, which allows for 100 hosts or 1000 VM instances.
- medium: Medium-size environment, which allow for 400 hosts or 4,000 VM instances.
- large: Large-size environment, which allows for 1,000 hosts or 10,000 VM instances.
start_vdi
Description
Starts the UI service of ZStack Cloud VDI.
Usage
| Parameter | Description | Example |
|---|---|---|
| --mn-port MN_PORT | The port of ZStack Cloud management node. Default: 8080. | zstack-ctl start_vdi --mn-port
8000 |
| --webhook-port WEBHOOK_PORT | The port of the webhook node. Default: 9000. | zstack-ctl start_vdi --webhook-port
9050 |
| --server-port SERVER_PORT | The port of the UI service. Default: 9000. | zstack-ctl start_vdi --server-port
9050 |
| --vdi-path VDI_PATH | The VDI path. Default: /opt/zstack-dvd/zstack-vdi.war. | zstack-ctl start_vdi --vdi-path
/opt/root/zstack-vdi.war |
| --log LOG | The UI log directory. Default: /usr/local/zstack/apache-tomcat/logs. | zstack-ctl start_vdi --log
/usr/log/logs |
stop_vdi
Description
Stops the VDI service on the local node.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Stops the VDI service on the local node. | zstack-ctl stop_vdi |
vdi_status
Description
Checks the VDI status on the local node.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Checks the VDI status on the local node. | zstack-ctl vdi_status |
setenv
Description
Sets variables in /usr/local/zstack/zstack-ctl/ctl-env of zstack-ctl.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Sets variables in /usr/local/zstack/zstack-ctl/ctl-env of zstack-ctl. | zstack-ctl setenv |
unsetenv
Description
Cancels to set variables in /usr/local/zstack/zstack-ctl/ctl-env of zstack-ctl.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Cancels to set variables in /usr/local/zstack/zstack-ctl/ctl-env of zstack-ctl. | zstack-ctl unsetenv |
mysql_restrict_connection
Description
Sets an allowlist policy for the database account of the management node. After an allowlist is enabled, only the management node where the database is located can access the database. The path of other non-management nodes cannot access the database.
Usage
| Parameter | Description | Example |
|---|---|---|
| --restrict | Enables the allowlist policy to restrict database access. | zstack-ctl mysql_restrict_connection
--root-password zstack.mysql.password
--restrict |
| --restore | Restores the previous policy so that the access to the database is not restricted. | zstack-ctl mysql_restrict_connection
--root-password zstack.mysql.password --restore |
getenv
Description
Obtains variables from /usr/local/zstack/zstack-ctl/ctl-env.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Obtains variables from /usr/local/zstack/zstack-ctl/ctl-env. | zstack-ctl getenv |
bootstrap
Description
Creates ZStack Cloud users and user groups and add them to sudoers.
Usage
| Parameter | Description | Example |
|---|---|---|
| none | Creates ZStack Cloud users and user groups and add them to sudoers. | zstack-ctl bootstrap |
upgrade_ctl
Description
Upgrades zstack-ctl to a new version.
Usage
| Parameter | Description | Example |
|---|---|---|
| --package PACKAGE | Specifies a path for zstack-ctl installation package. | zstack-ctl upgrade_ctl --package
./apache-tomcat-7.0.35/webapps/zstack/WEB-INF/classes/tools/zstackctl-1.8.tar.gz |
