Bug 1375402

Summary: Guest fail to start when it has a ccid plugged on hub
Product: Red Hat Enterprise Linux 7 Reporter: Pei Zhang <pzhang>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED DEFERRED QA Contact: yisun
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: dyuan, hhan, jiyan, jtomko, xuzhang, yafu, yalzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1599971 (view as bug list) Environment:
Last Closed: 2018-12-07 14:39:20 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:

Description Pei Zhang 2016-09-13 02:35:03 UTC
Description of problem:
Since usb-ccid controllers are formatted before usb-hubs on the QEMU command line, so guest will fail to start if plug a ccid controller on hub.

Version-Release number of selected component (if applicable):
libvirt-2.0.0-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. define and edit a guest like following :
#virsh dumpxml vm2 
......
<controller type='ccid' index='0'>
      <address type='usb' bus='0' port='6.1'/>
    </controller>
  <smartcard mode='passthrough' type='spicevmc'>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>
......

2. start guest 
# virsh start vm2
error: Failed to start domain vm2
error: internal error: qemu unexpectedly closed the monitor: 2016-09-12T09:47:46.638568Z qemu-kvm: -device usb-ccid,id=ccid0,bus=usb.0,port=6.1: usb port 6.1 (bus usb.0) not found (in use?)


Actual results:
As step 2, guest with usb-ccid on hub fail to start.

Expected results:
Guest can start successfully or give some error like we cannot use it in this way.


Additional info:

Comment 1 Ján Tomko 2018-01-05 10:10:21 UTC
*** Bug 1531480 has been marked as a duplicate of this bug. ***