2

We have three CentOS 5.9 VMs on an ESX3.5 host.

Because of the nature of the services we provide it is required that the NTP time is synchronized and the time is correct on all three of them.

However one of them constantly drifts back each day for about 66 sec. So far none of us seems to understand as why is this happening.

We included the possibility that the VM may be somehow pulling the time from the host, however all of the three VMs have identical configuration settings and they did not have VMware tools installed.

Although I realize that this is probably a question of an internal matter and not to ask for on a forum, I would appreciate if anyone of you knows some CentOS NTP diagnostic routines that will help me to diagnose the problem and find a reliable solution.

I thank you for the assistance.

Spirit
  • 1,144
  • 7
  • 25
  • 45
  • 1
    Its not the solution to your problem, but I strongly suggest you install VMware tools, running VMs without it makes no sense. – ThatGraemeGuy Apr 03 '13 at 08:08

3 Answers3

2

If the clock drifts more than 500ppm in either direction, ntpd considers it insane and stops updating it. You will see a single log message when this happens (if you go looking for it). In this case you will need to use an alternate ntp client, such as chrony, which can be configured to continue to work in this scenario.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • @Michael_Hampton | Thank you for your answer. I wanted to try with alternate NTP client, however the clients that were using the VM did not wanted for us to go with anything 3rd party. In the end it turned out that it was the ESX host that was messing up with the time. See answer. – Spirit Dec 03 '13 at 14:10
  • In RHEL/CentOS 7, chrony is now the default NTP client, and it's in EPEL for previous versions. There's no real down side to using it, and Red Hat will happily support it. – Michael Hampton Jul 13 '15 at 13:27
  • Those ESX hosts are now history and all of the VMs were migrated to the new ESXi hosts – Spirit Jul 14 '15 at 14:16
1

I would suggest you some actions, cause i had the same problem.

  • Take a look on this Vmware KB about Timekeeping
  • Force the ntp sync daily on crontab restart + adding these parameters on /etc/sysconfig/ntp

    OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
    

I had exactly the same problem with ntp and CentOS, and even installing Vmware tools no difference was felt. I should make a try with openntp.

  • 1
    I tried this during the past few days and still nothing. I guess we will go with some other ftp client. Thanx for the answer thou :) – Spirit Apr 08 '13 at 15:10
1

In the end it turned out that it was the ESX Host that was messing with the time on the VM. The time of the ESX host was manually configured and was approx 60sec off the normal time. After we synchronized the host with an NTP server the problem disappeared.

I still ask myself how could a VM that does not have vmware tools installed to pull the time from the host - and only one VM out of all. I can only guess that it must be a bug of the ESX3.5

Spirit
  • 1,144
  • 7
  • 25
  • 45