Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 573940

Summary: Output error info when migrate a kvm guest with pci device
Product: Red Hat Enterprise Linux 5 Reporter: zhanghaiyan <yoyzhang>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: dallan, jdenemar, llim, vbian, virt-maint, xen-maint, yimwang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.2-7.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 22:55:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 499109, 638859    
Bug Blocks:    

Description zhanghaiyan 2010-03-16 09:14:46 UTC
Description of problem:
Output error info when migrate a kvm guest with pci device

Version-Release number of selected component (if applicable):
- kernel-2.6.18-192.el5
- libvirt-0.6.3-33.el5
- kvm-83-164.el5

How reproducible:
100%

Steps to Reproduce:
1. Detach pci device from host1
2. Hotplug pci device to guest
3. Could see the pci device in guest
4. Setup migration environment on 2 host1 and host2
5. On host1
   # virsh migrate --live <guest> qemu+ssh://<host2 ip>/system
6. hot unplug the pci device from guest
7. On host 1
     # virsh migrate --live <guest> qemu+ssh://<host2 ip>/system
Actual results:
After step6, Output:
error: operation failed: failed to start listening VM
After step7, migrate pass

Expected results:
After step6, output:
a dialog pops up to forbiden migration guest with pci device
After step7, Migrate pass

Additional info:
This bug cannot reproduce on xen system

Comment 1 Daniel Veillard 2010-09-01 13:18:26 UTC
I'm not sure I understand but basically if the VM is tied to a local
PCI device it cannot be migrated, that sounds logical.

Is the bug just that the error reported in step 6/ instead of being
reported in step 5 ? I sthe bug that the error message is not explicit
enough about the migration failure ?

Daniel

Comment 2 zhanghaiyan 2010-09-02 03:07:28 UTC
Update as below
Actual results:
After step5, Output:
error: operation failed: failed to start listening VM
After step7, migrate pass

Expected results:
After step5, output:
a dialog pops up to forbiden migration guest with pci device
After step7, Migrate pass

That means, actual error report is not explicit enough, the expected error report should be like in xen to forbiden migration guest with pci device.

Comment 3 Daniel Veillard 2010-09-15 15:26:18 UTC
That fix is not in the rebased 0.8.2 version so that's unlikely to be fixed in 5.6
but might be small enough to fix so keeping in target for 5.6

Daniel

Comment 5 Jiri Denemark 2010-10-14 16:09:28 UTC
Patches built into libvirt-0.8.2-7.el5

Comment 7 Vivian Bian 2010-10-19 13:46:18 UTC
tested with 
kernel-2.6.18-227.el5
kvm-83-202.el5
libvirt-0.8.2-7.el5

failed to hot plugin pci device to kvm guest. So CAN NOT verify this bug , and set bug status to ASSIGNED

Comment 8 Jiri Denemark 2010-10-19 14:29:25 UTC
In that case, could you please just wait with verification until the pci assignment bug you're blocked by is solved? I'm moving this bug back to ON_QA since there's no additional work expected to fix this bug.

Comment 9 wangyimiao 2010-11-05 03:22:15 UTC
Precondition:Source host and target host have different PCI(bus,solt and function ID).

Verified PASSED with build:"libvirt-0.8.2-10.el5,kvm-qemu-img-83-205.el5,
kvm-83-206.el5,kernel-2.6.18-230.el5,kernel-xen-2.6.18-230.el5" on 3 arches-
(RHEL5u6-Server-x86_64-Xen,RHEL5u6-Server-x86_64-Kvm,RHEL5u6-Client-i386-Xen)

Comment 11 errata-xmlrpc 2011-01-13 22:55:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html