Time drift in Windows 7 Guest

pmuser82

New Member
Feb 8, 2018
2
0
1
35
Hello.

I'm using Proxmox 5.1-43, and I am experiencing a time drift in my Windows 7 guest. The time appears to be running too fast.

I was wondering how to fix this without using NTP.
I am running time sensitive applications in my guest and this time drift is throwing them all out of whack.
NTP is not an option as the time drift is significant over a short period of time (30~60 second time drift over the period of 10 minutes).
If I used NTP, it would roll my time back a significant amount every time I synced - this will throw my time sensitive applications even more out of whack.

According to mailing lists from 2012, Proxmox should not be using HPET in Windows 7 guests - so it cannot possibly be HPET (unless that is a lie?).
I already tampered with the QEMU arguments in /etc/pve/qemu-server/(serverid).conf to attempt to disable HPET just to make sure. Unfortunately, this did not fix the problem.

Currently, I have NTP syncing every 10 seconds...which is causing significant CPU usage, but at least keeps the time in check for short periods. Unfortunately, this isn't enough - it causes major problems with my software.

The time drift does not occur on Linux guests, only in QEMU guests.

I have also already referred to https://pve.proxmox.com/wiki/Guest_Time_drift and done what it instructed.
This did not fix the problem.

Additionally, I have searched mailing lists and the forums for a solution - but to no avail: the problem is still persistent.

This forum post is my last resort.
Any help would be appreciated.
 
Last edited:
A time drift will always occur on virtual systems, the load of the underlying host influences the cpu cycles inside the vm. To work with time sensitive applications inside a VM you need to install a ntp server (in hardware) on your network as time source and a ntp server inside the VM that syncs from that local source. The ntp server or possibly client inside the VM needs to be able to drift the clock and not hard set it.
 
A time drift will always occur on virtual systems, the load of the underlying host influences the cpu cycles inside the vm. To work with time sensitive applications inside a VM you need to install a ntp server (in hardware) on your network as time source and a ntp server inside the VM that syncs from that local source. The ntp server or possibly client inside the VM needs to be able to drift the clock and not hard set it.
The problem does not occur this seriously on a Windows Server 2012 guest on the same hardware, despite having the same CPU load (my CPUs are at 50% 24/7).

I don't think this is a load issue, as I would assume a load issue would cause the clock to go slower, not faster.

Additionally, this doesn't occur on Proxmox 3.4 on the same hardware (with even more CPU load).
Furthermore, I am already using NTP. My NTP client is set to sync every 15 seconds - this is not enough.

I am unsure of how to make NTP drift the clock in Windows 2003 or Windows 7. Using the built in NTP client, it will always hard set the clock back by a second or two each sync.

The hard resetting and rate of error with the clock is what causes problems with my time-sensitive applications.
They do not care about correctness of time, but rather consistency of time.
If the time is consistently wrong, it would not be a problem.
 
Last edited:
It depends on the OS, how it handles the ticks and its accumulation, the clock might appear faster, when the accumulated ticks are thrown away and the time is just hard set.

Many things happend between 3.4 and 5.1, I can't say what would make the difference.

That doc provides registry and command line settings for the w32tm, the w32tm works different from the ntp client in Windows.
https://docs.microsoft.com/en-us/wi...rvice/windows-time-service-tools-and-settings

I agree for time sensitive applications consensus is more important then actual accuracy.