Wednesday, October 6, 2010

Solving time drift problem on Ubuntu VMWare Guest

I have an Ubuntu VMWare guest, and having trouble with time drift.
After a bit twiddling with ntp synchronization and still getting unacceptable time drift,
finally I read a post in :

Subject: Please recommends open-vm-source
Date: Fri, 28 Mar 2008 21:13:22 +0900
I had a same problem, and resolved following commands:

* sudo aptitude purge open-vm-tools
* sudo reboot
* sudo aptitude install open-vm-source
* pager /usr/share/doc/open-vm-source/README.Debian
* sudo module-assistant prepare open-vm
* sudo module-assistant auto-install open-vm
* sudo aptitude install open-vm-tools
* sudo reboot

I done the steps above, and it seems to work perfectly.
Oh, I didn't do the reboot parts nor the pager one.

EDIT: Seems that its not enough. I have a AMD Phenom x4 CPU, which have some anomalies in regard to CPU clock speed.
The problem is, the CentOS 4.6 Host detected that the CPU have clock speed 1100MHz, in reality the CPU have 2200MHz clock. So, imitating this post, I must tell VMware server the real maximum clock:

vi /etc/vmware/config

edit the file so it resembles these lines:

host.cpukHz = 2200000
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"

And make sure ntpd runs to handle the small drifts that still occurs.