I have a few Debian XEN virtual machines and upgraded them to wheezy(I need the 3.2 kernel for a project). Everything was okay until I rebooted on of the machines.

My current problem is, that ntpdate sets a wrong date after booting, which has severe implications on the application that is running on the VMs(crashes, currupt data, etc. - time is important on those servers).

Shortly after boot I ran the ntpdate command two times - with the following (confusing) output:

$> ntpdate server1 server2 server3

9 Apr 20:42:26 ntpdate[2371]: step time server x.x.x.x offset 83.293954 sec

$> ntpdate server1 server2 server3

9 Apr 20:40:45 ntpdate[1800]: step time server x.x.x.x offset -83.294240 sec

After those two executions, ntpdate works just as always, returning offsets less than .0001 seconds.

This problem is the same on all VMs in the cluster, just that the time offset differs. I have seen a server syncing ~2800 seconds like this, so the 83 seconds in the sample above are pretty low values.

Is there any way to tell why ntpdate is setting the time forward and shortly afterwards backward again?!

Edit: The time on Dom0 is correct and also synced.

  • Check the time of dom0 – kofemann Apr 9 '13 at 18:59
  • Already checked, the time on Dom0 is correct. – Izzy Apr 9 '13 at 19:04
  • Does the server always reboot with the same 83 seconds offset? Or is it random? – Marcel Apr 10 '13 at 15:01
  • This particular server has always ~83 seconds. It seems to differ between VMs, but not much and only between VMs, not between reboots. – Izzy Apr 10 '13 at 16:48
  • What time difference do you get when looking at date before and after the second ntpdate? – Nils Apr 17 '13 at 15:23

I think you hit the same issue like here.

The time of the DomU is possibly coupled to the Dom0-time. You need to decouple it before using ntpd or ntpdate.

| improve this answer | |
  • I'm afraid it is not. The time on Dom0 is just fine and the VMs are decoupled. ntpdate also works, it's just the first time ntpdate runs after a reboot it sets a large offset and on the next run resets it. – Izzy Apr 17 '13 at 14:28
  • @MKzero did the step-time finish before you fired the next ntpdate? – Nils Apr 17 '13 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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