mdclem
Contributor
Contributor

Time on virtual machines

I have several virtual machines that reset the time after a restart.  I have verified the correct time in the BIOS and the time zone.   I can manually correct the time, but after every restart, the time is off by 5 hours.  

0 Kudos
13 Replies
Troy_Clavell
Immortal
Immortal

discussion moved from Community Website Help to Virtual Machine & Guest OS

What VMware product are you using to host your Guest OS?

0 Kudos
MindTheGreg
Enthusiast
Enthusiast

Are you in the (-5 GMT) timezone? Is there something that makes sense to the 5 hour number? I seem to remember a checkbox to use UTC or change the clock to your timezone.

Set-Annotation -CustomAttribute "The Impossible" -Value "Done and that makes us mighty"
0 Kudos
mdclem
Contributor
Contributor

I am using VMware vCenter Server v4.1.0 - Build 258902

0 Kudos
mdclem
Contributor
Contributor

No, I'm in the Eastern Time Zone, but I that's the same offset of -5.

0 Kudos
MindTheGreg
Enthusiast
Enthusiast

Check out KB "Adjusting ESX host Time Zone" : http://kb.vmware.com/kb/1436

Also look at your VMware Tools settings, your time could be getting messed up if the VMs are set to sync time with the host and the host time is wrong or set to use UTC.

EDIT: Just saw this. It'll probably be helpful. Timekeeping Best Practices: http://kb.vmware.com/kb/1318

Set-Annotation -CustomAttribute "The Impossible" -Value "Done and that makes us mighty"
0 Kudos
mdclem
Contributor
Contributor

I didn’t have the box checked in VMware Tools to sync, but that did not resolve the issue. I’m looking at the KB article now and will update as soon as possible. Thank for the suggestions thus far.

0 Kudos
DSTAVERT
Immortal
Immortal

Just in case this helps jog a memory. If this is ESXi it only uses UTC time. There is no timezone setting on the ESXi host. On startup a VM hardware clock will have UTC time until the OS adjusts for timezone.

-- David -- VMware Communities Moderator
0 Kudos
MindTheGreg
Enthusiast
Enthusiast

Good catch Dstavert! Thank you.

Set-Annotation -CustomAttribute "The Impossible" -Value "Done and that makes us mighty"
0 Kudos
AlbertWT
Virtuoso
Virtuoso

But there is NTP option in the ESXi, so what is that for then ?

/* Any kind of comment or input would be greatly appreciated */
0 Kudos
DSTAVERT
Immortal
Immortal

But there is NTP option in the ESXi, so what is that for then ?

Using NTP doesn't have anything to do with timezone. In Linux or Windows you may point to a time server but you also must set a timezone. The timezone allows the clock to be set to a local time relative to UTC (plus or minus some value). ESXi logs etc are UTC.

-- David -- VMware Communities Moderator
0 Kudos
mdclem
Contributor
Contributor

I finally figured the time issue out. Within the vSphere Client, on the configuration tab, under the Software section…no NTP server were listed and the time was off by 5 hours. Once I added the ntp server information and restarted the service, all is well.

Thank you to each you for helping me connect the dots.

0 Kudos
DSTAVERT
Immortal
Immortal

Glad you are up and going.

-- David -- VMware Communities Moderator
0 Kudos
warriorfullight
Enthusiast
Enthusiast

I am lucky to have found this thread and all your posts. I got the same problem before and was wondering if it is due to my OS' date and time configuration. I have been changing it almost everytime thinking it was the source. Anyway, everything has been answered. :smileygrin: http://imagicon.info/cat/5-59/1.gif

0 Kudos