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 us.pool.ntp.org, 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.
kassant7Asked:
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.
0
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.
0
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.
0
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
0
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.
0
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:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\

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:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
                                                Services\W32Time\TimeProviders\NtpServer\

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)

from

http://bchavez.bitarmory.com/archive/2009/12/21/how-to-setup-a-windows-2008-r2-sntp-ntp-server.aspx
0

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.
0
kassant7Author Commented:
Sorry for the delay. This is what we use for PDC's now;

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time]
"DisplayName"="@%SystemRoot%\\system32\\w32time.dll,-200"
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
  6b,00,20,00,4c,00,6f,00,63,00,61,00,6c,00,53,00,65,00,72,00,76,00,69,00,63,\
  00,65,00,00,00
"Start"=dword:00000003
"Type"=dword:00000020
"Description"="@%SystemRoot%\\system32\\w32time.dll,-201"
"ObjectName"="NT AUTHORITY\\LocalService"
"ServiceSidType"=dword:00000001
"RequiredPrivileges"=hex(7):53,00,65,00,41,00,75,00,64,00,69,00,74,00,50,00,72,\
  00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,68,00,\
  61,00,6e,00,67,00,65,00,4e,00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,\
  00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,72,00,65,00,\
  61,00,74,00,65,00,47,00,6c,00,6f,00,62,00,61,00,6c,00,50,00,72,00,69,00,76,\
  00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,53,00,79,00,73,00,74,00,\
  65,00,6d,00,54,00,69,00,6d,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,\
  00,67,00,65,00,00,00,00,00
"FailureActions"=hex:80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
  00,01,00,00,00,60,ea,00,00,01,00,00,00,c0,d4,01,00,00,00,00,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]
"MaxAllowedPhaseOffset"=dword:0000012c
"FrequencyCorrectRate"=dword:00000004
"SpikeWatchPeriod"=dword:00000384
"LocalClockDispersion"=dword:0000000a
"HoldPeriod"=dword:00000005
"PhaseCorrectRate"=dword:00000007
"MaxPollInterval"=dword:0000000f
"MaxPosPhaseCorrection"=dword:0002a300
"PollAdjustFactor"=dword:00000005
"AnnounceFlags"=dword:00000005
"TimeJumpAuditOffset"=dword:00007080
"MinPollInterval"=dword:00000006
"EventLogFlags"=dword:00000002
"MaxNegPhaseCorrection"=dword:0002a300
"LargePhaseOffset"=dword:02faf080
"UpdateInterval"=dword:00000064
"LastClockRate"=dword:0002625a

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"ServiceDllUnloadOnStop"=dword:00000001
"ServiceMain"="SvchostEntry_W32Time"
"NtpServer"="3.us.pool.ntp.org,0x1 2.us.pool.ntp.org,0x1"
"Type"="NTP"
"ServiceDll"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,\
  00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
  77,00,33,00,32,00,74,00,69,00,6d,00,65,00,2e,00,64,00,6c,00,6c,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Security]
"Security"=hex:01,00,04,80,98,00,00,00,a4,00,00,00,00,00,00,00,14,00,00,00,02,\
  00,84,00,06,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,05,12,00,\
  00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,\
  00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,00,14,00,\
  8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,14,00,9d,01,02,00,01,\
  01,00,00,00,00,00,05,13,00,00,00,00,00,14,00,a9,00,02,00,01,01,00,00,00,00,\
  00,05,13,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,\
  05,12,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient]
"RunOnVirtualOnly"=dword:00000000
"DllName"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,33,00,32,00,74,00,69,00,6d,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
"Enabled"=dword:00000001
"CrossSiteSyncFlags"=dword:00000002
"InputProvider"=dword:00000001
"EventLogFlags"=dword:00000001
"SpecialPollTimeRemaining"=hex(7):32,00,2e,00,75,00,73,00,2e,00,70,00,6f,00,6f,\
  00,6c,00,2e,00,6e,00,74,00,70,00,2e,00,6f,00,72,00,67,00,2c,00,37,00,63,00,\
  37,00,37,00,32,00,65,00,36,00,00,00,33,00,2e,00,75,00,73,00,2e,00,70,00,6f,\
  00,6f,00,6c,00,2e,00,6e,00,74,00,70,00,2e,00,6f,00,72,00,67,00,2c,00,37,00,\
  63,00,37,00,37,00,32,00,65,00,36,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00
"SignatureAuthAllowed"=dword:00000001
"CompatibilityFlags"=dword:80000000
"ResolvePeerBackoffMinutes"=dword:0000000f
"ResolvePeerBackoffMaxTimes"=dword:00000007
"AllowNonstandardModeCombinations"=dword:00000001
"LargeSampleSkew"=dword:00000003
"SpecialPollInterval"=dword:00000384

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer]
"ChainEntryTimeout"=dword:00000010
"RunOnVirtualOnly"=dword:00000000
"DllName"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,33,00,32,00,74,00,69,00,6d,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
"Enabled"=dword:00000001
"InputProvider"=dword:00000000
"ChainMaxEntries"=dword:00000080
"ChainMaxHostEntries"=dword:00000004
"EventLogFlags"=dword:00000000
"ChainDisable"=dword:00000000
"RequireSecureTimeSyncRequests"=dword:00000000
"ChainLoggingRate"=dword:0000001e
"AllowNonstandardModeCombinations"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider]
"RunOnVirtualOnly"=dword:00000001
"DllName"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,76,\
  00,6d,00,69,00,63,00,74,00,69,00,6d,00,65,00,70,00,72,00,6f,00,76,00,69,00,\
  64,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,00,00
"Enabled"=dword:00000001
"InputProvider"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider\Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TriggerInfo]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TriggerInfo\0]
"Type"=dword:00000003
"Action"=dword:00000001
"GUID"=hex:ba,0a,e2,1c,51,98,21,44,94,30,1d,de,b7,66,e8,09

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TriggerInfo\1]
"Type"=dword:00000003
"Action"=dword:00000002
"GUID"=hex:6e,51,af,dd,c2,58,66,48,95,74,c3,b6,15,d4,2e,a1

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.
0
JAN PAKULAICT Infranstructure ManagerCommented:
Please try this command:

w32tm /config /manualpeerlist:time.nist.gov,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time

or alternately use that:

http://www.satsignal.eu/ntp/x86/index.html
0
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.
0
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.
0
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.
0
kassant7Author Commented:
Thank you.
0
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.