0

I have a Xen Centos 5.5 server with ntpd working in virtual server.

NTP time sync seems not working.

I have disabled any firewall.

my grep -i ntpd /var/log/messages output:

Apr  1 16:15:47 posadadelpuerto ntpd[17635]: ntpd 4.2.2p1@1.1570-o Sat Dec 19 00:56:13 UTC 2009 (1)
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: precision = 1.000 usec
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface wildcard, ::#123 Disabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface eth0, fe80::216:36ff:fe5e:53f3#123 Enabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface lo, ::1#123 Enabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface lo, 127.0.0.1#123 Enabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: Listening on interface eth0, 192.168.0.100#123 Enabled
Apr  1 16:15:47 posadadelpuerto ntpd[17636]: kernel time sync status 0040
Apr  1 16:16:15 posadadelpuerto ntpd[17636]: frequency initialized 0.000 PPM from /var/lib/ntp/drift

Thanks for any help

roberto

quanta
  • 50,327
  • 19
  • 152
  • 213
Roberto
  • 87
  • 1
  • 7
  • Is it competing with NTP on DOM0. All the instructions I have seen suggest not running NTP on virtual clients. – BillThor Apr 01 '11 at 20:17

3 Answers3

1

By default the time of (pv) DomUs is linked against the time of the Dom0. So get your time right on the Dom0 and don't bother about ntp on the (para-virtualized) DomUs.

Nils
  • 7,657
  • 3
  • 31
  • 71
0

Can you show us the output from ntpq -p?

Is there a chance your NTP queries are getting blocked by an external firewall? That can still stop things, even if your local one is turned off.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
Christopher Karel
  • 6,442
  • 1
  • 26
  • 34
  • ntpq -p remote refid st t when poll reach delay offset jitter ==================================================================== core-vgg-1-lo0. 192.43.244.18 2 u 49 64 7 18.766 -26011. 4077.76 core01.ses.net. 146.164.48.5 2 u 47 64 7 24.993 -26013. 4129.70 – Roberto Apr 02 '11 at 00:31
0

I too had many ntp time sync issues with CentOs 5.5 on a virtual. Here are the changes I made to get it working:

/boot/grub/grub.conf: add the notsc divider=10 switches

title CentOS (2.6.18-194.32.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-194.32.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet notsc divider=10 
    initrd /initrd-2.6.18-194.32.1.el5.img  

/etc/ntp.conf: the minpoll/maxpoll settings are a bit agressive, so you may want to increase them.

tinker panic 0
restrict 127.0.0.1
restrict default kod nomodify notrap
server 0.us.pool.ntp.org minpoll 4 maxpoll 4
server 1.us.pool.ntp.org minpoll 4 maxpoll 4
server 2.us.pool.ntp.org minpoll 4 maxpoll 4
driftfile /var/lib/ntp/drift
server 127.127.1.0
fudge 127.127.1.0 stratum 10
Greg Askew
  • 34,339
  • 3
  • 52
  • 81