managementIp
field, which indicates that when a host has multiple IP addresses, the newly added IP addresses are used by the management node to connect and deploy agents.After you delete the host where the VM instances belong, the corresponding VM instances will be stopped.
In the management node, check whether /usr/local/zstack/apache-tomcat/logs/management-server.log is abnormal.
On a host, check ps -ef|grep kvmagent
to determine whether the KVM agent is working properly.
On a host, check whether /var/log/zstack/zstack-kvmagent.log is abnormal.
On a host, check whether service libvirtd status
is abnormal.
On a host, check whether /var/log/messages is abnormal.
Check whether the connection between hosts and primary storages is abnormal.
[root@localhost ~]# zstack-cli admin>> LogInByAccount accountName=admin password=PASSWORD # Here, PASSWORD is the login password.
admin>> UpdateKVMHost uuid=HOST_UUID password=NEW_PASSWORD # Here, HOST_UUID is the host UUID, and NEW_PASSWORD is the new password.
[root@localhost ~]# wget http://cdn.zstack.io/tools/zstack_tools.tar.gz #Download the tool package. [root@localhost ~]# tar zxvf zstack_tools.tar.gz #Decompress the tool package. [root@localhost ~]# cd zstack_tools/ #Go to the directory where the tool package is stored.
ansible/hosts.example
.[root@localhost zstack_tools]# vim ansible/hosts.example #Make the modifications as follows: #Node IP [nodes] 10.10.0.11 10.10.0.12 10.10.0.13 #Node user/password [nodes:vars] ansible_user=root ansible_ssh_pass=password #Time synchronization server [chrony] 10.10.0.13 #Save and exit. Edit the hostname prefix. Modify the hostname prefix under ansible/group_vars/nodes. vim ansible/group_vars/nodes #Make the modifications as follows: hostname_prefix: ceph- #Save and exit. Then, the prefix of each hostname will be configured in a specified format, such as ceph-1 and ceph-2.
/etc/hosts
. This script will also disable the firewall.[root@localhost ~]# ./prepare.sh -i ./ansible/hosts.example
[root@localhost ~]# zstack-cli admin>> LogInByAccount accountName=admin password=PASSWORD # Here, PASSWORD is the login password.
admin>> QueryHost fields=managementIp, "hypervisorType"=KVM admin>> for i in $(zstack-cli QueryHost fields=managementIp, hypervisorType=KVM|awk -F "\"" '/managementIp/ {print $4}'); do \ ssh $i -i \ /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/ansible/rsaKeys/id_rsa 'echo "NEW_PSAAWORD" | passwd --stdin root'; done #Here, NEW_PSAAWORD is the new password.
[root@localhost ~]# for i in $(zstack-cli QueryHost fields=uuid, hypervisorType=KVM|awk -F "\"" '/uuid/ {print $4}') [root@localhost ~]# do zstack-cli UpdateKVMHost uuid=$i password=NEW_PSAAWORD #Here, NEW_PSAAWORD is the new password. [root@localhost ~]# done
[root@localhost ~]# zstack-cli LogInByAccount accountName=admin password=password admin>> for i in $(zstack-cli QueryHost fields=managementIp, hypervisorType=KVM|awk -F "\"" '/managementIp/ {print $4}'); do \ ssh $i -i \ /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/ansible/rsaKeys/id_rsa \ 'adduser test;echo "NEW_PSAAWORD" | passwd --stdin test;echo "test ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers;' #Here, NEW_PSAAWORD is the new password. admin>> done
zstack-cli
commands to change the user name and password of hosts in bulk to NEW_NAME and NEW_PSAAWORD, respectively.[root@localhost ~]# for i in $(zstack-cli QueryHost fields=uuid, hypervisorType=KVM|awk -F "\"" '/uuid/ {print $4}') [root@localhost ~]# do [root@localhost ~]# zstack-cli UpdateKVMHost uuid=$i password=password123 username=test [root@localhost ~]# done
Back to Top
Email Us
contact@zstack.ioEmail Us
contact@zstack.ioEmail Us
contact@zstack.ioThe 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.Thank you for using ZStack products and services.
Submit successfully.
We'll connect soon.Thank you for using ZStack products and services.