Best Practice for the Windows Time (W32TIME) Service for RDSH and VDI workloads

by Jeremy Saunders on May 16, 2019

When using image deployment mechanisms for RDSH and VDI workloads, such as Citrix PVS, Citrix MCS and VMware View Composer, it’s extremely important to reconfigure the Windows Time (w32time) Service to ensure that the LastBootUpTime is accurate. If it’s not accurate, it effects monitoring, the correlation of log data, event triggers, etc.

The default Manual trigger of the Windows Time service is based on domain membership, which seems to cause issues as the image boots and changes name to the correct target name. Without having a deep enough understanding on the inner workings of these technologies, I can only assume that the default trigger of the Windows Time service is not compatible with the way the imaging mechanisms work on boot up to change the computer name and join to an Active Directory computer object. There may be a point during startup where Windows detects that it’s not domain joined and therefore stops the Windows Time service, which seems to throw the time out.

Here’s a screen shot from an image I built in Perth, Australia. Notice how the LastBootUpTime is several hours into the future as Perth is GMT +8.

Incorrect Windows Time At Boot - Australia

Here’s a screen shot from an image I built in Saskatoon, Canada. Notice how the LastBootUpTime is several hours into the past as Saskatoon is GMT -6.

Incorrect Windows Time At Boot - Canada

So to fix this we simply run a script in the master/gold image to…

  • Remove the trigger from the Windows Time (w32time) Service

sc triggerinfo w32time delete

  • Set the Windows Time (w32time) Service to start automatically

sc config w32time start= auto

Then the LastBootUpTime is accurate as seen in the following screen shot.

Correct Windows Time At Boot

Microsoft provides some different options here. However, I’m documenting this to provide discussion and guidance on how the Windows Time service should be configured for these use cases. From my findings tools such as the Citrix Optimizer and VMware OS Optimization Tool do not contain changes to this service.

I hope this helps.

Jeremy Saunders

Jeremy Saunders

Technical Architect | DevOps Evangelist | Software Developer | Microsoft, NVIDIA, Citrix and Desktop Virtualisation (VDI) Specialist/Expert | Rapper | Improvisor | Comedian | Property Investor | Kayaking enthusiast at J House Consulting
Jeremy Saunders is the Problem Terminator. He is a highly respected IT Professional with over 35 years’ experience in the industry. Using his exceptional design and problem solving skills with precise methodologies applied at both technical and business levels he is always focused on achieving the best business outcomes. He worked as an independent consultant until September 2017, when he took up a full time role at BHP, one of the largest and most innovative global mining companies. With a diverse skill set, high ethical standards, and attention to detail, coupled with a friendly nature and great sense of humour, Jeremy aligns to industry and vendor best practices, which puts him amongst the leaders of his field. He is intensely passionate about solving technology problems for his organisation, their customers and the tech community, to improve the user experience, reliability and operational support. Views and IP shared on this site belong to Jeremy.
Jeremy Saunders
Jeremy Saunders

Previous post:

Next post: