Jump to content
Updated Privacy Statement
  • 2

XenServer tools timesync disable

Patrik Nyberg


I recently encountered a very annoying problem on my Windows 10/Server 2016 VMs running on XenServer 7.1 CU1.

On startup of the VMs the time was advanced 54 minutes when XenInterface/XenAgent started, when the w32time service started on the VM the time was then synchronized to the DCs of the domain and was ok again.


My issues I got was that some of my VMs lost connection to the domain - because the time was off with more than 5 minutes, and this was happening randomly - depending on when the Xen Agents was starting. The impact for me was that the startup scripts configured in the domain was not running on the VMs...


My troubleshooting was to check NTP settings on the hosts, on the DCs and the HW clock on the Hosts - all to no avail - meaning no clock issues on any of them. Also the timeoffset on the VM metadata I tried to set differently - but also did not change the behaviour.


So in the end, my only workaround left was to try to disable the timesync between the VMs XenAgent (XenInterface) and the host. But no official documentation stated that this was possible..

However, after a bit of digging I found in the Xen source code for the XenAgent - it seemed there was a registry setting inside the VM that was checked for a specific value - if that was found it would synchronize the VMs' time with the host. So in order to disable that you can just set tha t value to anything else - or remove the value all together would also do the trick I believe.


The registry key/value to disable time sync with host (works on Windows 10 VMs (tested on 1709),  Server 2016, XenServer tools 7.1.1305, XenServer 7.1 CU1):





Default value is HostTime="UTC" - so set anything else than that - should disable sync with the host.


For me the problem went away completely and I have implemented this registry setting on all my VMs now.



Link to comment
  • Answers 57
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 0

Thanks for continually updating this thread, Mike. :108_metal:


Is this issue actually affecting virtually all versions of the XS management agent? The thread started out with v7.x of the management agent, and now it looks like v9.x of the agent has the same issues? Looking at my image, we're still using v7.2.15.37 of the agent, and v8.2.x of the drivers in our W10 image - no idea how the hell that happens, since that CTX article states that our agent should have v9.x drivers for W10.


We've been rolling with the following two keys in our images:



Now I'm wondering if I should a) install the latest agent listed in that CTX article (we're on XenServer 7.1 LTSR CU2), and b) if I do, which workaround is the best option (XS or Windows)? Or option c) leaving everything as-is for the time being...

Link to comment
  • 0

I have run through windows updates (had to run a few times to get all the updated Citrix Drivers if you have your vm's configured that way), and can say that my issues have been resolved with Time Sync issues on my vm's on both XenServer 7.X CU 2 / 8.1.x.  Been running over a week w/o issue.  would say it's fairly safe to upgrade now but still test in your own environment. 


Citrix actually had two issues.  One was with the earlier tools that came out earlier this year (or at least when I updated them) and the resolution was to get rid of UCT time in a couple of reg keys.  Then there was another update to management agent / tools that caused this more recent issue. 


But at least this point in time if you update your management agents / tools / Drivers from windows update those issues are fixed......


Thanks and good luck to everyone..



Link to comment
  • 0

Still seeing this issue with XenServer 8.2 and latest tools version in server 2016 (up to date patches) in Oct 2021 .  Was also still happening in April 2021 . 


HKLM\Software\Wow6432Node\Citrix\XenTools\     has   HostTime  but no value set

ditto for HKLM\Software\Citrix\XenTools\


Followed https://support.citrix.com/article/CTX272319

Set a DWORD (32 bit) value named TimeSyncMode to 0


Rebooted .  But upon restart of the xenAgent service, still seeing it adjust the time per an event log.  


It isnt adjusting by much but there should be NO adjustment. 


Source:        Microsoft-Windows-Kernel-General
Date:          3/27/2021 2:20:55 AM
Event ID:      1
Task Category: (5)
Level:         Information
Keywords:      Time
User:          SYSTEM
Computer:    blah 
The system time has changed to ‎2021‎-‎03‎-‎27T06:20:55.149000000Z from ‎2021‎-‎03‎-‎27T06:20:59.620491400Z.

Change Reason: An application or system component changed the time.

Edited by Michael Warrillow
updated for October
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...