w32time 无法正确同步

w32time 无法正确同步

我遇到了一个问题,即我们的网络中主 DC PDC 模拟器无法获得正确的时间。它几乎一直处于 80 秒左右的关闭状态,我不知道如何修复它。

该机器现在是虚拟的(尽管我可以把它变成一个小的物理盒子)。w32 时间配置是:

PS c:\> w32tm /query /configuration
[Configuration]

EventLogFlags: 2 (Policy)
AnnounceFlags: 10 (Policy)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Policy)
MaxPollInterval: 10 (Policy)
MaxNegPhaseCorrection: 172800 (Policy)
MaxPosPhaseCorrection: 172800 (Policy)
MaxAllowedPhaseOffset: 300 (Policy)

FrequencyCorrectRate: 4 (Policy)
PollAdjustFactor: 5 (Policy)
LargePhaseOffset: 50000000 (Policy)
SpikeWatchPeriod: 900 (Policy)
LocalClockDispersion: 10 (Policy)
HoldPeriod: 5 (Policy)
PhaseCorrectRate: 1 (Policy)
UpdateInterval: 100 (Policy)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Policy)
ResolvePeerBackoffMaxTimes: 7 (Policy)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 0 (Policy)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 3600 (Policy)
Type: NTP (Policy)
NtpServer: 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org (Policy)

NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)

状态正常:

PS C:\> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0324097s
Root Dispersion: 7.8030176s
ReferenceId: 0xD5C7E11E (source IP:  213.199.225.30)
Last Successful Sync Time: 2/18/2016 3:35:04 PM
Source: 3.pool.ntp.org
Poll Interval: 6 (64s)

问题是 - 它从来都不同步:

PS C:\> w32tm /stripchart /computer:0.pool.ntp.org
Tracking 0.pool.ntp.org [213.199.225.30:123].
The current time is 2/18/2016 3:35:47 PM.
15:35:47 d:+00.0311088s o:-82.0529984s  [@                          |                           ]
15:35:49 d:+00.0154871s o:-82.0677911s  [@                          |                           ]
15:35:51 d:+00.0623276s o:-82.0255517s  [@                          |                           ]
15:35:53 d:+00.0622825s o:-82.0269740s  [@                          |                           ]
15:35:56 d:+00.0157822s o:-82.0521575s  [@                          |                           ]
15:35:58 d:+00.0934684s o:-82.0032442s  [@                          |                           ]
15:36:00 d:+00.0155794s o:-82.0391704s  [@                          |                           ]
15:36:02 d:+00.0623131s o:-82.0049890s  [@                          |                           ]
15:36:04 d:+00.0417698s o:-82.0176236s  [@                          |                           ]
15:36:06 d:+00.0328697s o:-82.0160905s  [@                          |                           ]
15:36:08 d:+00.0623356s o:-82.0340346s  [@                          |                           ]
15:36:10 d:+00.0467246s o:-82.0011794s  [@                          |                           ]
15:36:12 d:+00.0210196s o:-81.9949078s  [@                          |                           ]
15:36:14 d:+00.0311386s o:-82.0052247s  [@                          |                           ]
15:36:16 d:+00.0336086s o:-81.9847832s  [@                          |                           ]
15:36:18 d:+00.0466688s o:-81.9732556s  [@                          |                           ]
15:36:20 d:+00.0522205s o:-81.9706647s  [@                          |                           ]
15:36:22 d:+00.0623951s o:-81.9470197s  [@                          |                           ]
15:36:25 d:+00.0311279s o:-81.9684429s  [@                          |                           ]
15:36:27 d:+00.0522267s o:-81.9522678s  [@                          |                           ]
15:36:29 d:+00.0155412s o:-81.9621962s  [@                          |                           ]
15:36:31 d:+00.0522921s o:-81.9384797s  [@                          |                           ]
15:36:33 d:+00.0559207s o:-81.9362417s  [@                          |                           ]
15:36:35 d:+00.0311349s o:-81.9470118s  [@                          |                           ]
15:36:37 d:+00.0155557s o:-81.9451556s  [@                          |                           ]

这表明延迟始终为 81-82 秒。同步不会改变这一点。

有人知道这是为什么吗?

根据要求,这里有更详细的状态:

PS C:\> w32tm /query /status /verbose
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0381470s
Root Dispersion: 7.7932527s
ReferenceId: 0x2EFAAC02 (source IP:  46.250.172.2)
Last Successful Sync Time: 2/18/2016 4:33:39 PM
Source: 0.pool.ntp.org
Poll Interval: 6 (64s)

Phase Offset: 0.0000050s
ClockRate: 0.0155860s
State Machine: 1 (Hold)
Time Source Flags: 0 (None)
Server Role: 64 (Time Service)
Last Sync Error: 0 (The command completed successfully.)
Time since Last Good Sync Time: 29.5655870s

还有一些人要求的输出:

PS C:\> w32tm /monitor
dc-o-2 [[fe80::480c:c93e:660a:429f%12]:123]:
    ICMP: 0ms delay
    NTP: -82.7908243s offset from dc-o-1.operations.local
        RefID: ntp.wide-net.pl [195.46.37.22]
        Stratum: 3
dc-o-ckg-1 [172.26.0.1:123]:
    ICMP: 174ms delay
    NTP: -82.7945201s offset from dc-o-1.operations.local
        RefID: sunsite.icm.edu.pl [193.219.28.2]
        Stratum: 3
dc-o-1  *** PDC ***[10.42.0.1:123]:
    ICMP: 0ms delay
    NTP: +0.0000000s offset from dc-o-1.operations.local
        RefID: news-archive.icm.edu.pl [193.219.28.147]
        Stratum: 3

这些是当前网络中的 3 台机器。请注意,名称中带有 ckg 的机器通过 VPN 距离约 170ms - 这是从中欧到芝加哥的时差。

答案1

完全禁用时间同步集成服务,我的意思是取消选中该框,这样它就不会提供给 Hyper-V 客户端。我知道这是很多人争论的焦点,甚至微软似乎也没有就此达成共识,但几年前我曾就此问题与微软有过支持案例,这就是他们建议的,从那以后我就再也没有遇到过问题。

启动时,您的虚拟机会从虚拟机管理程序获取时间(因为虚拟机没有实时时钟),此后它们应该只与域层次结构同步。对于 PDCe,它应该只与其配置的外部时间源同步。

在此处输入图片描述

相关内容