Red Hat Bugzilla – Bug 658467
kvm clock breaks migration result stability - for unit test propose
Last modified: 2013-01-09 18:23:18 EST
Description of problem: doing savevm twice when VM is stopped should produce identical result. This is useful e.g. for testing. For kvm clock this is not so. Three problems: 1. as the result stored changes on each savevm, results in the file are not stable 2. Disabling kvmclock in cpuid does not help 3. migration from host kernel which has kvmclock to host kernel which does not is broken even though -kvmclock is disabled in cpuid so cpu id flags are consistent
Michael/Jason, Just an update: I am working on it, and have patches that should be ready RSN. From your usecase perspective, could you please let me know the relevance/importance of each of the 3 items? As the patches are not ready yet, I don't know if it will be worth to separate this into different bugzillas or not. Maybe we should. Thanks!
Fixing either 1 or 2 is most important for me.
Upstream patch at: http://lists.gnu.org/archive/html/qemu-devel/2010-12/msg00443.html
Setting conditional NAK upstream. This is under heavy discussion , and the end result is unclear.
To Comment 5: link to the discussion?
Hi,Mst/Jason Our qe don't very clear what's this issue really means? would you please explain and give qe a efficient way to reproduce and verify this issue?
verified this issue with fixed version qemu-kvm-0.12.1.2-2.190.el6.x86_64 using steps as comment13 step: 1.boot guest which has kvmclock #/usr/libexec/qemu-kvm...-rtc base=localtime,clock=host,driftfix=slew 2.migrate -d tcp... Result: migrate successful,and the kvm clock result is stability and not clock drift. Above all,this issue has been fixed.
verified this issue with fixed version qemu-kvm-0.12.1.2-2.190.el6.x86_64 kernel-2.6.32-198.el6.x86_64
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Qemu-kvm would query the the value of kvmclock every time when user do savevm even the vm have been stopped. Consequence: This would cause the two sequent savevm after vm is stopped produce a two different result which breaks the unit-test of migration. Fix: Introduce a new kvmclock device and register a vm state change notifier to record when the kvmclock value is valid. And query and save the kvmclock only the valid flag is set. Result: Kvmclock section is stable for migration unit-test.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1531.html