How to configure multiple NTP servers for a host
ZSvirt was open-sourced from the ZStack ZSphere commercial project and has since developed independently. Some code, configuration, and documentation still retain historical ZStack/ZSphere names (such as environment variables, configuration items, dependencies, paths, and commands). These names are for compatibility only and do not affect the normal use of ZSvirt.
Solution
-
Follow these steps to configure multiple NTP servers for a host:
-
Log in to the Management Node and edit the
zstack.propertiesconfiguration file to add the following parameters specifying the NTP server IP addresses:[root@localhost ~]# vim /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties ... chrony.serverIp.0 = X.X.X.X chrony.serverIp.1 = X.X.X.X chrony.serverIp.2 = X.X.X.X //X.X.X.X is the IP address of each NTP server -
Restart the Management Node service to apply the configuration:
[root@localhost ~]# zstack-ctl restart_node -
Verify time synchronization. An asterisk (*) in the output indicates successful synchronization:
[root@localhost ~]# chronyc sources -v