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 1043374

Summary: Refuse to start a domain with a USB disk attached to a PCI bus
Product: Red Hat Enterprise Linux 6 Reporter: Hu Jianwei <jiahu>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bili, dyuan, honzhang, jdenemar, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1043436 (view as bug list) Environment:
Last Closed: 2014-04-04 21:27:08 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:    
Bug Blocks: 1043436    

Description Hu Jianwei 2013-12-16 06:43:11 UTC
Description of problem:
Libvirt should check unnecessary pci-address for usb type disk before starting domain

Version-Release number of selected component (if applicable):
libvirt-0.10.2-29.el6.x86_64
qemu-kvm-0.12.1.2-2.398.el6.x86_64
kernel-2.6.32-412.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Edit domain and add a unavailable pci address to usb disk
   <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/usb-img/usb.img'/>
      <target dev='sdd' bus='usb'/>
      <alias name='usb-disk3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>

2. Dump domain xml
[root@test777 ~]# virsh dumpxml r6
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/usb-img/usb.img'/>
      <target dev='sdd' bus='usb'/>
      <alias name='usb-disk3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>
...

3. Start domain
[root@test777 ~]# virsh start r6
Domain r6 started

[root@test777 ~]# virsh dumpxml r6
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/usb-img/usb.img'/>
      <target dev='sdd' bus='usb'/>
      <alias name='usb-disk3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>
...

Actual results:
See above steps.

Expected results:
Libvirt should fail to start domain when we configure some wrong elements for usb disk. The expected results should be same as below:

Need give error info like bus='ide' or bus='scsi':
# virsh start rhel6u2
error: Failed to start domain rhel6u2
error: internal error unexpected address type for ide disk

# virsh start rhel6u2
error: Failed to start domain rhel6u2
error: internal error unexpected address type for scsi disk


Additional info:
On rhel7 host, I can not reproduce it.

Version:
libvirt-1.1.1-13.el7.x86_64
qemu-kvm-1.5.3-19.el7.x86_64
kernel-3.10.0-54.el7.x86_64

[root@ibm-x3850x5-07 216365]# virsh dumpxml r7
...
<disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/usb-img/usb-a-a.img'/>
      <target dev='sdd' bus='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
    </disk>
...

[root@ibm-x3850x5-07 216365]# virsh start r7
error: Failed to start domain r7
error: internal error: early end of file from monitor: possible problem:
qemu-kvm: -device usb-storage,bus=pci.0,addr=0xe,drive=drive-usb-disk3,id=usb-disk3: Device 'usb-storage' can't go on a PCI bus

Comment 2 RHEL Program Management 2014-04-04 21:27:08 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.