Bug 510459 - KVM does not honour the -S flag, and resumes CPU execution after incoming migration completes.
Summary: KVM does not honour the -S flag, and resumes CPU execution after incoming mig...
Keywords:
Status: CLOSED DUPLICATE of bug 503367
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.5
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-09 11:41 UTC by Paolo Bonzini
Modified: 2014-03-26 00:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-04 12:00:20 UTC
Target Upstream Version:
Embargoed:


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

Description Paolo Bonzini 2009-07-09 11:41:21 UTC
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 13:06:09 UTC
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 12:41:21 UTC
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 Berrangé 2009-07-10 12:54:09 UTC
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 13:45:15 UTC
Created attachment 351586 [details]
qemu patch to fix the bug

I submitted this patch upstream.

Comment 5 Paolo Bonzini 2009-07-30 14:19:53 UTC
Created attachment 355681 [details]
patch matching upstream

This patch includes an additional fix from Glauber Costa.

Comment 6 Dor Laor 2009-08-04 12:00:20 UTC

*** 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.