Bug 510459 - KVM does not honour the -S flag, and resumes CPU execution after incoming migration completes.
KVM does not honour the -S flag, and resumes CPU execution after incoming mig...
Status: CLOSED DUPLICATE of bug 503367
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.5
All Linux
low Severity high
: rc
: ---
Assigned To: Paolo Bonzini
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-09 07:41 EDT by Paolo Bonzini
Modified: 2014-03-25 20:58 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-04 08:00:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
qemu patch to fix the bug (2.86 KB, patch)
2009-07-14 09:45 EDT, Paolo Bonzini
no flags Details | Diff
patch matching upstream (2.01 KB, patch)
2009-07-30 10:19 EDT, Paolo Bonzini
no flags Details | Diff

  None (edit)
Description Paolo Bonzini 2009-07-09 07:41:21 EDT
Description of problem:
When a suspended VM is saved and later restored, virsh list shows it as paused, but the VM is actually running

Version-Release number of selected component (if applicable):
0.6.3-11

How reproducible:
Create a KVM virtual machine, suspend it, save it, restore it, run virt-viewer on it.

Steps to Reproduce:
1. Start a task in a KVM virtual machine, e.g. seq 1 10000000
2. Suspend the virtual machine: virsh suspend EXAMPLE
3. virsh save EXAMPLE test.qemu
4. virsh restore test.qemu
5. virt-viewer EXAMPLE

Actual results:
Numbers keep scrolling on the VM

Expected results:
Numbers should not scroll in the VM

Additional info:
libvirt actually believes the domain is paused, so that you need "virsh resume EXAMPLE && virsh suspend EXAMPLE" to really pause it.

Saving a suspended VM does not work at all for Xen.
Comment 1 Paolo Bonzini 2009-07-09 09:06:09 EDT
The Xen bug, for the record, is bug 504910.  This bug is a bit more severe though, IMO (doing nothing is worse than doing it wrong).
Comment 2 Daniel Veillard 2009-07-10 08:41:21 EDT
Hum, this is coming a bit late in the game for Update 4, we have no patch
yet, it's not a very common scenario, and probably not very crucial, the
resume/suspend after restore is not ideal but probably workable in most cases.
So I suggest to retarget it for update 5 at this point,

 thanks for raising the issue though we need to get this fixed upstream,
my assumption is that we don't look at the suspended information when
restoring the domain at some low level while libvirt is aware of it.

Daniel
Comment 3 Daniel Berrange 2009-07-10 08:54:09 EDT
This isn't a libvirt problem. This is a bug in QEMU/KVM. After the 'migrate' command finishes it should *not* be starting execution of the CPUs. Resuming execution is a policy decision for the management tool to make. libvirt explicitly starts the VM with '-S' for stopped, and QEMU should not override this and start the VM after migrate when this is the case.
Comment 4 Paolo Bonzini 2009-07-14 09:45:15 EDT
Created attachment 351586 [details]
qemu patch to fix the bug

I submitted this patch upstream.
Comment 5 Paolo Bonzini 2009-07-30 10:19:53 EDT
Created attachment 355681 [details]
patch matching upstream

This patch includes an additional fix from Glauber Costa.
Comment 6 Dor Laor 2009-08-04 08:00:20 EDT

*** This bug has been marked as a duplicate of bug 503367 ***

Note You need to log in before you can comment on or make changes to this bug.