W32Time Errors in a Hyper-V Virtual Environment

I am running Small Business Server 2008 SP2 under Hyper-V. On a Server 2003 member server, also running under Hyper-V, I was getting frequent W32Time warnings errors in the System event log (Event IDs 38, 24, and 29 in that order).

Here are the event details. Note that the first one is recorded as an Information event but actually indicates an issue.

Event Type:    Information
Event Source:    W32Time
Event Category:    None
Event ID:    38
Description:
The time provider NtpClient cannot reach or is currently receiving invalid time data from SBS2008Server.mydomain.local (ntp.d|192.168.1.25:123->192.168.1.2:123).

Event Type:    Warning
Event Source:    W32Time
Event Category:    None
Event ID:    24
Description:
Time Provider NtpClient: No valid response has been received from domain controller SBS2008Server.mydomain.local after 8 attempts to contact it. This domain controller will be discarded as a time source and NtpClient will attempt to discover a  new domain controller from which to synchronize.

Event Type:    Error
Event Source:    W32Time
Event Category:    None
Event ID:    29
Description:
The time provider NtpClient is configured to acquire time from one or more time sources, however none of the sources are currently accessible.  No attempt to contact a source will be made for 15 minutes. NtpClient has no source of accurate time.

Analysis

The SBS machine is the domain controller, so it’s also the default NTP server.

I had already followed Hyper-V best practices for domain controllers by disabling Time Synchronization and setting the SBS machine to sync with an external source. That’s working fine.

Client computers in the domain, both physical and virtual, were not reporting time sync errors even though they also get time from SBS (Type is NT5DS; see how to check this). So why can’t Server 2003 sync time as well?

Microsoft KB 875424, “Time synchronization may not succeed when you try to synchronize with a non-Windows NTP server in Windows Server 2003,” describes the symptoms pretty well except for the “non-Windows” part. But even after putting the Server 2003 machine into “client mode” (/syncfromflags:MANUAL) pointed directly at the domain controller, the time sync errors continued. So I set it back to domain mode (/syncfromflags:DOMHIER).

I turned on time service logging as described in Microsoft KB 816043. Didn’t learn much here except that SBS is returning time packets with Precision: –6, so the issue I had a few years ago with very high precision servers is not the problem here.

Solution

Eventually I noticed that when starting the Windows Time Service, I would get an event indicating that time was being synchronized with the Hyper-V integration services provider:

Event Type:    Information
Event Source:    W32Time
Event Category:    None
Event ID:    35
Description:
The time service is now synchronizing the system time with the time source VM IC Time Synchronization Provider.

A little more Googling and I found this article suggesting that the solution is to disable Time Synchronization on all Hyper-V guests, not just on domain controllers. Once I disabled the Time Synchronization integration service on the Server 2003 machine and rebooted, the errors stopped.

I still don’t know why Hyper-V Time Synchronization integration service causes the standard domain-based time synchronization to fail (why not play nicely together?), but disabling Hyper-V Time Synchronization on all virtual machines seems to solve the problem.

Bonus Tip:  Time Sync on the Hyper-V Server

All the machines above are running on Windows Server 2008 R2 as the Hyper-V host. Follow Microsoft’s recommendation, the host is not joined to the domain since the domain controller is running as a guest. To keep the host’s time in sync, I set it to client mode and pointed it at the SBS domain controller. This command sequence does the trick:

sc triggerinfo w32time start/networkon stop/networkoff
w32tm /config /manualpeerlist:SBS_server_IP_Address,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync

Note:  If you get a message that the Windows Time service is not running, from services.msc, set it to Automatic and start it. For more details, see this later blog post.

1 thought on “W32Time Errors in a Hyper-V Virtual Environment

  1. Mario

    To configure the automatic start of the Windows Time service you can use the commandline:
    sc config w32time start= auto

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.