Successful time keeping in a Virtual Machine can be a bit confusing. At times I have been told to use Vmware Tools to sync time between the Guest and the Host, and at time I have been advised to avoid this functionality and use NTP. The following information is direct from a VMware KB article (updated, 4/16/2010) so I am going to follow their lead on this and use NTP exclusively.
First off VMware advises using the NTP service to keep time in sync, but it suggests
using an additional kernel parameter that you add to your grub.conf. See the KB Article for more info on how to do this.
- notsc for RHEL/Centos 4.6 64bit
- notsc divider=10 for RHEL/Centos 5.3 64bit
Note that there are no additional params needed for 5.4
Also, inside the ntp.conf the following line should be added to the top of the file.
tinker panic 0
This configuration directive instructs NTP not to give up
if it sees a large jump in time. This is important for coping with large
time drifts and also resuming virtual machines from their suspended state.
It is also important not to use the local clock as a time source, often
referred to as the Undisciplined Local Clock. NTP has a tendency to fall
back to this in preference to the remote servers when there is a large
amount of time drift.
An example of such a configuration is below. You should comment out both
fudge 127.127.1.0 stratum 10
Also, if you are using ntp, you want to make sure that you disable
Vmware tools time sync. You can do so with the following command via the
vmware-guestd –cmd “vmx.set_option synctime 1 0”