VMware Cloud Community
taylorb
Hot Shot
Hot Shot
Jump to solution

Changing time and date on ESX host

I've had a Vi3 setup going for about 9 months with 3 ESX hosts and VC. Since the time changed this weekend, I decided I would verify that the time on my hosts is correct. So I ssh'ed into them and run the date and clock commands. I appears that 2 of my hosts are a few hours off, but one of them is about 18 months off! I have never noticed before since the VC server has the correct time and my logs and perf data in VC all apear to have the right time and date. I cannot seem to to find any documentation on how to change the time and date on an ESX host. So my questions are, do I care that my ESX hosts have the wrong time, since VC has the right time. And if I do care, how do I change the time and date? Thanks.

Reply
0 Kudos
1 Solution

Accepted Solutions
virtualdud3
Expert
Expert
Jump to solution

I would definitely configure the ESX hosts to synch off of an NTP server:

Here are the steps as documented by esiebert7625

How can I configure my ESX Server to automatically sync the time from a NTP source?

• Login to service console

• Edit /etc/ntp.conf with Nano or Vi

• Add the below lines to the OUR TIMESERVERS section

restrict default kod nomodify notrap

server 0.pool.ntp.org

server 1.pool.ntp.org

server 2.pool.ntp.org

• Save & exit

• Edit /etc/ntp/step-tickers with Nano or Vi

• Add the below lines

0.pool.ntp.org

1.pool.ntp.org

2.pool.ntp.org

pool.ntp.org

• Save & exit

• Type "esxcfg-firewall -enableService ntpClient" or use VI Client to enable under ConfigurationSecurity ProfileProperties

• Type "service ntpd restart" - may say failed for stop if not currently running

• Type "chkconfig --level 345 ntpd on" to enable NTP daemon to autostart

• Type "hwclock --systohc" to set hardware clock to system clock

• Type "ntpdate -q 0.pool.ntp.org" to see the offset between local and ntp clock

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!

View solution in original post

Reply
0 Kudos
4 Replies
virtualdud3
Expert
Expert
Jump to solution

I would definitely configure the ESX hosts to synch off of an NTP server:

Here are the steps as documented by esiebert7625

How can I configure my ESX Server to automatically sync the time from a NTP source?

• Login to service console

• Edit /etc/ntp.conf with Nano or Vi

• Add the below lines to the OUR TIMESERVERS section

restrict default kod nomodify notrap

server 0.pool.ntp.org

server 1.pool.ntp.org

server 2.pool.ntp.org

• Save & exit

• Edit /etc/ntp/step-tickers with Nano or Vi

• Add the below lines

0.pool.ntp.org

1.pool.ntp.org

2.pool.ntp.org

pool.ntp.org

• Save & exit

• Type "esxcfg-firewall -enableService ntpClient" or use VI Client to enable under ConfigurationSecurity ProfileProperties

• Type "service ntpd restart" - may say failed for stop if not currently running

• Type "chkconfig --level 345 ntpd on" to enable NTP daemon to autostart

• Type "hwclock --systohc" to set hardware clock to system clock

• Type "ntpdate -q 0.pool.ntp.org" to see the offset between local and ntp clock

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos
taylorb
Hot Shot
Hot Shot
Jump to solution

Thanks, that worked beautifully.

Reply
0 Kudos
tito123
Contributor
Contributor
Jump to solution

Dear all

i want to change time in ESXI 4.1

can any one help me

thanks

Reply
0 Kudos
seereddy
Contributor
Contributor
Jump to solution

Hi,

Selec the specific ESXi host -  go to -  "configuration" tab & select the " Time Configuration" to modify the time & date.

Reply
0 Kudos