Syncing Time on Server 2012 R2

js0873x
js0873x used Ask the Experts™
on
My server, running Hyper-V (it that matters) is off on its time but about 45 seconds. I decided to try to set the host to get its time from external time servers, and I followed the following under Manually Configure the Windows Time service:

https://support.microsoft.com/en-us/help/816042/how-to-configure-an-authoritative-time-server-in-windows-server

When I did everything there in the registry as recommended I can’t get the Windows time service to start. It’ll remain in starting status after giving me the following error:

Windows could not start the Windows Time service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

I used the following time servers:

0.pool.ntp.org,0x1 1.pool.ntp.org,0x1 2.pool.ntp.org,0x1 3.pool.ntp.org,0x1

Any idea what I might be doing wrong? How do I successfully get the time on my server, and subsequently the guests, to be accurate?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
yo_beeDirector of Information Technology
Commented:
I found this on a site.
https://www.sevenforums.com/general-discussion/2984-w32time-service-not-starting-automatically.html

I am not an expert and I had somewhat similar problem on w32time synchronization with Time Servers and none of the solutions offered on the net seemed to work. By logic I used a combination from different solutions and it worked for me. Try it and see if it works!

At the elevated command prompt (with administrator privileges), type the following command

1. Type "w32tm /debug /disable" and press 'Enter'

2. Type "w32tm /unregister" and press 'Enter' (without using the first command the second did not work!)

you should get the response " W32Time successfully unregistered"

3. Type "w32tm /register" and press 'Enter'

you should get the response "W32Time successfully registered"

4. Type "net start w32time" and press 'Enter'

you should get the response "The windows Time Service is starting. The windows time service was started successfully"

This ensured my Internet Time synchronization started working again. I suppose w32tm and w32time commands are interchangeable from the responses I got.

Author

Commented:
I'm a little skeptical of doing the unregister/register bit. I recall doing that on one of my servers last week, the DC one, which is a guest of this server, and it successfully unregistered but wouldn't register again. I don't recall how I corrected that but it made me suspicious of doing it again. Another other ideas?
Nick JamesonIT Admin

Commented:
You can try to debug w32tm
in cmd:
w32tm /debug /enable /file:C:\windows\temp\w32time.log

try to restart the service and watch the log

By the way: Did you turn off Time Sync in the Integration Services for VM? (that's not the core of your problem, but when you use own NTP this service must be disabled)
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Top Expert 2016

Commented:
Windows Time is not designed to be an exact time.. 45 seconds off is well within the allowable difference. Windows Time is only used for kerberos time stamps which default to within 5 minutes to be determined as synchronous
https://technet.microsoft.com/en-us/library/cc976357.aspx
Abhi PappiTechnical Lead - Network Support

Commented:
If your HYPER-V host is an AD joined member server, it would take the time source as the PDC role holding server. If its a non-AD joined, then you can set it up the time source as an external source or from its local Cmos.

The error :- Windows could not start the Windows Time service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion
.

... is because the w32tm.dll would be unregistered (you may not see the "Windows Time" service on the server, are you?) and you may need to to re-register the time service by running "w32tm /register" command. If that fails, then you can try to re-register the "w32time.dll" (regsvr32 C:\Windows\System32\w32time.dll) and then run "net start w32time".

Once you set the NTP configuration correctly (to pick an external time source as NTP server) on your PDC role holding server, all the domain joined computers would pick the time automatically from the PDC.


If your NTP configuration having any issues- Run the commands to verify (w32tm /query /configuration and w32tm /query /status), please share the output and happy to assist.

Thanks,

Author

Commented:
Here's our setup, right or wrong, and most likely wrong. Our main domain controller is the PDC role holding server, and it's a Hyper-V guest machine. It has time synchronization turned on in the host's Integration Services for that guest, as do all of the other guest servers. What do you think is best at this point?
Technical Lead - Network Support
Commented:
Hi,

You have two options for hyper-v guests - enable time synchronization and sync to the host (which in turn can sync to an ntp server), or have each guest to NTP directly.

I would say the best practice as disabling Time Synchronization on Hyper-V guest machines and set Guest machine PDC is sync with external Time provider, and the others guest machines as well as domain computers are snyc with this PDC...

Refer:- https://social.technet.microsoft.com/Forums/en-US/c41d115a-46fb-435f-8b72-79fcfe25007a/disable-hyper-v-integration-services-for-time-sync-or-disable-vmictimeprovider-on-guest-machines?forum=winserverhyperv

It would help your VMs not to jump time even if the Hyper-v Host machines time got inconsistant.

You should set your domain controller to pick time from an external time source and announce it as your domain's NTP server, so other domain joined machines will pick time from your PDC.


Refer to the Microsoft blog which says the NTP best practice for Hyper-V (https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/11/19/time-synchronization-in-hyper-v/)



To configure your primary domain controller (PDC holder) as the NTP server, follow the steps:-

1) 1. Change the server type to NTP.

Click Start, click Run, type regedit, and then click OK.

Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type

In the pane on the right, right-click Type, and then click Modify. In Edit Value, type NTP in the Value data box, and then click OK.

2)  Set AnnounceFlags to 5.

Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags
  In the pane on the right, right-click AnnounceFlags, and then click Modify. In Edit DWORD Value, type 5 in the Value data box, and then click OK.

3)  Enable NTPServer.

Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
 In the pane on the right, right-click Enabled, and then click Modify .In Edit DWORD Value, type 1 in the Value data box, and then click OK.

4)  Specify the time sources.

Open a command prompt and type the command as below: w32tm /config /manualpeerlist:peers /syncfromflags:manual /reliable:yes /update
peers: time.windows.com or time.nist.gov

 eg: w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update

5)  At the command prompt, type the following command to restart the Windows Time service, and then press Enter:
     
net stop w32time
net start w32time  


6) To verify the configuartion : w32tm /query /configuration and w32tm /query /status

7) Your PDC should be able to communicate with the external time source (here:- time.windows.com) on UPD port 123.

Once you set this, reboot the client PCs\member servers and check if it has taken your PDC as the NTP server.

Thanks,
PberSolutions Architect

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Abhi Pappi (https:#a42402420)
-- yo_bee (https:#a42398551)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial