I have a handful of x86_64 Centos 5.1 guests running on ESX 3.5 hosts. In the rest of our environment, we use ntpd to keep our clocks in sync. For extra redundancy I also have vmware guests sync with the host as well. This works well for all our older 2.4 kernel guests, but the 2.6 kernel guests never actually sync with the ntp server. They just sit there in the .INIT. stage:
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.server .INIT. 16 u 80 128 0 0.000 0.000 0.000
ntp2.server .INIT. 16 u 81 128 0 0.000 0.000 0.000
ntp3.server .INIT. 16 u 81 128 0 0.000 0.000 0.000
ntp4.server .INIT. 16 u 81 128 0 0.000 0.000 0.000
As a work-around I have disabled ntpd on these CentOS 5.1 servers and have them run ntpdate every 5 minutes via a cron job.
Is there a better way to handle this situation? I'd prefer to have the guests configured the same as all my other servers, but if NTPD can't sync there's not much point in running it at all.
Hello,
Moved to Virtual Machine and Guest OS forum.
VMware Tools should keep the clock in sync for you without ntpd, but I have had simialr issues and used ntpdate to resolve them in the exact same fashion.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354
As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization
I did a little research on my own and found the VMWare white paper called "Timekeeping in VMWare Virtual Machines":
www.vmware.com/pdf/vmware_timekeeping.pdf
The short version for those of you who are interested (this applies to Linux guests):
Set up your host to sync with an external ntp server using ntpd
Don't use ntpd in your guests
Do configure vmware-toolbox to keep guest time in sync
As an added layer of protection, a 5 minute cronjob to sync time with your external NTP server is useful