Follow the steps mentioned below to configure Time Sync for VM’s in Cloud. This will enable the administrators to synchronize the time by the node despite rebooting of the server.
Configuring Time Sync for Linux
Step 1 : Log into the server through SSH as administrator
Step 2 : Type the following command in the command prompt :
vmware-guestd –cmd “vmx.set_option synctime 0 1?
Configuring Time Sync for Cloud Hosting for Windows 2008 R2?
Step 1 : Access the server through RDP – Remote Desktop Protocol (This needs administratos rights on the server)
Step 2 : Go to the command prompt.
Step 3 : Type the following command:
w32tm /config /manualpeerlist:pool.ntp.org,0×8 /syncfromflags:MANUAL
net start w32time
Since this VM is within Hyper-V, it is essential to disable the time sync by going to VM settings >> Management >> Integration Services >> uncheck Time Synchronization.
Step 4 : Check if the VM syncs with the time on reboot, use the following command:
schtasks /create /tn TimeSync /tr “w32tm /resync” /sc onstart
Step 5 : You might be prompted to enter your username and password for re-establishing connection with the Remote Desktop.
It is also possible to get an error trying to sync time, for instance : “RPC Server is Unavailable”, in that case you can use the following commands for troubleshooting :
Stopping the the Windows Time Service (WTS)
net stop W32Time
Unregistering from the (WTS)
Re-registering in the WTS
Sometimes you might have to reboot the server prior to re-registering the service
In order to re-initiate the WTS and ensure that the service is running properly, you can use the command mentioned below:
net start W32Time sc query W32Time