To set up the vCenter Server Appliance to use NTP-based time synchronization, you must add the NTP servers to the vCenter Server Appliance configuration.

Procedure

  1. Access the appliance shell and log in as a user who has the administrator or super administrator role.
    The default user with super administrator role is root.
  2. Add NTP servers to the vCenter Server Appliance configuration by running the ntp.server.add command.
    For example, run the following command:
    ntp.server.add --servers IP-addresses-or-host-names
    Here IP-addresses-or-host-names is a comma-separated list of IP addresses or host names of the NTP servers.
    This command adds NTP servers to the configuration. If the time synchronization is based on an NTP server, then the NTP daemon is restarted to reload the new NTP servers. Otherwise, this command just adds the new NTP servers to the existing NTP configuration.
  3. (Optional) To delete old NTP servers and add new ones to the vCenter Server Appliance configuration, run the ntp.server.set command.
    For example, run the following command:
    ntp.server.set --servers IP-addresses-or-host-names
    Here IP-addresses-or-host-names is a comma-separated list of IP addresses or host names of the NTP servers.
    This command deletes old NTP servers from the configuration and sets the input NTP servers in the configuration. If the time synchronization is based on an NTP server, the NTP daemon is restarted to reload the new NTP configuration. Otherwise, this command just replaces the servers in NTP configuration with the servers that you provide as input.
  4. (Optional) Run the command to verify that you successfully applied the new NTP configuration settings.
    ntp.get
    The command returns a space-separated list of the servers configured for NTP synchronization. If the NTP synchronization is enabled, the command returns that the NTP configuration is in Up status. If the NTP synchronization is disabled, the command returns that the NTP configuration is in Down status.

What to do next

If the NTP synchronization is disabled, you can configure the time synchronization settings in the vCenter Server Appliance to be based on an NTP server. See Synchronize the Time in the vCenter Server Appliance with an NTP Server.