From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: Time sync in KVM Guest Date: Thu, 23 Jun 2011 12:22:00 +0300 Message-ID: <4E0305B8.6090409@redhat.com> References: <4E01A590.60906@redhat.com> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM devel mailing list To: Chaitra Gorantla Return-path: Received: from mx1.redhat.com ([209.132.183.28]:26071 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758774Ab1FWJWD (ORCPT ); Thu, 23 Jun 2011 05:22:03 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 06/23/2011 09:31 AM, Chaitra Gorantla wrote: > Thanks for the information. > > Is there any way to calculate the delta between host and the guest? Use ntddate server The ntp server can either be on the host or anywhere else. > > On 06/22/2011 06:17 AM, Chaitra Gorantla wrote: >> Hi all, >> >> We are working on Fedora 15 Host. And the KVM is used to create Fedora 14 guest. >> The clock-source details are as below. >> >> Our Host supports constant_tsc. >> >> on HOST OS >> cat /sys/devices/system/clocksource/clocksource0/current_clocksource >> tsc >> >> on GUEST OS >> cat /sys/devices/system/clocksource/clocksource0/current_clocksource >> kvm-clock >> >> We are not having Wall-clock time Sync in Both Host and guest. >> The Time in Host OS lags behind guest by atleast 2 seconds. >> However, this time difference remains constant. > > That's good > >> Does this mean that the Host and Guest clocks are synchronized ? >> By using kvm-clock as clock source on the guest, the time sync should happen itself ? >> Please correct me if I am wrong... >> How exactly we can find the time difference between Host and guest? > > Usually Linux OS reads the rtc cmos to get the time when it boots. > Both the guest and the host do that using hwclock. > > From there own the time is tracked by the clock source as delta. > > It is recommended that both the guest and the host will run ntpd to keep > their time updated. That's the only thing that you're recommended to do. > > Thanks, > dor > >> >> Thanks in advance. >> >> >> >> The contents of this e-mail and any attachment(s) may contain confidential or privileged information for the intended recipient(s). Unintended recipients are prohibited from taking action on the basis of information in this e-mail and using or disseminating the information, and must notify the sender and delete it from their system. L&T Infotech will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in this e-mail" >> >> ______________________________________________________________________ >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > ______________________________________________________________________ > > ______________________________________________________________________ > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html