On Mon, Sep 29, 2014 at 05:23:08PM +0800, Bill Kenworthy wrote:
On 29/09/14 16:28, Martin Kletzander wrote:
> On Fri, Sep 26, 2014 at 08:16:25AM +0800, Bill Kenworthy wrote:
>> Hi,
>> I am using libvirt with qemu/kvm with qemu-guest-agent and
>> suspend/save/resume linux and windows vm's. Time in Windows gets
>> handled fine with ntp but I can get neither ntp or chrony to sync after
>> resume without manually setting the time close to correct first.
>>
>> Searching has gotten me to the point where I can manually set the time
>> using qemu-guest-agent but I cant figure out how to get libvirt to
>> automaticly trigger this on resume. I am finding information saying it
>> works but not how, or that its still work in progress and not
>> implemented yet (but patches exist). Can someone either say "its not
>> working yet" or explain what I am missing please?
>>
>
> What version of libvirt are you using? Since 1.2.5 there's
> virDomainSetTime() API that can do this and since 1.2.8 it's called
> automatically after resume.
>
> Martin
Thanks Martin for replying.
I am using 1.2.6. I presume that there is no way to get 1.2.6 to
trigger it after resume (has to be manual) so I'll have to upgrade to 1.2.8.
Well, not in a supported way, but the only thing it does is call
"guest-set-time" in guest agent. And that you can do with virsh (or
API) yourself.
Martin