In this blog post we see how to set up time synchronization of your vSphere ESXi / vCenter using a time server from your local network. If using a Local NTP Server is not an option for you, it’s also okay to go with an Internet-based(Public) time server that takes care of your time zone. It is assumed that your NTP server doesn’t have authentication mechanisms in place, or any kind of access control that restricts NTP clients connectivity.
Step 1: Configure NTP Server (Optional)
You can choose to use publicly available NTP servers or set one locally in your infrastructure. For local installation and configuration of NTP servers check out the guides in the following links.
- How To Configure NTP Server on pfSense / OPNsense
- Configure Chrony NTP Server on RHEL 8 / CentOS 8
- Install FreeIPA Server on Rocky Linux 9 / AlmaLinux 9
With the NTP server installed and configured you can then proceed to configure your vSphere ESXi environment.
Step 2: Enable NTP daemon on ESXi Hosts
On each ESXi host we’ll need to start and enable NTP service. This can be performed from vSphere Web Client or from vCenter web console.
Option 1: Enable NTP daemon on ESXi using vSphere Web Client
Login to your host’s vSphere Web Client and go to Host > Manage > Services. Select NTP daemon and click start.
Update the policy as well to start the service with the host.
Option 2: Enable NTP daemon on ESXi using vCenter
Login to vCenter console and select the host where NTP daemon is to be started. Go to Configure > Services. From a list of services choose NTP Daemon and hit Start.
Next click “EDIT STARTUP POLICY” to update how the service lifecycle is managed.
Choose Start and stop with the host for automatic startup when the host is started.
Step 3: Configure vSphere ESXi / vCenter to use NTP
Let’s consider the two configuration scenario for setting NTP server in your VMware vSphere environment.
Configure vCenter to use NTP synchronization
Login to VMware vCenter server management console – https://vcenter.example.com:5480/. Authenticate using credentials set at the time of installation.
From the main menu navigate to Time > Time zone > Edit to set the correct timezone.
Set NTP host under Time synchronization settings.
Configure ESXi host to use NTP Time
You can use either of these methods.
Method 1: Using vSphere Web client
Select the host, then go to Manage > System > Time & date > Edit NTP Settings
Choose the setting to enable NTP and input your NTP server IP. If you haven multiple servers separate the list using comma.
When done save the settings by clicking Save.
Method 2: Using vCenter web console
Login to vCenter, then select ESXi host, Configure > Time Configuration > ADD SERVICE > NETWORK TIME PROTOCOL
Provide IP address of NTP server. For multiple servers separate the list with comma.
Click “TEST SERVICES” to test NTP service connection.
Our ESXi host and vCenter should now be using NTP for time settings. It’s recommended to provide multiple NTP servers to ensure time is at sync at any point in time. Configuring multiple NTP servers provides redundancy in case one of the servers is not reachable.