在域环境中运行 Hyper-V 的 Windows 客户机上,我注意到 Windows 时间服务出现问题。定期,我在系统日志中收到以下三条消息。
Event Type: Information
Event Source: W32Time
Event Category: None
Event ID: 38
Date: 6/11/2009
Time: 12:26:15 PM
User: N/A
Description:
The time provider NtpClient cannot reach or is currently receiving invalid time data from xxx.xxx.xxx (ntp.d|a.b.x.y:123->a.b.x.z:123).
Event Type: Warning
Event Source: W32Time
Event Category: None
Event ID: 24
Date: 6/11/2009
Time: 12:42:47 PM
User: N/A
Description:
Time Provider NtpClient: No valid response has been received from domain controller xxx.xx.xxxx 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
Date: 6/11/2009
Time: 12:42:47 PM
User: N/A
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.
重新启动 Windows 时间服务后,它会成功与域控制器同步(事件 ID 37),但随后我注意到服务器也进行了另一次同步尝试:
Event Type: Information
Event Source: W32Time
Event Category: None
Event ID: 35
Date: 6/11/2009
Time: 1:04:30 PM
User: N/A
Description:
The time service is now synchronizing the system time with the time source VM IC Time Synchronization Provider.
这样做的最终结果是 W32Time 没有与域控制器正确同步,因为成员服务器默认情况下应该这样做。所有其他服务器和工作站都与域控制器正确同步。
修复方法是在 Hyper-V集成服务中为每个来宾禁用时间同步。然后在来宾上重新启动 Windows 时间服务。然后来宾将与域控制器正确同步。
此过程对虚拟化域控制器至关重要,因为它们为所有客户端提供时间。请记住,具有 PDC 仿真器角色的域控制器应该配置有外部 NTP 时间源(使用w32tm命令行配置)。
此答案中提供了有关为 Windows 时间配置外部 NTP 时间源的信息。