Time synchronization issues on Windows VMs with the 9.x Citrix VM Tools

Time synchronization issues on Windows VMs with the 9.x Citrix VM Tools

book

Article ID: CTX272319

calendar_today

Updated On:

Description

On Windows VMs with the xeniface 9.0.0.11 or 9.1.0.4 driver installed, the VM time can become unsynchronized when the time set by the Citrix VM Tools conflicts with the Windows VM's own time synchronization (for example, using Active Directory or NTP).

Resolution

The following workarounds are available for this issue:
 

Disable the Citrix VM Tools time synchronization


In this case, the Windows VM's time synchronization provides the correct time to the VM.


If you have the xeniface 9.1.0.4 (and later) driver installed on your Windows VM, you can use a registry key to disable time synchronization in the Citrix VM Tools.

 

  1. Open the Registry Editor of your Windows VM
  2. Go to the registry key \\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\xenagent
  3. Set a DWORD (32 bit) value named TimeSyncMode to 0


 Ensure that Windows time updates are enabled on your VM:

  1. Run the command W32tm /config /syncfromflags:ALL /update
  2. You can use the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config and the values MinPollInterval, MaxPollInterval, and SpecialPollInterval to set time service poll intervals.
  3. For these registry changes to take effect, restart the W32Time service: net stop w32time && net start w32time

 
If you have the xeniface 9.0.0.11 driver installed on your Windows VM, the TimeSyncMode registry key is not available. The only way to disable time synchronization is to disable XenAgent through the Service Manager window or by using the command sc config xenagent start=disabled.

However, without the XenAgent service, you cannot shut down or restart your VM from XenCenter. We recommend instead that you update your version of the xeniface driver to 9.1.0.4 (or later) and use the registry key as described in the preceding part of this section.
 

Disable the Windows VM's own time synchronization

In this case, the Citrix VM Tools time synchronization provides the correct time to the VM.


To disable time synchronization on your Windows VM, use the following commands:

w32tm /config /syncfromflags:no /update

net stop w32time && net start w32time


If you have the xeniface 9.1.0.4 (and later) driver installed on your Windows VM, you can use a registry key to ensure that time synchronization is enabled in the Citrix VM Tools.

  1. Open the Registry Editor of your Windows VM
  2. Go to the registry key \\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\xenagent
  3. Set a DWORD (32 bit) value named TimeSyncMode to 2
  4. You can use the DWORD (32 bit) value named TimeSyncInterval to set the time synchronization period in minutes.

Problem Cause

This issue is caused by two inconsistent methods of time synchronization being used on the same Windows VM: the Citrix VM Tools and the Windows VM's own time synchronization (for example, using Active Directory or NTP).

Additional Information

For more information about Active Directory time synchronization, see https://social.technet.microsoft.com/wiki/contents/articles/50924.active-directory-time-synchronization.aspx

For more information, about Windows time service settings, see https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings