WIndows 2016: How to force time sync after reverting to a snapshot

ntpvmware-vspherewindows-server-2016

Using vmware vsphere server 6.0.0 with a VM running Windows 2016. I have Windows set up to sync time with time.nist.gov. The machine is using UTC time zone. After restoring to a snapshot the time does not update for a while (if ever?). I've tried various w32tm.exe commands to try to force resync but it says that the time difference is too large (it's usually off by days or weeks).

The only way I've been able to get it to update immediately is to go into this dialog and change the time server then click update now. Then change it back:

enter image description here

This didn't happen with Windows 2012 in the same setup. I expect that after restoring a snapshot the time will sync immediately. Perhaps something changed in Windows 2016 and I need to do something differently before taking the snapshot or after restoring it? Or maybe something needs to be configured differently in vsphere?

Best Answer

As per VMware KB 1189, Vmware tools will usually sync time from the host when you take or restore a snapshot. So if you ensure that your host's time is reasonable then you shouldn't encounter excessive time difference and can use w32tm /resync to resync NTP. I would configure NTP on the hosts in Host > Configuration > Time Configuration > Properties and see if this helps.

EDIT: Also, according to MS KB 884776 you can configure registry entries that will allow the W32Time service to sync regardless of the size of the time difference. Set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\MaxPosPhaseCorrection and MaxNegPhaseCorrection to 0xFFFFFFF

This value enables the computer to receive the time that is contained in any time sample, regardless of inaccuracy.