VMware Cloud Community
seamusobr1
Enthusiast
Enthusiast
Jump to solution

Time Configuration

I wonder if somebody can help

All of our Esxi servers are out by an hour as far as time is concerned

The vsphere web client shows the correct time which is picked up by ntp servers and I have verified that the hosts are talking to ntp by running

/etc/init.d/ntpd restart

ntpq -p

When I login to the console and type date the time is out by 1 hour they are showing 1 hour earlier

Could this be due to the ntp servers not passing on the correct daylight savings

All the servers are set to utc which I understand cannot be changed

I am in the UK and all our hosts are in the same timezone

Thanks in advance

Reply
0 Kudos
1 Solution

Accepted Solutions
NathanosBlightc
Commander
Commander
Jump to solution

Hi

Because there is no Time Zone settings for ESXi hosts, even you setup an Internal NTP server (like a router or firewall that can have access to an external NTP)  you can set accurate time just for Web access and if you connect with SSH or Shell and check generated logs in /var/log or query with ntpq -p there is still time differentiate and it's normal

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

Please mark my comment as the Correct Answer if this solution resolved your problem

View solution in original post

Reply
0 Kudos
19 Replies
Alex_Romeo
Leadership
Leadership
Jump to solution

Hi,

Generally it is better to create an internal NTP Server that points to the time registration on the internet, then the VCSA and the ESXi hosts take the setting from the NTP Server.

Alternatively you must manually set the time in each Esxi Host:

NTP.JPG

Alessandro Romeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

Thanks

Yes this is how we have set it up ntp is providing the time correctly to the esxi hosts but when we login to the host directly via the web client and ssh it is out by an hour but in vcenter the time is displayed correctly

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership
Jump to solution

The computer you use to access the web interface you have set now?

Blog: https://www.aleadmin.it/
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

my laptop is correct when you see host in vcenter time is correct when you logon to host via ssh and type date the time is 1 hour earlier also host web client shows 1 hour earlier

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership
Jump to solution

Summing up:

  • from the VCSA if you select a host and go to "Configure" and "Configuration now" the time is correct.
  • If instead you go to SSH on the ESXi host or via the web interface, the time is incorrect by 1 hour
  • the time configuration on the ESX is correct.

Is it correct what I wrote?

Blog: https://www.aleadmin.it/
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

yes the first two options are correct but not sure what you mean by the third one I am assuming the hardware time yes

Reply
0 Kudos
lmoglie
Enthusiast
Enthusiast
Jump to solution

The time you can see should be the one that you set up on the bare metal of your x86.

Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

Interesting thing is that if I set the hardware clock to the correct time the system time goes back an hour

If I stop and start the ntp service the hardware clock changes to back it was ie an hour earlier

Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

you mean the output of esxcli hardware clock get

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership
Jump to solution

As lmoglie says, the physical server x86 where you installed Esxi, which has now set ?

Blog: https://www.aleadmin.it/
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

Yes I set the time using the command esxcli hardware clock set but as soon as you stop and start the ntp service the time reverts back to what it was ie an hour earlier

I ran esxcli hardware clock get

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership
Jump to solution

where does the NTP setting come from? what did you set as NTP?

Blog: https://www.aleadmin.it/
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

our own intenal ntp servers which we know are reporting correct time as we can see it in vcenter the problem we have is it is not being picked up by the host we use the same ntp servers on about 2500 of our hypervisors

Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

also when doing ntpq -q

we get the output below

pastedImage_0.png

the reach figure of 377 indicates successful communications to the ntp server but the host and vsphere web client seem to show time out by an hour

Reply
0 Kudos
NathanosBlightc
Commander
Commander
Jump to solution

Hi

Because there is no Time Zone settings for ESXi hosts, even you setup an Internal NTP server (like a router or firewall that can have access to an external NTP)  you can set accurate time just for Web access and if you connect with SSH or Shell and check generated logs in /var/log or query with ntpq -p there is still time differentiate and it's normal

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

Please mark my comment as the Correct Answer if this solution resolved your problem
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

Yes this is correct confirmed by VMware

Reply
0 Kudos
NathanosBlightc
Commander
Commander
Jump to solution

I wrote a post about NTP configuration on ESXi in my personal blog 1 year ago and now post it in my VMware blog. I hope it can help you more:

Time differentiate between ESXi host & NTP Server

Please mark my comment as the Correct Answer if this solution resolved your problem
Reply
0 Kudos
seamusobr1
Enthusiast
Enthusiast
Jump to solution

I will go and check it out Thank you

Reply
0 Kudos
theryangoodman
Contributor
Contributor
Jump to solution

Hello,

 

Did you manage to resolve this please?

No matter what I do on my hosts, the time is always out by an hour, I even looked at pointing the time service to our firewall but it still puts it out by an hour. When I login to the hosts the time is back 1 hour, if I login to vCenter and check the time is correct, this isn't good though as my DC's are pointing to the hosts for their time.

Any help here is appreciated,

 

Thanks,

Reply
0 Kudos