Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
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:
-
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)
-
-
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.
- 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.
-
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).
-
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.
- 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
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.
Actions
- KB Article:
- Updated:
- Categories:
- Product Family:
- Products:
- Product Versions:

