Hyper-V Standalone: Configure the Host as Authoritative Time Server and Guests to Use It


Post to Twitter Post to Facebook Post to StumbleUpon

Original Post Here: MPECS Inc. Blog: Hyper-V Standalone: Configure the Host as Authoritative Time Server and Guests to Use It

We have a number of single server virtualization solutions where the VMs are running at quite a high load point.

This tends to create timing issues with the VMs not being able to keep up with keeping time. In some cases we have SQL VMs that can skew time visibly.

So, we need a reliable time source. We are not able to set pool.ntp.org as the time source for the primary DC in this situation as it would not be keeping time very well either thus requiring a more frequent polling interval. Do that with ntp.org and the server will receive a Kiss-of-Death packet in short order.

So, we configure our Hyper-V host to be an authoritative time server polling ntp.org’s servers every 30 minutes.

To do so we need to set things up on the host.

  1. Allow UDP Port 123 Inbound on the firewall
  2. Configure the host as a time server: KB816042 How to configure an authoritative time server in Windows Server
  3. We run the Fix It Myself steps
  4. Verify Type is set to NTP
    • image
  5. We specify the regional pool.ntp.org servers
  6. Set AnnounceFlags to 5 in
    • HKLMSYSTEMCurrentControlSetServicesW32TimeConfigAnnounceFlags
  7. Enable the NTPServer service by setting Enabled to 1
    • image
  8. Default Poll Interval
    • image
  9. Set the SpecialPollInterval to 15 minutes
    • image
  10. Set the phase correction settings to 30 minutes
    • image
  11. net stop w32time && net start w32time

We use this free tool to test our setup from a client system:

Drop in the Hyper-V host’s name and we should see the following:

image

Once we have a successful time poll we run the following command set on the PDCe VM as per our previous blog post on time skew:

  1. w32tm /config /syncfromflags:manual “/manualpeerlist:Hyper-V.DOMAIN.LOCAL,0x1” /reliable:yes
  2. w32tm /config /update
  3. net stop w32time && net start w32time
  4. w32tm /resync /force
  5. w32tm /query /source

The final result should be the Hyper-V server as source time.

We then create a batch file with the step 4 command in it and schedule that batch file to run as frequently as every minute on the most demanding VMs.

Philip Elder
Microsoft Cluster MVP
MPECS Inc.
Co-Author: SBS 2008 Blueprint Book

Chef de partie in the SMBKitchen ASP Project
Find out more at
Third Tier: Enterprise Solutions for Small Business

Leave a comment

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

This blog is kept spam free by WP-SpamFree.