Fix Drifting Clock in VMWare (Linux Host, Windows Guest)

I have a Windows virtual machine on my office computer running in VMWare Server. The real computer runs Ubuntu Linux. I’ve had a nagging problem with the clock in the virtual machine. It always registers the correct time when I boot up the virtual machine, but then it invariably drifts — sometimes hours in single work day. I can’t remember whether it drifts ahead or back or in both directions.

1. Ensure that you have VMWare Tools installed in the Windows Guest

If you don’t have VMWare Tools running, all bets are off.

2. Disable Windows Time Service

I tried was disabling the service called Windows Time found Control Panel → Administrative Tools → Services. I don’t remember where I picked up this hint [citation needed]. So far this change has failed to fix my problem on its own.

3. Tell VMWare Server your Host’s maximum CPU frequency


View /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq on the host. You will find a single line giving the maximum speed in kilohertz. Call that MAXKHZ. Now add these lines to /etc/vmware/config on the host, substituting your actual value for MAXKHZ:

host.cpukHz = MAXKHZ
host.noTSC = TRUE
ptsc.noTSC = TRUE

Then shutdown any virtual machines and restart VMWare Server with this command:

sudo /etc/init.d/vmware restart

I presume that step 2, and of course step 1, are required for step 3 have the correct effect. As of 28 December, have implemented step 3 right now, and I’ll see how it works after a few days.

Leave a Reply

Please view the Comment Policy before submitting a comment.

Your email address will not be published. Required fields are marked *