[libvirt-users] Clock skew on Win10

Francesc Guasch frankie at telecos.upc.edu
Wed Apr 3 13:30:35 UTC 2019


El 1/4/19 a les 18:43, Alex ha escrit:
> Hi, I haven't received any replies to this, but I'm still having a
> problem with clock skew on Win10.
> 
> How can I troubleshoot this? I'm pretty sure the clock settings are
> correct from within Windows, but when the VM resumes from the host
> sleeping, the clock is off by some seemingly random number of hours.
> 
Hi Alex, I think your problem is very common and has no
easy solution. It is normal that the virtual machines have
not advanced the clock after hibernation. You have to run
a process that updates it or you can call it from a script.

We work with Perl and we ended up using the set_time function
to force it. It requires the vdagent installed in the virtual
machine . We call it after resume:


    $domain->set_time(time(), 0, 0);

You also need the guest agent channel in the XML definition
of the virtual machine

     <channel type='unix'> 

       <target type='virtio' name='org.qemu.guest_agent.0'/>
       <address type='virtio-serial' controller='0' bus='0' port='2'/>
     </channel>

http://wiki.stoney-cloud.org/wiki/Qemu_Guest_Agent_Integration

Hope this helps.




More information about the libvirt-users mailing list