You can change the time synchronization settings in vCenter Server after deployment.

When you deploy vCenter Server, you can choose the time synchronization method to be either by using an NTP server or by using VMware Tools. In case the time settings in your vSphere network change, you can edit the vCenter Server and configure the time synchronization settings by using the commands in the appliance shell.

When you enable periodic time synchronization, VMware Tools sets the time of the guest operating system to be the same as the time of the host.

After time synchronization occurs, VMware Tools checks once every minute to determine whether the clocks on the guest operating system and the host still match. If not, the clock on the guest operating system is synchronized to match the clock on the host.

Native time synchronization software, such as Network Time Protocol (NTP), is typically more accurate than VMware Tools periodic time synchronization and is therefore preferred. You can use only one form of periodic time synchronization in vCenter Server. If you decide to use native time synchronization software, vCenter Server VMware Tools periodic time synchronization is deactivated.

Use VMware Tools Time Synchronization

You can set up vCenter Server to use VMware Tools time synchronization.

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. Run the command to enable VMware Tools time synchronization.
    timesync.set --mode host
  3. (Optional) Run the command to verify that you successfully applied the VMware Tools time synchronization.
    timesync.get
    The command returns that the time synchronization is in host mode.

Results

The time of the appliance is synchronized with the time of the ESXi host.

Add or Replace NTP Servers in the vCenter Server Configuration

To set up the vCenter Server to use NTP-based time synchronization, you must add the NTP servers to the vCenter Server 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 configuration by running the following ntp.set command.
    ntp.set --servers IP-addresses-or-host-names
    In this command, IP-addresses-or-host-names is a comma-separated list of IP addresses or host names of the NTP servers.
    This command removes the current NTP servers (if any) and adds the new 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 replaces the current NTP servers in the NTP configuration with the new NTP servers you specify.
  3. (Optional) To verify that you successfully applied the new NTP configuration settings, run the following command.
    ntp.get
    The command returns a space-separated list of the servers configured for NTP synchronization. If the NTP synchronization is activated, the command returns that the NTP configuration is in Up status. If the NTP synchronization is deactivated, the command returns that the NTP configuration is in Down status.
  4. (Optional) To verify if the NTP server is reachable, run the following command.
    ntp.test --servers IP-addresses-or-host-names
    The command returns the status of the NTP servers.

What to do next

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

Synchronize the Time in vCenter Server with an NTP Server

You can configure the time synchronization settings in the vCenter Server to be based on an NTP server.

Prerequisites

Set up one or more Network Time Protocol (NTP) servers in the vCenter Server configuration. See Add or Replace NTP Servers in the vCenter Server 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. Run the command to enable NTP-based time synchronization.
    timesync.set --mode NTP
  3. (Optional) Run the command to verify that you successfully applied the NTP synchronization.
    timesync.get
    The command returns that the time synchronization is in NTP mode.