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

  1. Follow these steps to configure multiple NTP servers for a host:

  2. Log in to the Management Node and edit the zstack.properties configuration 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
  3. Restart the Management Node service to apply the configuration:

    [root@localhost ~]# zstack-ctl restart_node
  4. Verify time synchronization. An asterisk (*) in the output indicates successful synchronization:

    [root@localhost ~]# chronyc sources -v

On this page