Hi there,
I have a CentOS 5.7 VM running on a Hyper-V server. The integration tools are installed and the VM is running fine with the exception of the time.
hwclock always returns the correct time but date does not. Depending on how long I leave it for I have seen it get 7 hours ahead of the real time and ahead of hwclock.
In my research I have found that the tinker panic 0 setting should be used when running ntpd on VMs. I have also disabled the local clock as a source.
My ntp.conf is the following
Code:
tinker panic 0
restrict default limited kod nomodify notrap nopeer noquery
restrict 127.0.0.1
server 0.cr.pool.ntp.org
server 3.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
logfile /var/log/ntp.log
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
My ntp/step-tickers is as follows
Code:
server 0.cr.pool.ntp.org
server 3.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
and the drift file is 0.000
When I run ntpdate with no options I get a message
Code:
22 Oct 20:32:51 ntpdate[31017]: no servers can be used, exiting
but when I run it with one of the pool servers it works
Code:
ntpdate 3.north-america.pool.ntp.org
22 Oct 20:34:08 ntpdate[31077]: step time server 129.250.35.250 offset -7.941339 sec
ntpd appears to start fine but I don't know why ntpdate always has the same can't find host server message
Code:
Oct 22 20:35:05 localhost ntpdate[31350]: can't find host server
Oct 22 20:35:05 localhost last message repeated 2 times
Oct 22 20:35:07 localhost ntpdate[31350]: step time server 200.59.16.50 offset -1.483682 sec
Oct 22 20:35:07 localhost kernel: dahdi: Detected time shift.
Oct 22 20:35:07 localhost ntpd[31354]: ntpd 4.2.2p1@1.1570-o Sat Dec 20 02:52:11 UTC 2014 (1)
Oct 22 20:35:07 localhost ntpd[31355]: precision = 1.000 usec
Oct 22 20:35:07 localhost ntpd[31355]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Oct 22 20:35:07 localhost ntpd[31355]: Listening on interface lo, 127.0.0.1#123 Enabled
Oct 22 20:35:07 localhost ntpd[31355]: Listening on interface seth0, 10.10.20.200#123 Enabled
Oct 22 20:35:07 localhost ntpd[31355]: Listening on interface seth1, 10.10.10.60#123 Enabled
Oct 22 20:35:07 localhost ntpd[31355]: Listening on interface seth2, 190.7.216.72#123 Enabled
Oct 22 20:35:07 localhost ntpd[31355]: kernel time sync status 0040
When ntpd has been running for a while I query it and get the following
Code:
[root@localhost plugins]# ntpstat
unsynchronised
time server re-starting
polling server every 64 s
[root@localhost plugins]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
barva.crisp.cr 200.59.16.50 2 u 21 64 7 116.230 -1813.2 1640.14
x.ns.gin.ntt.ne 236.42.142.144 2 u 19 64 7 51.159 -3449.2 2616.14
209.118.204.201 128.9.176.30 2 u 18 64 7 126.849 -3480.0 2614.83
so it seems like it isn't actually working properly.
I've spent several hours researching this and trying everything I can think of but I'm out of ideas. Any help would be greatly appreciated.
Thanks,
Kevin