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.
VirtualizationWindows Server 2012Windows Server 2008Windows Server 2003VMware

Avatar of undefined
Last Comment
ANWSOL

8/22/2022 - Mon
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"
Jackie Man

Have you tried to sync the esxi host with ntp server?
Radhakrishnan

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
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Pete Long

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
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.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
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.
ntp toolresync
please have a look at attached images
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
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
Mr.X

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Pete Long

I did mention GPOs in the link above :)

Glad you are fixed.

Pete
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. ?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Kimputer

schedule a task (obviously with the command w32tm /resync) with the parameter "When the computer starts"
Pete Long

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
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
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ANWSOL

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