server time wrong after hyper v install

Server 2008R2, after we installed the hyperv role, the server clock could not keep the correct time.

Server has been running fine with the correct time for 4+ years. Installed hyperv 2 weeks ago and the clock has been wrong ever since.

Server is  the only DC and was set for NTP sync with, and a few other sources. Seems like everything was fine until we installed hyoperv.

We did all the usual, resync this, change source that, unregister w32tm, all no joy. The only thing that works is to set the server to sync from the cmos battery. This keeps the clock to within 2 minutes, but that isnt really synced.

The real question is why whatever clock the server uses to keep time (it isnt the cmos clock) will not keep time correctly.

Open to suggestions.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cliff GaliherCommented:
Installing Hyper-V with other roles (including ADDS) has adverse effects because of how Hyper-V wants so manage resources. It is basically universally accepted that Hyper-V should always be the only role running on bare metal, and even other applications should be lightweight, such as backup or management agents.
kassant7Author Commented:
I agree, but we couldn't do that in this case.

The server is already running and the client didnt want to make too many changes. They needed to run some old program that only worked on XP as a VM.
Cliff GaliherCommented:
Then time will skew. Hyper-v is six years old and I has always been this way. If there were a solution, it'd be documented by now. Short of faster hardware to minimize the impact, or running a third-party NTP client that refreshes more often (which is inefficient on the network) little can be done.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

JAN PAKULAICT Infranstructure ManagerCommented:
1 so the time is off on the host?
2 is it the same case for Vms (if you have any)?
3can you run that from cmd as admin

w32tm /query /source

and post it back here

4 also

sfc /scannow
kassant7Author Commented:
Time is off on the host.

The time on the VM is fine. It is not a domain member and the hyperv time sync off.

Currently the source is cmos when we run w32tm /query /source When it was set to NTP the time gets off by more than 3 hours per day.

SFC found no issues when we ran it at the beginning of this episode, 3 days ago.
JAN PAKULAICT Infranstructure ManagerCommented:
can you create ntp server on your server?

Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry entry:

In the right pane, right-click AnnounceFlags, and then click Modify.
In the Edit DWORD Value dialog box, under Value data, type 5, and then click OK.
Enable NTPServer.
Locate and then click the following registry subkey:

In the right pane, right-click Enabled, and then click Modify.
In the Edit DWORD Value dialog box, type 1 under Value data, and then click OK.
Exit Registry Editor.
At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:
net stop w32time && net start w32time

Make sure W32Time is set to Automatic startup mode.
Make sure UDP 123 is allowed through your firewall.
Use  InternetTime program to help you debug connectivity to your SNTP/NTP server. (download from website below)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kassant7Author Commented:
I took those steps already.  I will try it again if you desire.

I will paste the entire reg entry we import to reset the time server when it messes up. I have to find it and export to txt.
kassant7Author Commented:
Sorry for the delay. This is what we use for PDC's now;

Windows Registry Editor Version 5.00

"ObjectName"="NT AUTHORITY\\LocalService"












If we set the server back to NTP sync, the time drifts by more than 10 minutes an hour. So any fixes we try have to be undone by unregistered and re-registering the w32tm service.

The server is currently using the cmos clock.
JAN PAKULAICT Infranstructure ManagerCommented:
Please try this command:

w32tm /config /,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time

or alternately use that:
kassant7Author Commented:
I installed the NTP program. That takes over for w32time, /query /source no longer works.

It is up and running, the average offset is 90K so we'll see if the program does what it says and step the time incrementally until it is in sync to within 30ms.
kassant7Author Commented:
After 2 days of running the program on the affected server, things did not improve. The offset on the 4 chosen servers is from 9615 to 40092. This is after the reach has gotten to 377 with a poll of 64.

None of the servers have the + sign indicating they are suitable for sync.

I dont think it is working. It is supposed to slowly adjust the clock to be in sync by taking many smaller steps rather than big changes.

I guess whatever is wrong on the server is also affecting this program. Which may mean the issue isnt the windows time service, but something else.
kassant7Author Commented:
The server is now doing "ok". We have it set to sync from the local clock and NTP once a day.

It is not accurate down to the ms, but it is <2 min off.

I think it must be an issue with HYper v like stated here.
kassant7Author Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.