Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Is it competing with NTP on DOM0. All the instructions I have seen suggest not running NTP on virtual clients. –  BillThor Apr 1 '11 at 20:17

3 Answers 3

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.

share|improve this answer

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
share|improve this answer

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.

share|improve this answer
    
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 2 '11 at 0:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.