VMware Cloud Community
id000
Contributor
Contributor

Time sync in Debian guest

Hello,

   I have various virtual servers with the vmware tools installed (VMwareTools-8.6.0) under Debian 6.0 x64 and these are running over physical host with ESXI 5.0.0.

   All the ESXI have ntp configure and working (tested that this is ok), and, noramally, the vmware tools work with the time sync, but, after a time, some virtual servers start a delay in time, a few minutes, 1-5, differing these time between virtual machines running over the same ESXI.

   If i restart the vmware tools in the guests, the time syncs perfect, but why don't do this automatically?

   I think various things:

   1.- Why the vmware tools not sync correctly the date?

   2.- Can I do a vmwre tools restart every night for keep the time sync? this have an other troubles?

   3.- What is best, vmware tools or an ntp service?

   4.- According to  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100642... why the vmware tools are bad for this reason?

Thanks,

0 Kudos
2 Replies
vmroyale
Immortal
Immortal

If i restart the vmware tools in the guests, the time syncs perfect, but why don't do this automatically?

VMware Tools should sync once a minute, as long as you have periodic time synchronization enabled for these VMs. You can check this with the following command in the guest OS: vmware-toolbox-cmd timesync status

1.- Why the vmware tools not sync correctly the date?

Check to see if periodic time synchronization is enabled. Also make sure that only one time service is being used. You don't want both VMware Tools and NTP fighting to set the clock.

2.- Can I do a vmwre tools restart every night for keep the time sync? this have an other troubles?

You can do this, but I don't like this as a workaround. See next response.

3.- What is best, vmware tools or an ntp service?

VMware recommends using the native time functions of the guest OS - NTP in this case. I would go this route.

4.- According to  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100642... why the vmware tools are bad for this reason?

I think the key thing is to pick one method (VMware Tools or NTP) and rely on it. Definitely don't have both trying to do the same job. I prefer to use NTP. Check out http://kb.vmware.com/kb/1189 for how to disable periodic time synchronization, if you want to go this route.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Borja_Mari
Virtuoso
Virtuoso

Hi,

like already was commented, the best practises to sync the time inside the guest is using methods like ntpdate or ntpd:

Note: VMware recommends you to use  NTP instead of VMware Tools  periodic time synchronization. NTP is an  industry standard and ensures  accurate time keeping in your guest. You  may have to open the firewall  (UDP 123) to allow NTP traffic.

If you use ntpd, remember to disable the vmware tools sync with the vmware host.

Regards,

Pablo


------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
0 Kudos