* Time sync in KVM Guest
@ 2011-06-22 3:17 Chaitra Gorantla
2011-06-22 8:19 ` Dor Laor
0 siblings, 1 reply; 4+ messages in thread
From: Chaitra Gorantla @ 2011-06-22 3:17 UTC (permalink / raw)
To: KVM devel mailing list
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.
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?
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"
______________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Time sync in KVM Guest
2011-06-22 3:17 Time sync in KVM Guest Chaitra Gorantla
@ 2011-06-22 8:19 ` Dor Laor
2011-06-23 6:31 ` Chaitra Gorantla
0 siblings, 1 reply; 4+ messages in thread
From: Dor Laor @ 2011-06-22 8:19 UTC (permalink / raw)
To: Chaitra Gorantla; +Cc: KVM devel mailing list
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Time sync in KVM Guest
2011-06-22 8:19 ` Dor Laor
@ 2011-06-23 6:31 ` Chaitra Gorantla
2011-06-23 9:22 ` Dor Laor
0 siblings, 1 reply; 4+ messages in thread
From: Chaitra Gorantla @ 2011-06-23 6:31 UTC (permalink / raw)
To: dlaor@redhat.com; +Cc: KVM devel mailing list
Thanks for the information.
Is there any way to calculate the delta between host and the guest?
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
______________________________________________________________________
______________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Time sync in KVM Guest
2011-06-23 6:31 ` Chaitra Gorantla
@ 2011-06-23 9:22 ` Dor Laor
0 siblings, 0 replies; 4+ messages in thread
From: Dor Laor @ 2011-06-23 9:22 UTC (permalink / raw)
To: Chaitra Gorantla; +Cc: KVM devel mailing list
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-23 9:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 3:17 Time sync in KVM Guest Chaitra Gorantla
2011-06-22 8:19 ` Dor Laor
2011-06-23 6:31 ` Chaitra Gorantla
2011-06-23 9:22 ` Dor Laor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox