NTP Saga Ends
Thursday 24 April, 2008 - 21:32
Reading Timekeeping in VMware Virtual Machines :
VMware products use a patent-pending technique to allow the many timer devices in a virtual machine to fall behind real time and catch up as needed, yet remain sufficiently consistent with one another that guest software is not disrupted by anomalous time readings. In VMware terminology, the time that is visible to guests on their timer devices is called apparent time . Generally, all timer devices in a virtual machine operate identically to the corresponding timer devices in a physical machine, but they show apparent time instead of real time. …
p. 6
Apparent time is not good.
Because of the way that timer devices in a virtual machine may fall behind real time and then catch up later, standard clock synchronization software such as the Windows Time Service (W32Time) or the Network Time Protocol (NTP) does not work well when run in a virtual machine. If the virtual machine is aware that it is behind real time and is already delivering timer interrupts at a higher rate so that the guest clock can catch up to real time, running non-VMware clock synchronization software inside the guest at the same time may also advance the virtual machine's clock, causing it to end up ahead of real time.
p. 13
In other words, running NTP on a VM image is not a smart thing to do.
VMware Tools time synchronization is designed to be a second line of defense to deal with special cases where a guest operating system's clock falls behind real time despite the built-in catchup mechanism provided in the virtual machine. It is normal for a guest's clock to be behind real time whenever the virtual machine is stopped for a while and then continues running; in particular, after a suspend/resume, snapshot, disk shrink, or VMotion operation. These are the main cases that VMware Tools time synchronization is meant to handle. The guest's clock may also fall behind in less common circumstances, such as under heavy load when the guest has not been able to get enough CPU time to handle all its timer interrupts.
p. 14
Looks like I will have to install VMtools on penrith1 and penrith2, and stop NTP altogether. And I will have to live with the issue of VM Tools Taints the Kernel .
The conclusion is:
Timekeeping in virtual machines is a complex subject. ...
p. 25
Fools blunder in where angels fear to tread.
The action plan is:
-
chkconfig --level 12345 ntpd off (on central, penrith1, penrith2) service ntpd stop (on central, penrith1, penrith2)
- Install Vmtools on penrith1 and penrith2.
I will leave the
config.ini
in the
program files\vmware\workstation
because it is a solution to the cpuSpeedMismatch problem noted in
NTP Still Wrong
.