Re: Time and KVM - best practices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dor Laor wrote:
> On 03/21/2010 01:29 PM, Thomas Løcke wrote:
>> Hey,
>>
>> What is considered "best practice" when running a KVM host with a
>> mixture of Linux and Windows guests?
>>
>> Currently I have ntpd running on the host, and I start my guests using
>> "-rtc base=localhost,clock=host", with an extra "-tdf" added for
>> Windows guests, just to keep their clock from drifting madly during
>> load.
>>
>> But with this setup, all my guests are constantly 1-2 seconds behind
>> the host. I can live with that for the Windows guests, as they are not
> 
> Is it just during boot time? If you run ntpdate after the boot inside
> the guest, does the time is 100% in sync with the host from that moment on?
> 
> Glauber once analyzed it and blames hwclock call in rc.sysinit
> 
>> running anything that depends heavily on the time being set perfect,
>> but for some of the Linux guests it's an issue.
>>
>> Would I be better of using ntpd and "-rtc base=localhost,clock=vm" for
>> all the Linux guests, or is there some other magic way of ensuring
>> that the clock is perfectly in sync with the host? Perhaps there are
>> some kernel configuration I can do to optimize the host for KVM?
> 
> Jan is the expert here, but last I checked clock=vm is not appropriate
> since this is virtual time and not host time - if qemu is
> stopped/migrated you won't notice it with virtual time withing the guest
> but the drift will grow.

Don't know what Windows does with the RTC, but the idea behind -rtc
clock=host is to provide an accurate time source to guest without
paravirtualized guest kernel drivers or an ntp installation in the
guest. Last time I checked, hwclock run in a Linux guest was in sync
with the host system time.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux