VMware Cloud Community
Nishesh
Enthusiast
Enthusiast

ESX 4.0 - Time Synchronization Failure

Hello

I just finished installing ESX 4 in a Test environment within my company.

The Test environment is currently running out on VMWorkstation 8.0 - That is, the environment itself is virtualized.

  • VMWorkstation 8 has been installed on an HP Proliant Server equipped with 12 GB of RAM with Windows 2008 x64
  • VMWorkstation consists of 3 Virtual Machines. All the 3 VMs are connected to a "host-only" network. Subnet IP: 192.168.181.0/24
  • The 3 Virtual Machines are as follows: 1 - Windows 2008 Domain Controller, 2 - ESX 4 Host Server, 3 - Windows XP SP2 Client
  • Windows 2008 Domain Controller holds all the FSMO Roles, being the only DC at the root of the Forest.                                                  
  • Both the Windows VMs have VMWare Tools installed. The ESX Host does not have VMWare tools installed.
  • All the 3 Servers can successfully PING each other, confirming Network Connectivity.
  • XP SP2 has the VSphere Client Installed.
  • The 2008 Server running as the Domain Controller is not configured to Sync with any Public NTP Server. Local NTP Client is disabled on the box.
  • XP SP2 Client can succesfully SYNC its local time with the Domain Controller.
  • During installation of the ESX Host - The DC was set as the NTP Server. SYNC did not report any warnings - the Time on the ESX Host at that point in time was off by 3 hours and 30 mins. I ignored the issue at that point and proceeded with the installation.
  • Post Install - I connected to the ESX Host from the XP Client using VSphere. The time was still of by 3 hours and 30 mins.

Troubleshooting:

  • I logged into the ESX Console directly (quite obvious since its a VM) and verified the Time Zone Settings. It was correct.
  • I verified that the Domain Controller was Listed as the NTP server for the ESX Host via the VSphere Client.
  • I verified via the VSphere client that the outgoing UDP Port 123 was open in the local firewall on the ESX Host. Although there was nothing listed in the "Incoming" ports list.

Can somebody shed any light on whats going on ?


Thank You

Nishesh


0 Kudos
5 Replies
UmeshAhuja
Commander
Commander

Hi,

I Think when you restart the VM you time sync with the Workstation or Host where you have the VM installed.

Below is the description which might help you out ?

The time synchronization  checkbox controls only whether time is periodically resynchronized while the  virtual machine is running. Even if this box is unselected, VMware Tools by  default synchronizes the virtual machine's time after a few specific events that  are likely to leave the time incorrect.
To completely disable  time synchronization in the guest, perform one of these options:
  • Open the virtual machine's  configuration file (.vmx ) in a text editor and set these  options to zero. If the entries do not exist, add  them.

    Note: 0 = disabled, 1 = enabled.

    tools.syncTime =  "0"
    time.synchronize.continue =  "0"
    time.synchronize.restore =  "0"
    time.synchronize.resume.disk = "0"
    time.synchronize.shrink =  "0"
    time.synchronize.tools.startup = "0"

    time.synchronize.resume.host = "0"
  • Select the virtual machine  in the VMware Infrastructure Client inventory. On the Summary tab, click Edit Settings, then click the  Options tab and select General (under  Advanced). Click Configuration Parameters,  then click Add Row and add this information:
tools.syncTime = "0"
time.synchronize.continue =  "0"
time.synchronize.restore =  "0"
time.synchronize.resume.disk =  "0"
time.synchronize.shrink =  "0"
time.synchronize.tools.startup = "0"
time.synchronize.resume.host = "0"
Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
0 Kudos
Nishesh
Enthusiast
Enthusiast

Hi Umesh

Thank you for your response.

But a few things to be noted is:

  • The VM running the ESX Host does not have VM Tools Installed. Therefore VM Tools is out of question.
  • The Time running on the Local Server and the Time running on the 2 Windows VMs are exactly the same, which is correct.
  • Although the DC is set as the NTP Server within the ESX host - The ESX Host is acting as if NTP is not configured at all.

Hope this further elaborates the scenario which I am dealing with right now.

Thank You

Nishesh

0 Kudos
Nishesh
Enthusiast
Enthusiast

Does anybody else within the community has any other theory ?

0 Kudos
BharatR
Hot Shot
Hot Shot

Hi,

Although the DC is set as the NTP Server within the ESX host - The ESX Host is acting as if NTP is not

configured at all.

Synchronizing time on VMware ESX

The time must be synchronized if there  are time discrepancies in the environment. The time can be set manually  or maintained by using a Network Time Protocol (NTP) server. For synchronizing time using NTP, see Installing and Configuring NTP on VMware ESX Server (1339) or Guide to configure NTP on ESX servers (1003063) .
To set the time from the ESX command line manually, use the date -s command. For example, to set the date to 31 Jan 2012 18:00:00, type this command as the root user:
# date -s "31 Jan 2012 18:00:00"

To set the time from vSphere Client:
  1. Launch vSphere Client.
  2. Go to Configuration > Time Configuration > Properties.
  3. Input the correct Time and Date.
  4. Click Options.
  5. Click Restart on the Service Commands box.

Note: For adjusting the time zone, see Adjusting ESX Server Time Zone (1436) .

Best regards, BharatR--VCP4-Certification #: 79230, If you find this information useful, please award points for "correct" or "helpful".
Nishesh
Enthusiast
Enthusiast

Hi Bharat

The Problem is now RESOLVED !

I would like to point out a few things before continuing with the elaboration of the fix:

  • The KB articles you provided inclines more towards ESX hosts running on earlier versions and not ESX 4.0 or later.
  • Therefore - it more or less illustrates manual configuration of the ESX host in order to set it up as an NTP Client.
  • I did not need those manual steps as i am running ESX 4.0 and VSphere can do the job with simple point and click.

So i took out bits and pieces from the article 1003063 and tried out the following things:

  1. Queried the NTP Port status using : esxcfg-firewall -q ntpClient. NTP was enabled as I verified before using the VSphere Client.
  2. I configured NTP again using the console : ntpdate -u NTP.domain.com, although it was already configured using VSphere Client.
  3. I received the following output after step 2 : step time server IP ADDRESS offset 137989.381415 sec
  4. I decided to manually restart the NTP Client on the ESX host from the console itself : service ntpd restart
  5. I queried the system time - and bingo !
  6. I went back to the VSphere client, and it had updated itself already.

I don't understand why restarting the NTP Client on the ESX Host from the VSphere client did not work in the first place.

I don't know wether the fix was ideal or plain luck but all works now.

Thanks !

Nishesh

0 Kudos