How to configure an authoritative time server in a virtualized environment.

Since we started implementing Microsoft’s virtualization platform Hyper-V, we have been having changing success in solving the problem of time skew on these systems.

We started with Microsoft’s official support article on configuring the time server in Windows Servers (http://support.microsoft.com/kb/816042), but this article didn’t address the specifics of a virtualized environment.

The latest iteration on this attempt is a batch file that we run on the primary domain controller (in our case usually a virtulized SBS).
reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0 /f

reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v SpecialInterval /t reg_dword /d 1 /f

reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v SpecialPollInterval /t reg_dword /d 60 /f

reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v AnnounceFlags /t reg_dword /d 10 /f
w32tm /config /syncfromflags:manual “/manualpeerlist:ie.pool.ntp.org,0x1” /reliable:yes

w32tm /config /update

net stop w32time && net start w32time

w32tm /resync /force

w32tm /query /source

Just copy the text, create a new batch file and paste the text in. You might want to update the NTP time pool address according to your location. Finally, run the batch file as administrator. After a while, the time on the server should get corrected.