seamusobr1
Enthusiast
Enthusiast

Time Configuration

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
NathanosBlightc
Commander
Commander

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

0 Kudos
18 Replies
Alex_Romeo
Leadership
Leadership

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/
0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
Alex_Romeo
Leadership
Leadership

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

Blog: https://www.aleadmin.it/
0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
Alex_Romeo
Leadership
Leadership

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/
0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
lmoglie
Enthusiast
Enthusiast

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

0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
seamusobr1
Enthusiast
Enthusiast

you mean the output of esxcli hardware clock get

0 Kudos
Alex_Romeo
Leadership
Leadership

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

Blog: https://www.aleadmin.it/
0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
Alex_Romeo
Leadership
Leadership

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

Blog: https://www.aleadmin.it/
0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
seamusobr1
Enthusiast
Enthusiast

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

0 Kudos
NathanosBlightc
Commander
Commander

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

0 Kudos
seamusobr1
Enthusiast
Enthusiast

Yes this is correct confirmed by VMware

0 Kudos
NathanosBlightc
Commander
Commander

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
0 Kudos
seamusobr1
Enthusiast
Enthusiast

I will go and check it out Thank you

0 Kudos