Link to home
Start Free TrialLog in
Avatar of Mr.X
Mr.X

asked on

dc not syncing with ntp server.

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.
Avatar of Kimputer
Kimputer

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"
Have you tried to sync the esxi host with ntp server?
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
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
Avatar of Mr.X

ASKER

Hi,

radhakrishnan - i tried all ur commands. the last command alone did not work. have attached a file, please have a look.User generated image
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
Avatar of Mr.X

ASKER

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.
User generated imageUser generated image
please have a look at attached images
Avatar of Mr.X

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Mr.X
Mr.X

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I did mention GPOs in the link above :)

Glad you are fixed.

Pete
Avatar of Mr.X

ASKER

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. ?
schedule a task (obviously with the command w32tm /resync) with the parameter "When the computer starts"
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
Avatar of Mr.X

ASKER

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
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