Windows 2012R2 Hyper-V configuring NTP

As good practice you might want to configure NTP on you Windows 2012R2 Hyper-V host to ensure that all Virtual Machines on that host will have the correct time as they will sync against the Hyper-V host by default. This can be configured by a per VM basis via disable time sync. Open VM settings -> Management -> Integration Services and uncheck Time Synchronization.

NOTE: If you have Domain Controllers visualised you might end up with a chicken and egg situation whereby the the Hyper-V host will get the time from the visualised DC running on it and in turn, if the Time Synchronization for the DC’s isn’t disabled, they will get the time of the Hyper-V host. To get around it run the procedure below on the Hyper-V host and DC and then disable the Time Synchronization integration service.

To configure NTP on the Hyper-V host open up a PowerShell as Administrator and run the following commands.

w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org" /syncfromflags:MANUAL
Stop-Service w32time
Start-Service w32time
w32tm /resync

To verify the new settings run w32tm /query /status.

PS C:\w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0780928s
Root Dispersion: 0.0274164s
ReferenceId: 0xC1011F42 (source IP:  193.1.31.66)
Last Successful Sync Time: 10/22/2015 11:49:05 AM
Source: 0.pool.ntp.org
Poll Interval: 7 (128s)

Firewall considerations

Typically you would be sitting behind a corporate firewall. For NTP sync to work port udp/123, which is the NTP protocol has to allowed. For a Cisco ASA FW it looks like this.

ntp123

  • Share:

Leave a Comment

Send a Message