Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1012829

Summary: libvirt should choose the available vf for assignment automatically if the fore vfs are unavaliable
Product: Red Hat Enterprise Linux 6 Reporter: Xuesong Zhang <xuzhang>
Component: libvirtAssignee: Laine Stump <laine>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, dyuan, honzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1012820 Environment:
Last Closed: 2014-04-04 20:56:50 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:
Bug Depends On: 1012820    
Bug Blocks:    

Description Xuesong Zhang 2013-09-27 08:43:22 UTC
+++ This bug was initially created as a clone of Bug #1012820 +++

Description
While the fore VF in the VFpool is not available for assignment, libvirt should choose the next available vf for assignment automatically.

Version:
libvirt-1.1.1-5.el7.x86_64
qemu-kvm-1.5.3-3.el7.x86_64
kernel-3.10.0-23.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare one hostdev network like the following one:
# virsh net-dumpxml hostnet
<network>
  <name>hostnet</name>
  <uuid>c1fb4ead-21b8-4d69-8ad9-669c55b3dfc7</uuid>
  <forward mode='hostdev' managed='yes'>
    <address type='pci' domain='0x0000' bus='0x03' slot='0x10' function='0x1'/>
    <address type='pci' domain='0x0000' bus='0x03' slot='0x10' function='0x0'/>
  </forward>
</network>

2. prepare one VF xml, the VF is the 1st VF in the vfpool.
# cat vf-hostdev-1.xml
<hostdev mode='subsystem' type='pci' managed='yes'>
  <source>
    <address bus='0x03' slot='0x10' function='0x1'/>
  </source>
</hostdev>

3. hot-plug the vf to the running guest.
# virsh attach-device a vf-hostdev-1.xml 
Device attached successfully

4. prepare one xml like following. 
# cat vf-vfpool.xml 
<interface type='network'>
 <source network='hostnet'/>
</interface>

5. hot-plug the vf in vfpool to guest.
# virsh attach-device a vf-vfpool.xml 
error: Failed to attach device from vf-vfpool.xml
error: Requested operation is not valid: PCI device 0000:03:10.1 is in use by domain a

# virsh attach-device a vf-vfpool.xml 
error: Failed to attach device from vf-vfpool.xml
error: Requested operation is not valid: PCI device 0000:03:10.1 is in use by domain a


Actual results:
in step5, libvirt can't hot-plug other available vf to the guest.


Expected results:
in step5, while the fore vf of the vfpool is not available for hot-plug, libvirt should choose other available vf from the vfpool automatically.


Additional info:

Comment 5 RHEL Program Management 2014-04-04 20:56:50 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.