How to Configure Time Sync for a Cloud VM ?

The following are the steps to configure Time Sync for VM’s in Cloud. This should enable administrators to synchronise the time by the node despite rebooting of the server.

How to Configure Time Sync for Linux ?

Step 1 : Log into the server via SSH as administrator
Step 2 : Use the following command in the command prompt :

vmware-guestd –cmd “vmx.set_option synctime 0 1”

How to Configure Time Sync for Cloud Hosting Platform using Windows 2008 R2  ?

Step 1 : Access the server using RDP – Remote Desktop Protocol (Make sure you have administrator rights on the server)
Step 2 : Go to the command prompt.
Step 3 : Use the following command:

w32tm /config /,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time

Since its a VM withing Hyper-V, one must disable time sync by going to VM settings >> Management >> Integration Services >> uncheck Time Synchronization.

Step 4 : Check if the VM syncs the time on reboot, use the below command for that:

schtasks /create /tn TimeSync /tr “w32tm /resync” /sc onstart

Step 5 : You might be prompted to enter your username and password to re-establish connection for Remote Desktop.

Some might receive an error trying to sync time, for example : “RPC Server is Unavailable”, you should use the following to troubleshoot :

A. Use the following command to Stop the Windows Time Service (WTS) :

net stop W32Time

B. Use the below command to Unregister the WTS :

w32tm /unregister

C. Following is the command that would help you re-register the WTS :

w32tm /register

Note: You might at times be required to reboot the server before re-registering the service.

D : Re-initiate the WTS and ensure that the service is running well, use the following command for the same:

net start W32Time sc query W32Time

Cloud Hosting Servers