Last weekend we had encountered a big problem with ESXi host time settings after upgrading one of the test servers to version 6.7 (and also last build 8941472, but I'm not really sure about that it's the cause of the problem). After server starting up, NTP service stop working correctly and sadly there is no way to change it (manually or automatic by any NTP servers) and any changes will fail back to defaults.
So after trying the GUI method, we edited /etc/ntpd.conf file and unfortunately nothing happened. As the last way of NTP troubleshooting, useful ESXCLI commands help us to fix it by setting these below command:
So after trying the GUI method, we edited /etc/ntpd.conf file and unfortunately nothing happened. As the last way of NTP troubleshooting, useful ESXCLI commands help us to fix it by setting these below command:
# esxcli system time set -d 11 -H 01 -m 55 -M 05 -y 2018
To prevent possible host revert to old-time setting, you must ensure that the hardware clock is the same as the system time:
# esxcli hardware clock set -d 11 -H 01 -m 55 -M 05 -y 2018
There are some commands by shell our SSH access for ESXi NTP settings that's useful to know:
Enable NTP service:
# chkconfig ntpd on
# chkconfig --list | grep ntpd
Restart NTP service:
# /etc/init.d/ntpd restart
Display NTP peers:
# ntpq -p
Check ESXi time:
# esxcli hardware clock get
# esxcli system time get
Monitor NTP transmits between host (as NTP client) and NTP Server:
# watch ntpq -p Host / NTP server
# tcpdump-uw -c 5 -n -i vmk0 host NTP_server and port 123
I hope this is gonna be useful for you ;) ... and never lose your host's time as I do :D
Thank god!! God bless you! You save my life. Have been deploying Nutanix cluster for my customer with vSphere 6.7 U3 Nutanix is very sentive to time, I can not get the time on ESXi right always revert back. Thanks!!!!!
ReplyDeleteplease remove the yellow highlighting text on a black background with white writing..its unreadable unless I highlight the entire page
ReplyDelete