dc not syncing with ntp server.

Mr.X
Mr.X used Ask the Experts™
on
hi guys,
Got a esxi 6.7 server
got virtual machine which is dc -server 2016std

time always runs 5 mins slow.
i checked the w32tm /query /status - it was synching from local cmos battery

i tried changing it to external ntp time sources, but still dc takes time from local cmos battery.  it never changed to external ntp server.
in esx server, under virtual machine - synchronise guest time with host is not enabled too.

used these commands:
w32tm /config /manualpeerlist:"0.aus.pool.ntp.org,0x1 1.aus.pool.ntp.org,0x1 2.aus.pool.ntp.org,0x1 3.aus.pool.ntp.org,0x1"   - to set ntp server


used this to reset time service to defualt :
net stop w32
w32tm /unregister
w32tm /register
net start w32time

tried restarting time server - net stop w32time && net start w32time

the client machines take time from DC .. but dc not taking time from external ntp.
what else could be the problem. how do i make it to take time from external source ? ? any help would be great.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
This is the correct command:
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
Jackie Man IT Manager
Top Expert 2010

Commented:
Have you tried to sync the esxi host with ntp server?
systechSenior Technical Lead

Commented:
Hi,

Also, try this

w32tm /config /manualpeerlist:"time.windows.com,0x1" /syncfromflags:manual /reliable:yes /update

w32tm /config /update
net stop w32time
net start w32time
w32tm /resync /nowait
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
w32tm /resync /rediscover
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Pete LongTechnical Consultant

Commented:
I had this a couple of weeks ago in vSphere 6.7 with one 2016 DC :)

Firstly make sure its setup correctly

Windows – Setting Domain Time

One was stubbornly set to CMOS Clock!

That DC was taking time from its CMOS clock (that’s not good!) that’s now been fixed (see the bottom output to confirm)
 
Net time /DOMAIN:{domain-name}

fixed it

The check from another machine with

w32tm /monitor

Then sit back, light your pipe, and admire you handiwork!

P

Author

Commented:
Hi,

radhakrishnan - i tried all ur commands. the last command alone did not work. have attached a file, please have a look.cmos.JPG
kimputer - tried your command, was successful but no change, still it syncs to local time. and i added au infront of ntp servers ,to make it pick australian time. 0.au.pool.ntp.org - but stil no luck

Author

Commented:
Hi pete long,

i used the ntp tool in server and it works. it shows the right time.
but when i do w32tm /resync.  this command not working.
ntp toolresync
please have a look at attached images

Author

Commented:
hi all,
thanks for all the sugggestions.

at last found what was the problem. there was a gpo enabled- configure windows ntp settings .
after changing it to not configure.  w32time resync worked and time started running correctly.
Commented:
hi all,
thanks for all the sugggestions.

at last found what was the problem. there was a gpo enabled- configure windows ntp settings .
after changing it to not configure.  w32time resync worked and time started running correctly.
Pete LongTechnical Consultant

Commented:
I did mention GPOs in the link above :)

Glad you are fixed.

Pete

Author

Commented:
Hi Pete,
I got one more question. It's working now
But if I restart server or restart w32tm service, server details to local cmos battery.
I need to run w32tm /resync to make it work again.
It works good until I restart.
Anyway to make it work even after restarting. ?

Commented:
schedule a task (obviously with the command w32tm /resync) with the parameter "When the computer starts"
Pete LongTechnical Consultant

Commented:
If it's the PDC emulator its registry keys should be set to get external time, if its not it should get time from the PDC?
If it keeps reverting to CMOS them annually set tit to the domain and make sure VMware tools isn't messing with the time sync.

P

Author

Commented:
Yes it is pdc emulator
I checked registry - ntp server is ntp and shows peers in time server registry
And I verified it's not synching with wax host. It's un ticked

Probably will try task scheduler and Wil let you know

Commented:
HI guys, we push this batch file across networks US and canada via our rmm software

Hope it helps

@echo off
w32tm /query /peers
sc config w32time start= auto
w32tm /config /syncfromflags:manual /manualpeerlist:"0.us.pool.ntp.org,1.us.pool.ntp.org,2.us.pool.ntp.org,3.us.pool.ntp.org"
w32tm /config /reliable:yes
net stop w32time
net start w32time
w32tm /resync /nowait

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