[ntp:questions] ntp in VM cannot synchronize

George R.Kasica georgek at netwrx1.com
Thu Jan 1 12:54:38 UTC 2009


On Wed, 31 Dec 2008 21:21:33 +0000, David Woolley
<david at ex.djwhome.demon.co.uk.invalid> wrote:

>TopCut GmbH / Ludwig Öfele wrote:
>> Hello everybody!
>> 
>> I am using a debian (testing) linux on a virtual machine of VMWare (in a
>> linux host).
>> I found, that the time in the VM was awfully wrong and hoped to fix this
>> with ntp.
>
>No.  Assuming VMWare, you fix the host machine with NTP, then use VMWare 
>tools, with the right options, to control the time on the guest.  Note 
>that, even then, there will be a large amount of jitter in the software 
>clock time on the guest, as time is virtualised.

WE run over 150 VMs under unix/linux where I work and about 20 ESX
servers (its actually my day job) so I might be able to help you.

1) Turn off ntpd on the VM TURN OFF NTPD. You don't want it running.
But make sure the ntp.conf is valid you will need it.

2) Make sure ntpd is working on the ESX Server itself.

3) put a short shell script in /etc/cron.hourly called say timefix
with the following in it and make it chmod 755 owned by root:

ntpd -q

That's it.

Then make sure vmware tools is installed and timesynch = true is On
the VM guest there's a command you can run to do this so no hacking of
configs needed: (You want to turn it ON so the first option)

GNU/Linux:
turn it on...
vmware-guestd --cmd "vmx.set_option synctime 0 1"

...and turn it back off:
vmware-guestd --cmd "vmx.set_option synctime 1 0" 


WE do this process here under 3.0.3 latest patches and are seeing sync
routinely < 0.05 seconds on amost if not all boxes.

YEll if you need more help in email.

George

-- 
===[George R. Kasica]===        +1 262 677 0766
President                       +1 206 374 6482 FAX 
Netwrx Consulting Inc.          Jackson, WI USA 
http://www.netwrx1.com
georgek at netwrx1.com
ICQ #12862186




More information about the questions mailing list