Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Creating tasks in VMware vCenter Server Heartbeat to synchronize time between the Passive Server and the Active Server

Purpose

This article provides information about creating tasks in VMware vCenter Server Heartbeat to synchronize time between the Primary and Secondary servers.

Resolution

To synchronize the time between the servers:

  1. Create the following .bat files :
    • TakeTime.bat, consisting of the following script :

      nfcmd localhost getsingle Controller IsActiveServer | find "false

      if errorlevel 1 goto end

      net use \\<Remote_Server_Channel_IP_Address> /user:<Full_Domain_Name>\<Admin_Account> <password>

      net time \\<Remote_Server_Channel_IP_Address> /set /yes

      :end


      For example:

      nfcmd localhost getsingle Controller IsActiveServer | find "false

      if errorlevel 1 goto end

      net use \\10.0.0.1 /user:QA.lab\Administrator password

      net time \\10.0.0.1 /set /

      :end

       
    • SyncTime.bat, consisting of the following script :

      @echo off

      for /L %%j in (1,1,2) do (

      sleep 600)

      for /L %%i in (1,1,9999999) do (

      taketime

      sleep 86400)
  2. On the Secondary server, copy the two .bat files (TakeTime.bat and SyncTime.bat) into the %Program Files%\VMware\VMware vCenter Server Heartbeat\R2\Bin folder.
  3. If it is not installed already, download and install the Windows Resource Kit Tools found at http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en.
  4. Copy the sleep.exe file from the Windows Resource Kit Tools installation folder (located in the %Program Files%\Windows Resource Kits\Tools, into the %Program Files%\VMware\VMware vCenter Server Heartbeat\R2\Bin folder).
  5. In the Windows StartUp Menu, add a shortcut to the SyncTime.bat file. This can be added directly in the %Documents and Settings%\Administrator.Domain\Start Menu\Programs\Startup folder.
  6. Repeat this procedure on the Primary server replacing the <Remote_Server_Channel_IP_Address> with the channel IP address of the Secondary server to provide for synchronization after a switchover.

Additional Information

vCSHB-Ref-1551

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback


Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Actions