Bug 1264268

Summary: Using startupPolicy='optional' with USB passthrough stopped working
Product: [Fedora] Fedora Reporter: Dax Kelson <dkelson>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: agedosier, berrange, clalancette, crobinso, dkelson, dyuan, itamar, jforbes, laine, libvirt-maint, pzhang, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-26 21:42:36 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 Dax Kelson 2015-09-18 05:27:03 UTC
Description of problem:

On a updated Fedora 22 machine I have a VM with several USB passthrough devices.

For example:

    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source startupPolicy='optional'>
        <vendor id='0x0403'/>
        <product id='0x6001'/>
      </source>
    </hostdev>

I plugged the above device (a USB serial port) in and tried booting the VM and got a libvirt error (and VM wouldn't start):

Sep 17 23:06:56 mentor libvirtd[2127]: internal error: Device 003:020 is already in use
Sep 17 23:06:56 mentor libvirtd[2127]: Unable to find device 003.020 in list of active USB devices
Sep 17 23:06:56 mentor libvirtd[2127]: Unable to find device 003.020 in list of active USB devices
Sep 17 23:06:56 mentor libvirtd[2127]: Unable to find device 000.000 in list of active USB devices
Sep 17 23:06:56 mentor libvirtd[2127]: Unable to find device 000.000 in list of active USB devices

I removed the startupPolicy='optional' attribute and the VM starts with no error. Weird.

So to recap:

USB device plugged in AND startupPolicy='optional' = FAILURE TO START
USB device plugged in AND NO startupPolicy='optional' = OK
USB device not plugged in AND startupPolicy='optional' = OK

I've been able to use the startupPolicy='optional' with a several USB devices for a couple years, but it has been since April (6 months ago -- on Fedora 21) that attempted (and it worked).

Comment 1 Cole Robinson 2016-04-13 23:51:04 UTC
Sorry this didn't receive a timely response. I can't reproduce on f22 or f23. Are you still hitting this issue?

Comment 2 Cole Robinson 2016-04-26 21:42:36 UTC
Closing as WORKSFORME, but if anyone can still reproduce with latest packages, please reopen