2

After vMotion some guests went 2 hours ahead in time.

2 hours ahead of UTC is exactly our timezone.

Why would it do that? AFAICS both source and destination hosts have the same configuration.

But apparently not. What could be wrong?

Marki
  • 2,795
  • 3
  • 27
  • 45

2 Answers2

3

Check your hosts' hardware clocks in the BIOS...

This is a common issue, so I set the hardware clock to UTC on my systems or have the OS update the hardware clock once synced with NTP in the build process.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • They're all the same. In fact those are blade servers and they sync against the mgmt blade. – Marki Jul 26 '13 at 13:53
  • You are completely right. What happened here: overcompensation. BIOS was at UTC+2 (duh). If immediately after booting the host you vmotion sth onto it, the host's NTP agent still hasn't adjusted for the wrong time it got from the BIOS and so the vmware tools set the wrong time in the OS. – Marki Jul 26 '13 at 16:23
  • The question now is how to correctly configure BIOS time for Linux *and* Windows guests. Linux uses UTC, what if Windows on the same ESX host tries to set the CMOS to some other time(zone). Will Linux break? Yeah I know it's using NTP, but still, I don't feel comfortable right now. – Marki Jul 26 '13 at 16:42
  • Set your host hardware to UTC. Inside of your guests, you rely on the TZ offset to get the right display. – ewwhite Jul 26 '13 at 16:44
  • Windows and Linux both use UTC at the BIOS level, and both convert to local time based on the TZ set at the OS level. – MDMarra Jul 26 '13 at 16:44
0

The hosts do not have the same time. Configure NTP on all hosts correctly and consistently.

VFrontDe
  • 1,478
  • 8
  • 11