**** My NTP cleanup/fix on vSphere 7.0 Update 3(g) ****
VMware vSphere update: 7.0u3 (aka 7.0.3)
Patched ESXi version: 7.0u3g.
Patched vCenter version: 7.0u3g.
FIRST: Verify Time Zone are same on ESXi and vCenter.. I only point this out because you can now finally change Zone on VCSA admin port 5480..
===============
**NTP KB ARTICLE; NOTE! ONLY FOR 7.0-U3+**
https://kb.vmware.com/s/article/87488
[root@localhost:~] vi /scratch/ntpconfig.txt
[root@localhost:~] cat /scratch/ntpconfig.txt
server time.nist.gov
server pool.ntp.org
tos maxdist 30
[root@localhost:~] esxcli system ntp set -f /scratch/ntpconfig.txt
[root@localhost:~] esxcli system ntp set -e 1
===============
**NTP KB ARTICLE; NOTE! ONLY FOR 7.0-U3+**
https://kb.vmware.com/s/article/87176
To display current configuration:
# esxcli system ntp get
# esxcli system ptp get
To change configuration:
# esxcli system ntp set
# esxcli system ptp set
To get a list of ALL new 7.0 Update-3 commands, use help:
# esxcli system ntp --help
===============
**HELPFUL OLD NTP KB ARTICLE, FOR SYNTAX COMMANDS ONLY**
((This KB specifically states issues after u3 upgrade))
https://kb.vmware.com/s/article/86255
**WARNING!! "RESOLUTION" at end of article does not do what you think it does at first glance, did not work for me, and in general editing any "conf" file with plain-text in 7.0.3 can be dangerous because if its encrypted it will become corrupted, so.... be sure to check if the "conf" file is still plain-text (safe to edit) or if it's now encrypted (dont edit will corrupt), as VMware transitions towards the configurations being encrypted over time with future updates... I expand on this in a post further down.
===============
===============
After KP Articles, vCenter was showing as broken (red alerts).
To get vCenter to re-sync NTP based on Host, this worked for me:
**Reset NTP settings on ESXi host, back to NTP defaults:**
[root@localhost:~] esxcli system ntp set -r
**Reload NTP service on ESXi host:**
[root@localhost:~] /etc/init.d/ntpd restart
**Use vCenter GUI to input NTP addresses into ESXi host again**
((I'm using GUI because I want to see it work as designed...)
**Reload NTP on ESXi host again**
[root@localhost:~] /etc/init.d/ntpd restart
**Poll the NTP server on ESXi host a few times, give it a minute:**
[root@localhost:~] ntpq -p
**Wait until NTP server on ESXi host shows Time Sync = True:**
[root@localhost:~] esxcli system ntp test
((Diags output omitted..)
Service analysis completed.
Timeinsync: true
[root@localhost:~] esxcli system ntp get
Enabled: true
Loglevel: warning
PID: 2126728
Runtime Seconds: 260
Servers: time.nist.gov, pool.ntp.org
Service Providing Kernel Time: Network Time Protocol
Time Service Enabled: true
Time Synchronized: true
**Check ESXi host and vCenter GUI's**
((In vCenter > Host > Configure > Time Config > Test Service))
**Finally, for 1st time since 7.0u2, this test passed for me!**
Note-1:
This final NTP bug is annoying but not a deal-breaker:
In ESXi host NTP config GUI (not vCenter) version 7.0u3g:
ESXi GUI: Clicking "Actions" is still broken (it does nothing).
ESXi GUI: Clicking "Refresh" finally works again as expected.
Note-2:
After all this cleanup work and fiddling with ESXi and vCenter (both version 7.0.3g), finally now, NTP tests pass in both ESXi and vCenter when vCenter is set to ESXI Host for time sync.
I did not try all this with ESXi version 7.0.3f. but if you read 7.0.3f release notes, you'll want to upgrade to patch 7.0.3g immediately...
EDIT: Oct 2, 2022, to remove being overly harsh with use of "destroy" (elaborated below). And, fix typo to clarify **Reset NTP on ESXi host again** should instead read **Reload NTP on ESXi host again**"