[libvirt-users] time setting after suspend/resume

Bill Kenworthy billk at iinet.net.au
Fri Oct 3 00:57:27 UTC 2014


On 02/10/14 21:02, Eric Blake wrote:
> On 10/02/2014 04:01 AM, Martin Kletzander wrote:
> 
>>>> 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.
>>>
>>> Umm, I have a problem with that statement.  Anything that requires guest
>>> interaction (which guest-agent set-time does) must NOT default to being
>>> automatic; it is only safe to enable if explicitly allowed.  What is the
>>> domain XML that must be explicitly set in order to turn on automatic
>>> time-set after resume?
>>>
>>
>> Oh, sorry, my fault.  I was under the impression that Michal created
>> the API especially for this purpose, but looking at the code it's not
>> done automatically.
> 
> At one point, I seem to recall a proposal of adding an <on_resume> tag
> to domain xml that could explicitly request time resync each time the
> domain is resumed; but I don't know if anyone implemented it yet.
> 

Hi Eric, I tried your patch on 1.2.6 ... appeared to work if
qemu-guest-agent was installed, libvirt exited on resume if it wasn't
(both windows and linux VM's) - need to understand the code better as
there were some changes in 1.2.6 that probably impacted it.

BillK






More information about the libvirt-users mailing list