First, make sure time sync to the host machine is turned on in the Integration Services.
Next, on your Domain Controller add the following registry key:
reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0This ensures that the domain controller only syncs its time from the host OS when being restored from a saved state.
Next, inside the guest, run the following commands from an Elevated command prompt:
1.net stop w32time2.w32tm /unregister3.w32tm /register4.Net start w32time5.w32tm /config /update
/manualpeerlist:"0.pool.ntp.org,0x8 1.pool.ntp.org,0x8 2.pool.ntp.org,0x8 3.pool.ntp.org,0x8" /syncfromflags:MANUAL6.w32tm /config /update7.net stop w32time &&
net start w32time8.w32tm /resync /rediscoverLine 1 stops the time service
Line 2 Completely removes all time settings from the registry - you may have to run this twice, or you may get an access denied. If you get an access denied, just run it again.
Line 3 Re-creates the Registry Settings
Line 4 Starts the service
Line 5 Sets the server to sync with the NTP servers pool.ntp.org
Line 6 Updates the configuration
Line 7 Restarts the service so the new settings take effect.
Line 8 Syncs the clock to your new NTP servers. - This needs to return "The command completed successfully." If it does not, something went wrong with one of the steps above.