VMware Cloud Community
alexaaaaaaaa
Contributor
Contributor
Jump to solution

synchronize bios with my esx ntp server

hello all!

I have set up a ntp server and my esx is sunchronize on it. However my host bios is not at the good time... and I what it to have same time as my esx.

I try this command hwclock --systohc --utc but nothnig change.

Do you know a way to synchronise the bios with a ntp server or with my esx?

Thanks

Alexaa

0 Kudos
1 Solution

Accepted Solutions
bertdb
Virtuoso
Virtuoso
Jump to solution

I have the impression that your hardware (bios) clock is in local time instead of in UTC. When your ESX boots, it interprets the hardware clock as UTC and calculates the according system time. Try setting "UTC=false" and rebooting the ESX.

View solution in original post

0 Kudos
9 Replies
e12pilot
Enthusiast
Enthusiast
Jump to solution

Hi There,

Do you receive an error message with the command?:

hwclock --systohc --utc[/code]

Or does it simply complete.

What is the output of:

hwclock --show[/code]

0 Kudos
alexaaaaaaaa
Contributor
Contributor
Jump to solution

Thanks for your reply,

hwclock --systohc --utc[/i], it simply complete...

The output of hwclock --show[/i] is at right time.

But if I reboot the ESX and if I go to the bios the time is not good. (2 hours late).

Under ESX server the time is OK.

It is weird...

I have Dell server with DRAC card, this card use the bios clock to set its own clock... When events systems sends mail to me the time of the mail is 2 hours late...

Alexaa

0 Kudos
jlanders
VMware Employee
VMware Employee
Jump to solution

Alexaa,

The command 'hwclock' always displays local time.

In the Service Console, typing 'man hwclock' will give

you more information.

The hardware clock visible in the BIOS always displays

UTC, assuming you've set it up that way. When NTP is

running and things are sync'd properly, the Service

Console kernel will automatically sync the hardware

clock about every 11 minutes. You shouldn't have to

do anything special.

You are correct that the earlier DRAC cards get their

time from the hardware clock. Since you are in France

and the hardware clock is in UTC, there is a two hour

time difference (1 hour east of the Prime Meridian + 1

hour due to Summer Time). Later DRAC cards have their

own clock which can be adjusted via a 'racadm' command.

The Dell web site probably has more details.

Joe

bertdb
Virtuoso
Virtuoso
Jump to solution

run "cat /etc/sysconfig/clock", is there a setting that has "UTC" in it, and if yes, what does it say ?

0 Kudos
alexaaaaaaaa
Contributor
Contributor
Jump to solution

the output of this command is:

ZONE="Europe/Paris"

UTC=true

ARC=false[/i]

Thanks

0 Kudos
bertdb
Virtuoso
Virtuoso
Jump to solution

I have the impression that your hardware (bios) clock is in local time instead of in UTC. When your ESX boots, it interprets the hardware clock as UTC and calculates the according system time. Try setting "UTC=false" and rebooting the ESX.

0 Kudos
azn2kew
Champion
Champion
Jump to solution

The following procedures help you configure your NTP synchronization:

Enable NTP on ESX server

Make sure that the server has the correct time zone.

Copy away the /etc/localtime

cp /etc/localtime /etc/localtime.old

Copy across the London time zone file

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

Rename NTPConfig file.

mv /etc/ntp.conf /etc/ntp.conf.old

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

server tick.domain.com prefer

server tock.domain.com

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/step-tickers.old

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

tick.domain.com

tock.domain.com

Enable ntp through the service console fircd ewall

esxcfg-firewall –e ntpClient

Start the ntp daemon

service ntpd start (make sure to copy localtime file to /etc)

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 by running these commands:

chkconfig ntpd --add

chkconfig ntpd on --level 3

Hope this helps!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
alexaaaaaaaa
Contributor
Contributor
Jump to solution

I have changed this parameter to false and I wait the "good" time to reboot my ESX.

When it will be done I let you know the output...

azn2kew thanks for your procedure, thats what I have done.

Thanks

regards

Alex

0 Kudos
alexaaaaaaaa
Contributor
Contributor
Jump to solution

OK that's it!

I use this setting "UTC=false" and after ESX reboot, I obtain a good hardware time for my ESX, and consequently to my DRAC card...

Thanks.

Alexaa

0 Kudos