From: John Buswell <buswellj@carbonmountain.com>
To: Alex Hermann <alex@speakup.nl>
Cc: kvm@vger.kernel.org
Subject: Re: Synchronized time with kvm_clock
Date: Mon, 26 Apr 2010 10:32:51 -0400 [thread overview]
Message-ID: <4BD5A413.50709@carbonmountain.com> (raw)
In-Reply-To: <201004261201.38221.alex@speakup.nl>
Alex,
You don't need to run ntp on each guest. You can enable rtc support in
the guest kernel and on the hypervisor. Run ntp client on the hypervisor
via cron, and use hwclock -w on the hypervisor after you run ntp, to
sync the hardware clock to the system clock (which is now updated by
ntpdate). On the guests, periodically run hwclock -s to set the system
clock from the hw clock.
This seems to work extremely well, the clocksource on the guests as
kvm_clock, and as long as you have the clocksource as hpet or acpi_pm on
the hypervisor, there doesn't seem to be any problems with keeping time.
The only thing I've noticed is that when you reboot, the very first
guest will have the wrong time on boot, so the uptime is messed up.
Regards
Alex Hermann wrote:
> On Monday 26 April 2010, I wrote:
>
>> host:
>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource
>> tsc
>>
>> guest:
>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource
>> kvm-clock
>>
>
> Forgotten some info which might be essential:
>
> Kernel (host and guest): 2.6.32-trunk-amd64
> qemu-kvm: 0.12.3+dfsg-4
>
>
> Please keep me on the cc, I'm not on the list.
>
--
John Buswell
CEO, Carbon Mountain LLC
http://www.carbonmountain.com
next prev parent reply other threads:[~2010-04-26 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 9:33 Synchronized time with kvm_clock Alex Hermann
2010-04-26 10:01 ` Alex Hermann
2010-04-26 14:32 ` John Buswell [this message]
2010-04-26 16:43 ` Athanasius
2010-04-26 17:07 ` John Buswell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BD5A413.50709@carbonmountain.com \
--to=buswellj@carbonmountain.com \
--cc=alex@speakup.nl \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.