VMware Cloud Community
JRedmond
Enthusiast
Enthusiast

Time discrepancy between ESX host and VI Client

I have two ESX 4.0 Update 1 hosts in an HA cluster. When at the console I noticed the time was off on the one of the hosts, I followed this article to adjust it properly:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1436

After adjusting when I connect to the server or vCenter it shows the hosts time is off by 4 hours. I have rebooted it as well but it still shows it's off. Any thoughts? Thanks.

Reply
0 Kudos
11 Replies
marcelo_soares
Champion
Champion

If, inside your Service Console, you type "date" and it returns to you the esact time with the right timezone, you are fine on the ESX side. For example, on my timezone at Brazil:

Tue May 4 23:44:44 BRT 2010

BRT is the timezone, that should be right since you adjusted it according to the KB (if it is not let us know...). If it is, the problem is in the timezone of your client computer - it should be the same as the ESX server. For me it seems just to be translating the time to our client timezone - which is fine if you is on a timezone different from the ESX server.

Marcelo Soares

VMWare Certified Professional 310/410

Virtualization Tech Master

Globant Argentina

Consider awarding points for "helpful" and/or "correct" answers.

Marcelo Soares
Reply
0 Kudos
Feihong
Enthusiast
Enthusiast

Run hwclock in the service console and check if system clock is same as hardware clock.

hwclock --systohc or hwclock --hctosys to adjust. May need to restart to take effect.

EMCSyA EMCIE EMCPE

EMCSyA EMCIE EMCPE - Awarding points if you think it is "Helpful" and/or "Correct"
Reply
0 Kudos
JRedmond
Enthusiast
Enthusiast

First thank you for responding.

Marcelo:

When I ran date command the time was not correct. I set it as requested in the article then I synchronized it the hardware clock. The timezone where the client and server is are the same. Also one of the two ESX servers has the correct time on the client and host.

Feihong:

As specified in the VMware KB I ran hwclock --systohc after setting the time manually with the date command since it was off. I also rebooted it after this but the client still has the time off.

Any other thoughts? Thanks.

Reply
0 Kudos
marcelo_soares
Champion
Champion

Would you mind pasting the date command output here for a "good" ESX and for the "bad" one?

Marcelo Soares

VMWare Certified Professional 310/410

Virtualization Tech Master

Globant Argentina

Consider awarding points for "helpful" and/or "correct" answers.

Marcelo Soares
Reply
0 Kudos
JRedmond
Enthusiast
Enthusiast

I've attached screenshots of the client and host time, I'll post the last attachment in the follow post.

Reply
0 Kudos
JRedmond
Enthusiast
Enthusiast

Last attachment.

Reply
0 Kudos
marcelo_soares
Champion
Champion

The ESX1 clearly do not have the correct timezone (I am assuming you are not on Greenwich Smiley Happy because date show the timezone as UTC. You need to check the steps you followed on the KB so the date command shows you EDT instead of UTC.

That's why your time is being translated wrong.

Marcelo Soares

VMWare Certified Professional 310/410

Virtualization Tech Master

Globant Argentina

Consider awarding points for "helpful" and/or "correct" answers.

Marcelo Soares
JRedmond
Enthusiast
Enthusiast

Good catch didn't even notice that. I checked the clock file and they are both set to US/Eastern. I tried to go through the steps again to copy the time zone files instead of linking and I'm getting an error. I've attached some screenshots. I must be missing something fundamental here, thanks.

Reply
0 Kudos
marcelo_soares
Champion
Champion

You are doing the right way copying. Weird is the error message. The /etc/localtime file exists? Isn't it opened by other application? Try a lsof | grep localtime to check if no application is using it. Also, just in case, check if your / partition is not full using the "df -h" command.

Marcelo Soares

VMWare Certified Professional 310/410

Virtualization Tech Master

Globant Argentina

Consider awarding points for "helpful" and/or "correct" answers.

Marcelo Soares
Reply
0 Kudos
JRedmond
Enthusiast
Enthusiast

That's a negative on both, attached screenshot. Thanks.

Reply
0 Kudos
JRedmond
Enthusiast
Enthusiast

I got it working, I had rm the localtime directory, it was there but just linked. I then ran cp and ln again and all is well, thanks for the help.

Reply
0 Kudos