Skip to contentSkip to conversation

Is ntpd in guest necessary?

DISCUSSION Michael Tokarev 4 participants 5 messages Nov 13, 2008 – Nov 17, 2008 KVM

lore
Share & tools
lore
#0 lore raw

A question that I asked on irc many times, but got no answer..

Giving guest linux with CONFIG_KVM_TIME set, is it necessary to run ntpd in it for accurate time, or ntpd on host is sufficient?

And the same, but without CONFIG_KVM_TIME ?

Thanks!

/mjt

#1 lore raw
Quoted 8 lines · Michael Tokarev

A question that I asked on irc many times, but got no answer..

Giving guest linux with CONFIG_KVM_TIME set, is it necessary to run ntpd in it for accurate time, or ntpd on host is sufficient?

And the same, but without CONFIG_KVM_TIME ?

What was your experience when you tested with each config?

Signature · 1 line
David.
#2 lore raw
In reply to Michael Tokarev
Quoted 9 lines · Michael Tokarev

A question that I asked on irc many times, but got no answer..

Giving guest linux with CONFIG_KVM_TIME set, is it necessary to run ntpd in it for accurate time, or ntpd on host is sufficient?

And the same, but without CONFIG_KVM_TIME ?

In theory, CONFIG_KVM_CLOCK should avoid the need for ntp. Let us know if you get different results.

Signature · 1 line
error compiling committee.c: too many arguments to function
#3 lore raw
Quoted 2 lines · you

In theory, CONFIG_KVM_CLOCK should avoid the need for ntp. Let us know if you get different results.

I've been running a VM for a couple of days with a 2.6.27 kernel and CONFIG_KVM_CLOCK and the clock is synchronized. Is there a driver we could use on Windows to keep the clock synchronized there as well?

#4 lore raw
In reply to Avi Kivity
Quoted 11 lines · Avi Kivity
Quoted 8 lines · Michael Tokarev

A question that I asked on irc many times, but got no answer..

Giving guest linux with CONFIG_KVM_TIME set, is it necessary to run ntpd in it for accurate time, or ntpd on host is sufficient?

And the same, but without CONFIG_KVM_TIME ?

In theory, CONFIG_KVM_CLOCK should avoid the need for ntp. Let us know if you get different results.

Well. The question was not come from nowhere.
It *seems* like it is working, but somewhat.. strange. I.e., when the time steps on the host (for whatever reason), it stays the same on guests, at least for some time. Later on it syncronizes, *sometimes*, but not always. I tried to reproduce this unsyncronization (hence the delay with replying), but can't do it easily "on demand". Maybe I were just dreaming at the time I saw it, but I don't think so. Or maybe something has changed in recent kernels/kvm so that it does not happen any more. That's why I asked in the first place.

In short: with CONFIG_KVM_TIME set, it *seems* to work, but I'm not 100% sure still. The question was if it *supposed* to work in the first place, and you answered that.

And withOUT CONFIG_KVM_TIME, it stays unsyncronized.

Thanks!

/mjt