The problem

Running an NTP daemon in dom0 should keep the guest clocks accurate, if they have sysctl xen.independent_wallclock=0. I'm running openntpd on Debian etch dom0's and this is clearly not the case, as the domU's have been drifting minutes every month.

As far as I can see, the problem is that openntpd - as it should - uses adjtime() to slew clock changes instead of jumping the clock, but the Xen hypervisor's clock will not be updated by this.

The solution

I haven't found a non-ugly way to fix this. However, adding:

1 * * * * date -s "`date --rfc-3339=ns`" > /dev/null

to root's crontab has worked around it and the domU's are staying in sync. I'd be interested to hear of better solutions, or if a later kernel will fix this.

Questions, comments, patches? pelzi () pelzi ! net
pgp 1024D / 4AB10244 / 97BA 45C5 BF7D 4537 8CC1 DCF5 67D4 BD2D 4AB1 0244