public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dor Laor <dlaor@redhat.com>
To: Chaitra Gorantla <Chaitra.Gorantla@lntinfotech.com>
Cc: KVM devel mailing list <kvm@vger.kernel.org>
Subject: Re: Time sync in KVM Guest
Date: Wed, 22 Jun 2011 11:19:28 +0300	[thread overview]
Message-ID: <4E01A590.60906@redhat.com> (raw)
In-Reply-To: <AF0985D076EB244693F2CCD71AAB10BC0CD17EF30A@BLRINMSMBX01.bglrodc.lntinfotech.com>

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


  reply	other threads:[~2011-06-22  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  3:17 Time sync in KVM Guest Chaitra Gorantla
2011-06-22  8:19 ` Dor Laor [this message]
2011-06-23  6:31   ` Chaitra Gorantla
2011-06-23  9:22     ` Dor Laor

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=4E01A590.60906@redhat.com \
    --to=dlaor@redhat.com \
    --cc=Chaitra.Gorantla@lntinfotech.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox