VMware Cloud Community
maal
Contributor
Contributor

Time sync on ESX 3

Hi,

I'm experiencing a strange problem on my ESX 3 servers. I have configured the NTP on one ESX 3 server following the document "Installing and configuring NTP on VMware ESX Server" (sorry i don't have the url).

I'm using the same exact time server on our windows servers and the time is correct.

here is the result of date command on my ESX3:

Tue Jul 17 10:33:52 GMT+1 2007

the GMT+1 is the correct time zone

So the sync is working BUT the time is 3 houres late ???

Ideas are welcome

0 Kudos
6 Replies
skippy33
Contributor
Contributor

Hi,

I'm like you, GMT+1 and when I run date i've got:

[]# date -u

Tue Jul 17 08:44:44 UTC 2007

[]# date

Tue Jul 17 10:44:49 CEST 2007 (the right date...)

I think the CEST is good for you.

Message was edited by:

skippy33

0 Kudos
MayurPatel
Expert
Expert

If you are in the UK like me. We don’t strictly obey UTC. We obey GMT and

BST. If you enable UTC in and select the Europe/London your system clock

will be 1hr a drift (depending on the time of the year).

When you installed ESX you "might" have set UTC -3hrs.

Check your hardware clock should be set to your system time. Run hwclock --help command and remove UTC.

Message was edited by:

MayurPatel

Message was edited by:

MayurPatel

Added command details

0 Kudos
dclark
Enthusiast
Enthusiast

I seem to recall a similar problem.

I think I had to update the content of the \etc\sysconfig\clock file to;

ZONE="Europe/London"

UTC=false

ARC=false

and also had to copy a GB file into a location that I can't currently remember.

After doing that and then synching the hardware clock;

/sbin/hwclock -–systohc

the time was correct

0 Kudos
maal
Contributor
Contributor

Thank you for the answe but what do you mean by "had to copy a GB file" ?

Anyway i modified the \etc\sysconfig\clock like you said but it changes nothing...

If the time here is 14:00, the time on the ESX is 11h00 ... Smiley Sad

When i do a service ntpd restart i have:

\[root@vm1-server root]# service ntpd restart

Shutting down ntpd: \[ OK ]

ntpd: Synchronizing with time server: \[ OK ]

Starting ntpd: \[ OK ]

The time servers i use are the same as the one used on our windows server and on windows the time is correct...

Another idea ???

0 Kudos
Dafish
Contributor
Contributor

This is our documentation we wrote that fixed it for us:

Enable NTP on ESX server

Make sure that the server has the correct time zone. It should be BST.

Copy away the /etc/localtime

cp /etc/localtime /etc/ORIG-localtime

Copy across the London time zone file

cp /usr/share/zoneinfo/Europe/London /etc/localtime

Rename NTPConfig file.

mv /etc/ntp.conf /etc/ORIG-ntp.conf

Using vi or nano write the following lines in a new file /etc/ntp.conf

restrict default kod nomodify notrap noquery nopeer

restrict 127.0.0.1

YOUR NTP SERVER ADDRESS

fudge 127.127.1.0 stratum 10

driftfile /etc/ntp/drift

broadcastdelay 0.008

authenticate yes

keys /etc/ntp/keys

Rename step-tickers file

mv /etc/ntp/step-tickers /etc/ntp/ORIG-step-tickers

Using vi or nano write the following line into step-tickers

YOUR NTP SERVER ADDRESS

Enable ntp through the service console firewall

esxcfg-firewall –e ntpClient

Start the ntp daemon

service ntpd start

Check that the time is correct

date

Set the hardware clock to the system time

hwclock --systohc

Check the hardware clock is correct

hwclock

Check the run level of the esx server. There should be a line that reads id:3:initdefault:

vi /etc/inittab

Change the ntpd to start up when the server boots

chkconfig ntpd --add

chkconfig ntpd on --level 3

All should be ok now, remember to cange to you locals file as needed.

0 Kudos
acmcnick
Enthusiast
Enthusiast

I had a similar problem.

I ran "tzselect" and then verified the timezone in /etc/localtime and set the timezone in /etc/sysconfig/clock

Make sure you setup NTP properly and run a "hwclock --systohc" don't need to use UTC, I do, but is sounds like it may be an issue where you are at.

Hope this helps.

0 Kudos