Bug 1222069

Summary: RFE: update VM time after resume/unpause
Product: [Community] Virtualization Tools Reporter: Aleksandar Kostadinov <akostadi>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amit, amit.shah, berrange, cfergeau, crobinso, dwmw2, gscrivan, itamar, michael, pbonzini, rjones, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-17 22:52:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksandar Kostadinov 2015-05-15 16:48:12 UTC
Description of problem:
I have a fedora 20 VM running on fedora 21 host. WHen I pause VM from vm-manager and then resume the machine, the time as reported by date on the VM is incorrect. It's behind real time as much as the machine stayed paused.

The VM is running chronyd and has kvm-clock as the current time source.

I believe it's reasonable to expect to see real time in machine to stay correct given kvm-clock is used. Otherwise pausing becomes much less useful.

Comment 1 Cole Robinson 2015-05-19 15:58:32 UTC
There's some external info here:

https://serverfault.com/questions/334698/how-to-keep-time-on-resumed-kvm-guest-with-libvirt

And a libvirt thread about trying to fix this:

https://www.redhat.com/archives/libvir-list/2014-February/msg00526.html
https://www.redhat.com/archives/libvir-list/2014-February/msg00905.html

So it's expected that users need to manually tell the VM to update its time. virt-manager can attempt this automatically though, so reassigning

Comment 2 Cole Robinson 2016-04-10 18:27:33 UTC
We should also do this for resume from managedsave. The API is virDomainSetTime

Comment 3 Michael Weiser 2019-11-30 18:49:40 UTC
Discussion and patches: https://www.redhat.com/archives/virt-tools-list/2019-November/msg00018.html

Comment 4 Cole Robinson 2019-12-17 22:52:53 UTC
Michael's patches were pushed upstream now, they will be in the next release