Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Debian Squeeze VM that has suddenly chosen to jump it's date forwards just over a month, which seems to confuse it no end and cause it to require a hard reset (yikes!).

There is nothing unusual in the logs, except that the datestamp suddenly jumps (today back to 2005).

It's happened three times, so I don't think it's to do with the leap second issue as the last one of those was in July.

When it happened once I spent ages checking stuff but could not find anything, decided to forget it. But three times is becoming an issue on a production server.

Edits providing information requested in comments (thanks!):

I do not have control over the hypervisor, it is a hired VM.

# cat /sys/devices/system/clocksource/clocksource0/current_clocksource

# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
+grendel.exizten     2 u   29   64   77   14.811    1.778   1.744
*panoramix.linoc    2 u   32   64   77   19.729   -0.419   1.691
+robert.elnounch  2 u   27   64   77   17.762    0.600   1.722    3 u   31   64   77   27.214    3.575   1.638
share|improve this question
Please tell more about the virtualization technology you are using and what clocksource you are using (cat /sys/devices/system/clocksource/clocksource0/current_clocksource). – gertvdijk Nov 23 '12 at 9:42
Thanks @gertvdijk, output of that is kvm-clock – artfulrobot Nov 23 '12 at 9:46
Is a Vmware VM ? – Sacx Nov 23 '12 at 9:48
Do you have control over the hypervisor? Are you running NTPd in the machine? If so, which servers is it listening to (ntpq -p)? @Sacx no, it probably is KVM regarding the clocksource. – gertvdijk Nov 23 '12 at 9:51
I think you should contact your hosting provider. Maybe a live migration is causing this or it is hitting a bug in KVM somewhere. – gertvdijk Nov 23 '12 at 10:04
up vote 1 down vote accepted

I've seen several situations where NTP really doesn't like running in a VM. One provider advised me to stop running ntpd, and instead have something like this in /etc/cron.d/ntpdate:

* * * * * root /usr/bin/ntpdate your.ntp.server another.ntp.server > /var/log/ntpdate.log 2>&1

This make the clock on my VMs much more stable, and stopped ntpd from doing the sync-unsync-sync dance.

If you do this, remember to put something appropriate in /etc/logrotate.d to stop the logfile growing indefinitely.

share|improve this answer

Your Answer


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.