[libvirt-users] Time syncing after VM suspend/resume

Jérôme
2015-09-23T13:03:11Z

Hi all.

When resuming guest after suspend, the time is wrong (because the guest
doesn't know it has been suspended).

Apparently, ntp running on the guest doesn't solve this. At least on
Linux system. I read it works on Windows guests. I don't understand why,
so I'd appreciate a link to an explanation, but I understand it is out
of scope for this list.

The HW clock is correct and the guest agent is setup to use kvm-clock.

Using the guest-set-time command does set the clock on the guest
according to the host. But this is not triggered automatically on
resume.

I found discussions about this, even a patch proposal to call
guest-set-time on resume, but all of this is one year old and I can't
find any newer information.

http://serverfault.com/questions/334698/how-to-keep-time-on-resumed-kvm-guest-with-libvirt
https://www.redhat.com/archives/libvirt-users/2014-October/msg00009.html
https://www.redhat.com/archives/libvir-list/2014-February/msg00520.html

Is there any fresher information I have missed ?

Thanks.

--
Jérôme