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'm running KVM w/ centos 6.x.

My guest vm clocks are booting with a 1-2 second lag from their host. My clocksource for the host is ntp. My clocksource for the guest is "kvm-clock", but I need to run ntpd on the guest as well.

It takes roughly 3 minutes for ntpd to correct the time after boot. I'll see this in /var/log/messages

ntpd[1512]: time reset +1.217409 s

But, by this time, our application has already started and it doesn't handle the 1-2 sec time jump very well.

Is this clock difference between the host/guest normal? Is there a way to force the ntpd to set the time earlier in the boot process?

share|improve this question

If your application requires the clock to be synced, add ntp-wait to its init script before it is started. Usage is simple, but here is the man page.

EDIT: If you want to sync time as quickly as possible when booting the VM, before starting ntpd as a daemon, run sntp as explained in the documentation for Deprecating ntpdate.

share|improve this answer
that would work, however it takes ~3 minutes for ntpd to synchronize... which is a really long time. – timeout Apr 23 '13 at 16:07
This comment about sync time might be helpful for you. – sciurus Apr 24 '13 at 1:10

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.