[ntp:questions] ntp or other time stuff on virtual server?

George R.Kasica georgek at netwrx1.com
Tue Nov 18 12:42:14 UTC 2008

On 17 Nov 2008 23:08:21 GMT, Steve Kostecke <kostecke at ntp.org> wrote:

>On 2008-11-17, David Woolley <david at djwhome.demon.co.uk> wrote:
>> Unruh wrote:
>>> A question has come up on another newgroup whethr or not the time can
>>> be disciplined via ntp (or chrony) on a virtual server.
>> You should discipline the host and run vmware tools or equivalent on
>> the guests.
>> A link to the VMWare paper on this was posted last week.
>As a courtesy to our many readers, here's the link:

We're running about 80-100 VMware linux and Windows servers here under
both 2.5.5 and 3.0.3 (though 3.0.3 is far better as is 3.5 which we
will be going to around 1/09) and we've had great success with a cron
script and vmwaretools (given vmwaretools won't step BACK if you're
running fast from what their support tells us).

The script is in /etc/cron.hourly and its a one liner called timefix
for us and its basically this

ntpd -q

make sure you have ntpd TURNED OFF on the server and we see precisions
easily within 0.10 second. Good enough to get LDAP working etc. in
this environment. I wouldn't use a VM as a NTP server but there's no
reason not to use ntp on it to keep it in sync with vmware tools and
ntp. Also, make sure that you have the TimeSync=True set in the vmware
config there's a command line that will do this for you as well that
you can run from the vm guest along with the step to add clock=pit to
your linux kernel boot lines.

2) Turn off ntpd on new vitual machine
chkconfig --level 2345 ntpd off
/etc/init.d/ntpd stop

4) check kernel lines for clock=pit
vi /boot/grub/grub.conf
add them if not there

5) Check VMware setting for tools.timesync=true in vmx file
run the following on linux system to set it

vmware-guestd --cmd 'vmx.set_option synctime 0 1'

Hope this helps someone some, it works for us, but your results may
vary. Feel free to write me back off list with any questions.


More information about the questions mailing list