Accurate time synchronization is critical for environment stability. Incorrect time negatively impacts authentications, cryptographic algorithms, distributed systems such as SQL and Exchange, and Active Directory replication. This article provides diagnostic steps and resolutions for common NTP synchronization failures on VMware ESXi.
Configuration is not working normally"/var/run/log/hostd.log) contain errors such as kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized.leap_alarm string.vmkping command from the management VMkernel interface. (Typically vmk0)vmkping -I vmk# <NTP server IP>traceroute to identify the packet path and identify potential blocks in the network.traceroute <NTP server IP>ntpq utility to check synchronization status from the ESXi command line:watch ntpq -pnreach value of 377 indicates successful contact over the last eight polls.refid column displays INIT, the host has not received a valid response from the NTP server.tcpdump-uw -c 5 -n -i vmk# host <NTP_Server_IP> and port 123tos maxdist) - If the NTP server is a Windows Domain Controller or reports high dispersion updating the tos maxdist will allow successful NTP sync:cp /etc/ntp.conf /etc/ntp.conf.baktos maxdist setting in the ntp.conf config file:sed -i '/tos maxdist/d' /etc/ntp.conf
echo "tos maxdist 15" >> /etc/ntp.confesxcli system ntp set -f /etc/ntp.conf && esxcli system ntp set -e 0 && esxcli system ntp set -e 1/etc/init.d/ntpd restart*Note: It may take one to fifteen minutes for time to synchronize to reflect accurately after the service restart.