Achieve Higher Degree of Time Synchronization Accuracy: Precision Time for Windows
Traditionally, utilizing NTP and Active Directory for time sources is a common practice. While they are mostly accurate, they can sometimes offer you a bit too much jitter because of a high stratum value and time synchronization issues. In a highly time-sensitive environment like financial institutions, this situation can be quite dangerous. Considering this, VMware has introduced a new precision time architecture that allows virtual machines to acquire host time over a low-overhead and extremely low jitter VM-Hypervisor interface.
So, What is Precision Time for Windows, and how does it work?
Introduced in vSphere 7U2, Precision time for windows allows VMs to sync their time with the ESXi time over a VMware proprietary channel with minimal jitter. This feature is only available for Windows 10/2016 and above platforms.
Windows Time Service (W32Time)
W32Time is Microsoft's native time synchronization service for Windows, with built-in support for NTP. It was primarily developed for synchronizing host clocks in an Active Directory domain for supporting authentication protocols. Over time, its scope has grown to support time-sensitive applications.
W32Time has a plugin-based architecture. One or more DLLs can register as time providers. One such provider is "NtpClient," available by default for time synchronization with NTP servers. When multiple providers are present, W32Time determines which one to use, depending on the time provider's reliability and accuracy. The API for implementing plugins is publicly documented here.
VMware Time Provider (vmwTimeProvider)
"vmwTimeProvider " is the new W32Time plugin, shipped with VMware Tools for Windows-based VMs. It provides time from precision clock virtual device to the W32Time.
Precision Clock is a virtual device introduced in vSphere 7.0. It provides VM access to the system time of the ESXi host. It bypasses the virtual and guest networking stack and leverages a dedicated VM-Hypervisor proprietary paravirtual channel to offer better time synchronization accuracy.
vmwTimeProvider is a user-space plugin. Generally, a driver would be required to access a device. However, the precision clock supports a VMware proprietary paravirtual interface accessible from userspace. Using this paravirtual interface precludes any performance benefits of using Memory-mapped I/O (MMIO) based time registers optimized for fast reads.
Precision Clock is backed by a reference time source in the hypervisor providing clock parameters using which current accurate time can be derived. Once such time source in the VMkernel is called HyperClock (for Hypervisor Clock adapter) that provides VMkernel system time. So, by disciplining VMkernel system time using the Precision Time Protocol (PTP), Precision Clock devices backed by HyperClock can provide PTP synchronized time to virtual machines.
vmwTimeProvider plugin is part of VMware Tools. It is not selected for installation by default. Users must opt-in explicitly selecting the plugin for installation. However, if users select “Complete install” the plugin gets installed by itself.
With Precision Time for Windows, VMs running Windows OS can achieve the highest degree of time synchronization accuracy. Its pluggable architecture provides a high-quality alternative to traditional time sources such as NTP and Active Directory.