VMware Cloud Community
ebudweiser8
Contributor
Contributor

VM Periodically changing time on Windows 2003 servers

I am running ESX 3.5. My VMs are showing odd times in the Windows log files. They will show the right time for awhile and then jump back for a short time and then back to the correct time. This happens a variety of tims throughout a day. Does anyone know what would be causing this?

0 Kudos
11 Replies
Chris_Howard
Hot Shot
Hot Shot

Is it possible the clock is running slow, due to the way VM clocks sometime runs slow, (as described in this whitepaper), and then the clock is being periodically corrected through the Windows Time Service?

If you found this helpful please consider the use of the Helpful /Correct buttons to award points. Thanks !!

If you found this helpful please consider the use of the Helpful /Correct buttons to award points. Thanks !!
0 Kudos
ctfoster
Expert
Expert

Where are your VM's taking their time from? In my setup all servers sync from a metal PDC. No server uses the VM Tools to to sync time or takes any other source. Setting the option on all the servers and clients, except the PDC, is a simple as making sure each server is using AD time.

net time /setsntp

net time /querysntp > This computer is not currently configured to use a specific timeserver (therefore I'll query DNS for a AD timesource)

Make sure you only have one source any everybody talks to that source. Remember if you have a time drift, so long as everybody is drifting at the same rate - it's not good - but things will still work. You have problems when one half of the network is going one way (esx time) and one half the other (AD time). Keep an eye on your event logs for any W32Time errors.

0 Kudos
weinstein5
Immortal
Immortal

Defintiely sounds like a time synchronizaiton problem - with VMware tools you will be bale to force the VM to synchronize the VM to the service console clock - you will then need to set up NTP for the service console and this can be done via the Configuration Tab of the ESX Host in VI client - make sure synchronize to the same NTP as your domain controllers

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
kjb007
Immortal
Immortal

If your time is fluctuating and your machine is part of a domain, then you may be setting time by both methods these folks just described. With the tools and with window time and ad. Double-check both, and turn off sync with the tools and stick with ad.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
java_cat33
Virtuoso
Virtuoso

In cases where this happens, sometimes it can be necessary to install the "Descheduled Time Accounting" driver - an optional component of the VMware tools. I've used this before with no problems and it has resolved time sync issues.

To install the driver, go to add/remove programs, do a modify of VMware tools - it's listed under "Vmware device drivers" - and is not installed by default.

Further info on this great tool is here.....

0 Kudos
ebudweiser8
Contributor
Contributor

My infrastructure consists of 5 esx servers. Four out of the five esx servers are working correctly. The fifth esx server time jumps back to 2007 after a reboot. I can go into the NTP settings through the viclient and adjust the settings that they stay until the next reboot. My ntp settings are the exact same on all 5 esx servers. Any thoughts why the one esx server's ntp settings change after a reboot?

0 Kudos
kjb007
Immortal
Immortal

Run hwclock on your console and see what your BIOS is seeing.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
ebudweiser8
Contributor
Contributor

I ran the hwclock and it shows nov. 9, 2007. I went into the BIOS and changed the time & date however the time is still wrong through the viclient and the hwclock command. The date is right but the time is showing 5:34 am. I rebooted again to check the BIOS time/date and they are still set correctly. The hwclock command is also showing the wrong time. Where is it getting that time from?

0 Kudos
ebudweiser8
Contributor
Contributor

After updating the BIOS time/date to the right time/date, I ran chkconfig --level 345 ntpd on command. After running this command and rebooting the ESX server, the time kept the correct time.

0 Kudos
kjb007
Immortal
Immortal

Once you are up, you can also run hwclock --systohc to make your hardware clock use your system time.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
jhanekom
Virtuoso
Virtuoso

Glad you got it working, ebudweiser8. It's of course easy for me to say this with 20/20 hindsight, but something we do to address this type of problem is to have weekly preventative maintenance checklists, in which we (amongst other things) verify time synchronisation on our hosts by running "ntpq -p".

There are numerous ways to check this (syslog, ntpdate, etc) but I think the thought I'm trying to get across is that it's a good idea to have some form of regular maintenace to verify that what you've configure still works the way it's intended.

0 Kudos