[CentOS] timekeeping on VMware guests

nate centos at linuxpowered.net
Wed Oct 14 00:31:03 UTC 2009


Carlos Santana wrote:
> Howdy,
>
> I am having time-drift issues on my CentOS VM. I had referred to
> following documentation:
> http://wiki.centos.org/TipsAndTricks/VMWare_Server , however it didn't
> help. I used kickstart for creating this VM and I am listing important
> steps in ref to timekeeping issue. Any comments or suggestion would be
> appreciated.

[..]
> VMware Tools not installed.

You should certainly install vmware tools, and enable time sync to
the guest. Also don't run an ntp server in a Vmware VM.

I had an issue on my system running Debian and VMware server, I think
it was a hardware/bios issue but the thing was the host system detected
the clock speed of the hardware at 1/2 the proper speed. Which caused
the host OS clock speed to double. Which wrecked havok in the VMs. Once
I loaded the 'p4-clockmod' module that 'fixed' the clock speed in the
host and I restarted the guest VMs and things were good after that.

Another thing to check is to make sure the 'rtc' driver is loaded,
my recent vmware server experience is limited to running it on
Debian(have it on 2 systems), so I can't speak to running it on top
of CentOS. Most of my ESX guests are CentOS though.

Another thing I do is have ntpdate run in cron every so often to
do another 'sync' to the host, typically once every 5 minutes
I found that in my experience at least there is still some drift
over time without doing that even with vmware tools time sync
enabled. I do the same on guests running on ESX(roughly 300 of
them).

I have found on ESX at least, haven't tried any other version
of vmware, but on ESX with a VMI enabled kernel(unfortunately none
of the RHEL4/5 kernels are VMI-enabled) with paravirtualization
you can run an ntp server in the guest. I run dedicated Fedora 8
VMs with ntp servers(my vmware servers sync against those VMs),
for this purpose. I know paravirtualization is going away in
VMware at some point, hoping to find another solution before
that happens.

nate



More information about the CentOS mailing list