VMware Cloud Community
woodsp
Contributor
Contributor
Jump to solution

Changing the Time on the ESX server itself

Hello all,

I have created an ESX server and have three servers up and running on it. When I connect to the ESX server via the Infrastructure Client, the time is wrong on the ESX host, but correct on the virtual machines.

How do I change/set the time on ESX host itself and can this be done without closing the three virtual machines?

Thanks,

Paul

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

How do I change the time on the ESX Service Console?

• Login to service console

• Type “date –s yyyymmdd” to set the date

• Type “date –s hh:mm” to set the time

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

o restrict default kod nomodify notrap

o server 0.pool.ntp.org

o server 1.pool.ntp.org

o server 2.pool.ntp.org

• Save & exit

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

• Add the below lines

o 0.pool.ntp.org

o 1.pool.ntp.org

o 2.pool.ntp.org

o 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

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

View solution in original post

0 Kudos
5 Replies
Chris_S_UK
Expert
Expert
Jump to solution

just use the date command. for help, type:

date --help

Texiwill
Leadership
Leadership
Jump to solution

Hello,

Set up NTPD on your ESX Server to sync to another machine on your network.

If you do not use NTP, then I suggest starting to use it.

Here are the steps:

Add your time sources by IP to /etc/ntp/step-tickers, 1 IP per line.

Comment out the line beginning with 'restrict' in /etc/ntp.conf

Add to the end of /etc/ntp.conf your time sources by IP in the form of:

server IP

Enable the firewall to allow ntpClient

Start/Enable the ntpd service: service ntpd start; chkconfig ntpd on

Best regards,

Edward

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
esiebert7625
Immortal
Immortal
Jump to solution

How do I change the time on the ESX Service Console?

• Login to service console

• Type “date –s yyyymmdd” to set the date

• Type “date –s hh:mm” to set the time

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

o restrict default kod nomodify notrap

o server 0.pool.ntp.org

o server 1.pool.ntp.org

o server 2.pool.ntp.org

• Save & exit

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

• Add the below lines

o 0.pool.ntp.org

o 1.pool.ntp.org

o 2.pool.ntp.org

o 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

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

0 Kudos
juchestyle
Commander
Commander
Jump to solution

Eric,

Even I find your posts helpful! Great work! Smiley Happy

Respectfully,

Matthew

Kaizen!
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Thanks!

0 Kudos