Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

ESXi host time is wrong: NTP shows 'Time Synchronized: false' or 'Configuration is not working normally'

Technical article
VMware

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

When esxcli system ntp get on an ESXi host prints Time Synchronized: false, or the vSphere Client's Test Services shows "Configuration is not working normally", the NTP service is running but has not accepted a time source. Run ntpq -pn on the host. A source with .INIT. in the refid column and a reach of 0 means no usable reply has arrived, and causes include an empty ntpClient firewall allow list, a blocked UDP port 123, a VLAN mismatch or a time source Broadcom's documentation says the host rejects.

Do not set the clock by hand first. A manual step hides the fault and the clock drifts again.

What the symptom means

ESXi 7.0 Update 3 and later keep NTP configuration in ConfigStore. Broadcom states that /etc/ntp.conf and /etc/ptp.conf can no longer be edited directly, that files under /etc are read-only, and that edits do not persist across reboot. The supported route is the esxcli system ntp commands, which read and write ConfigStore and survive a reboot.

After NTP is configured, expect a wait. Broadcom's article on the iburst option says that by default ESXi takes up to about 200 seconds to synchronise, and shows Time Synchronized: false changing to true at roughly that point. Do not judge a new configuration in the first few minutes.

Broadcom's troubleshooting page for NTP on ESXi uses ntpq -pn (with watch) to show the peers. It describes the columns this way:

  • refid of .INIT. means the host has not received a response from the server.
  • st is the stratum. A value of 16 is the protocol limit: the host treats the source as invalid.
  • reach is an octal shift register of the last eight polls. 377 is binary 11111111, so every one of the last eight succeeded. On a healthy link it climbs 1, 3, 7, 17, 37, 77, 177, 377.
  • offset is the difference in milliseconds from the server. Nearer 0 is better.

Broadcom's NTP Operational Thresholds page (KB 453048) gives healthy and warning bands. Stratum 1 to 3 is healthy and 4 or higher is a warning. Root dispersion under 1000 ms is healthy, and at 1500 ms (1.5 seconds) "this is a hard-coded threshold in ESXi", so the host rejects the source. Offset above 50 ms is a warning. Above 128 ms the daemon steps the clock instead of slewing it, which Broadcom says "can be disruptive to applications sensitive to time continuity". Jitter under 10 ms is healthy.

Why it matters: Broadcom's page 443781 says incorrect time "negatively impacts authentications, cryptographic algorithms, distributed systems such as SQL and Exchange, and Active Directory replication". Its article on NSX signature failures adds that a host whose time is well out from vCenter can see a certificate as "not yet valid" or "expired" when it is not.

Likely causes

Cause What you see How to confirm
ntpClient firewall ruleset enabled but its allowed IP list is empty Service active, .INIT., reach 0; syslog keeps repeating "kernel reports TIME_ERROR: 0x6041: Clock Unsynchronized" after the first minutes (Broadcom says the message is normal and expected when ntpd starts) esxcli network firewall ruleset allowedip list shows nothing for ntpClient
UDP 123 blocked, or server unreachable ntpq shows "No association ID's returned", or no packets back vmkping -I vmk0 <ntp server>, traceroute, tcpdump-uw on port 123
Replies arrive tagged with a different VLAN Port test succeeds but reach stays 0; clock drifts despite manual correction pktcap-uw shows a VLAN tag that differs from the management VMkernel's VLAN
Source rejected for high root dispersion, for example a Windows domain controller Reach is not 0 but the host will not select it ntpq -c associations gives the association ID, then ntpq -c "rv <assid>" shows rootdisp of 1500 ms or more, or a flash value of 400
Server speaks NTPv3 while ESXi uses NTPv4 Same as above Ask the server owner which version it serves
Dual-stack hostname resolves to an IPv6 address the host cannot route Reach 0 against an IPv6 address ping6 to the address fails with "No route to host"
Configuration edited as a file on 7.0 Update 3 or later "NTP not synchronized" after editing /etc/ntp.conf Edits do not persist; check esxcli system ntp get
Just configured Time Synchronized: false for the first minutes Wait about 200 seconds, then re-read

Prove the cause before changing anything

All of these are read-only.

esxcli system ntp get
esxcli system ntp test
watch ntpq -pn
esxcli network firewall ruleset list | grep -i ntpclient
esxcli network firewall ruleset allowedip list | grep -i ntpclient
esxcfg-vmknic -l
vmkping -I vmk0 <ntp server IP>
tcpdump-uw -c 5 -n -i vmk0 host <ntp server IP> and port 123
esxcli system time get

esxcli system ntp get prints fields including Enabled, Servers, Time Service Enabled and Time Synchronized, as the sample output on Broadcom's page 313808 shows. vmkping -I vmk# is the reachability test on Broadcom's page 443781, and esxcfg-vmknic -l (page 312204) lists the VMkernel interfaces. esxcli system ntp test is documented as verifying the operational status of the NTP service. Watch ntpq -pn for about 30 seconds, as Broadcom suggests, and press Ctrl+C to stop. If ntpq answers "Connection refused", the service is not running or no servers are configured. If it prints "No association ID's returned", the host cannot reach the configured server.

For the firewall, the first command should list ntpClient as true. In the second, Broadcom's sample shows All, and it says "If allowedip is not set to "All"", to add your server's address or set the allow-all property. A blank list drops all outgoing NTP.

In tcpdump-uw output, a line showing a v4 client packet to port 123 and a reply shows the exchange is working. In /var/run/log/vmkernel.log, "system clock synchronized to upstream time servers" is good. "system clock apparently no longer synchronized to upstream time servers" is a loss of sync, and "system clock stepped" means the daemon corrected a large offset.

Example (illustrative): esx01 uses 198.51.100.10 as its only NTP server. esxcli system ntp get shows Time Service Enabled: true and Time Synchronized: false. ntpq -pn shows .INIT., stratum 16, reach 0. The firewall allowed IP list for ntpClient is empty. After the list is fixed and the service restarted, reach should step 1, 3, 7 and onward. With a poll interval of 64 seconds, the figure in Broadcom's sample, eight successful polls take 8 × 64 = 512 seconds, so reach 377 is about 8.5 minutes away.

Fix

Firewall allow list empty

Disruptive step: this changes the host firewall and stops and starts the NTP service. Time sync pauses while it is stopped. To back out, restore the previous allowed IP setting with the same commands.

Broadcom's sequence is: stop NTP with esxcli system ntp set -e 0; then either allow all addresses with esxcli network firewall ruleset set -a true -r ntpClient, or allow only your server with esxcli network firewall ruleset allowedip add -i <ip> -r ntpClient; then start NTP with esxcli system ntp set -e 1 and check with ntpq -p. Allowing only one address is tighter, but Broadcom notes you must add the new address each time the server changes.

Configure NTP the supported way

Risk: this changes the host's NTP configuration. The -f file form replaces the configuration with the file's contents, so the file must hold every server line you still need, and esxcli system ntp set -e 1 starts the service. Time sync pauses while ntpd restarts. Back out by setting the previous servers again with -s, or by loading a saved copy of the previous file with -f. Run esxcli system ntp get first and keep its output.

For one server: esxcli system ntp set -s <NTP server> -e 1. For several: repeat -s. These persist across reboots. In the vSphere Client, Broadcom's route is the host's Configure tab, System, Time Configuration, Edit, with the NTP service set to start and stop with the host.

To speed the first sync, Broadcom shows esxcli system ntp set -s '<server> iburst', which took 8 seconds in its sample instead of about 200. To pass extra parameters, write them in a file and load it. Broadcom's example file holds server <ntpserver.yourdomain.com> and tos maxdist 30, saved as /scratch/ntpconfig.txt, loaded with esxcli system ntp set -f /scratch/ntpconfig.txt and enabled with esxcli system ntp set -e 1.

Source rejected for high root dispersion

If ntpq shows the source but the host will not use it, Broadcom says the host does not accept a reply with root dispersion above 1.5 seconds, and that tos maxdist raises the tolerance. Its examples use 30 (KB 313810) and 15 (KB 443781 and KB 312204), so the value is a choice, not a fixed answer. The value is in seconds (KB 453048: "the default is 1.5s"). Use the file route above.

Risk: a higher tos maxdist makes the host accept a time source it would otherwise reject, which loosens its protection against a poor source, and loading the file replaces the NTP configuration as in the step above. Back out by loading a file without the tos maxdist line.

VLAN mismatch or IPv6 hostname

For a VLAN mismatch, Broadcom says the fix is on the physical network: tag traffic to the management address with the correct VLAN, then restart the NTP daemon with /etc/init.d/ntpd restart.

Disruptive step: restarting ntpd pauses time synchronisation until the daemon has re-established its sources (about 200 seconds by default, per the iburst article). Back out by running the same restart; there is no state to restore.

For an unreachable IPv6 address: either give the host a routable IPv6 address or configure the server by its IPv4 address with esxcli system ntp set -s <IPv4 address> -e 1.

For an NTPv3 server, Broadcom documents a server x.x.x.x version 3 line in /etc/ntp.conf, but that file cannot be edited from 7.0 Update 3. Broadcom does not show how to combine the two. Ask for an NTPv4 source or raise it with Broadcom support.

Setting the clock by hand

Only as a stopgap. Broadcom documents esxcli system time set with day, month, year, hour, minute and second options and says to enter UTC, because hosts are set to UTC.

Risk: a manual step changes time under running VMs, in the way Broadcom describes as disruptive for time-sensitive applications. There is no undo other than setting it again.

Confirm the fix

  • esxcli system ntp get shows Time Synchronized: true.
  • ntpq -pn shows a * tally against one source and reach reaching 377.
  • vmkernel.log records "system clock synchronized to upstream time servers".
  • Test Services under System, Time Configuration no longer warns.

What to watch afterwards

  • Alert on "system clock apparently no longer synchronized to upstream time servers".
  • Check offset, reach and stratum against the thresholds above.
  • Use the same NTP source on vCenter, ESXi and NSX, as Broadcom recommends. Broadcom's page 312204 also says to configure only one time service (netlogond or ntp) on a host, and, where NTP is needed alongside Active Directory, to point the host's NTP at the AD server or at the same NTP server AD uses.

Risks and limits

  • These commands have not been run or lab-tested. They are taken from Broadcom's knowledge base and ESXCLI reference.
  • Broadcom's pages differ on /etc/ntp.conf. KB 443781 (updated 09-09-2026, later than KB 313808 and KB 313810) edits /etc/ntp.conf with sed and echo, and KB 312204 copies it to /etc/ntp.conf.bak and appends the tos maxdist line to that copy; both then load the result with esxcli system ntp set -f. KB 313808 says "The ESXi configuration files /etc/ntp.conf and /etc/ptp.conf can no longer be edited directly", and KB 313810 says the file "must not be edited manually". All four pages use esxcli system ntp commands (KB 313808 sets servers with -s and -e; KB 313810, KB 443781 and the tos maxdist step of KB 312204 load a file with -f), so the steps above load a file of your own with -f.
  • Broadcom's NTP pages do not describe how a given guest operating system takes time from the host. The Windows guest case is covered in "Clock Drift in VMware-Hosted Windows: Trace the Source".
  • Allowing all addresses in the ntpClient rule is a security trade-off.

Sources