Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1375423

Summary: RFE: USB hub attach/detach
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Pei Zhang <pzhang>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DEFERRED QA Contact: lijuan men <lmen>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: dyuan, hhan, jsuchane, jtomko, rbalakri, xuzhang
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0Flags: areis: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-06 12:36:20 UTC Type: Feature Request
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 05:27:56 UTC
Description of problem:
Currently the USB hub can only be added into guest via virsh edit. If users want to use more USB ports, we can use virsh edit to add and then destroy and start start to make them useful. So it is better support hot-plugging USB hubs to guests making it more convenient to use.

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

How reproducible:
100%

Steps to Reproduce:
1. Define a guest with a USB controller 
# virsh dumpxml vm1|grep usb -A 3
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>

2.Prepare an USB hub :
# cat usb-hub.xml 
<hub type='usb'/>

3. cold / hotplug hub to guest 
# virsh attach-device vm1 usb-hub.xml --config
error: Failed to attach device from usb-hub.xml
error: Operation not supported: persistent attach of device 'hub' is not supported

# virsh start vm1 
Domain vm1 started

# virsh attach-device vm1 usb-hub.xml 
error: Failed to attach device from usb-hub.xml
error: Operation not supported: live attach of device 'hub' is not supported


Actual results:
As step 3, cannot attach an USB hub to guest.

Expected results:
Libvirt should support attaching an USB hub to guest.

Additional info:

Comment 1 Han Han 2018-10-09 15:12:11 UTC
Coldplug and coldunplug codes:
https://www.redhat.com/archives/libvir-list/2018-October/msg00563.html

commit 817f9bc33b68d1d1e25e0e2379d62d67bdd44d8e (HEAD -> hub_hot)
Author: Han Han <hhan>
Date:   Tue Oct 9 21:46:53 2018 +0800

    qemu: Allow coldunplugging of hub device
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1375423
    
    Signed-off-by: Han Han <hhan>

commit 4f02bd24817b5487592e5916c4649bfda64185f6
Author: Han Han <hhan>
Date:   Tue Oct 9 21:19:58 2018 +0800

    qemu: Allow coldplugging of hub device
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1375423
    
    Signed-off-by: Han Han <hhan>


Hotplug/unplug part will be implemented later.

Comment 2 Han Han 2018-10-12 08:52:00 UTC
Full patch series:
https://www.redhat.com/archives/libvir-list/2018-October/msg00719.html

Comment 5 Jaroslav Suchanek 2020-11-06 12:36:20 UTC
This bug was closed deferred as a result of bug triage.

Please reopen if you disagree and provide justification why this bug should
get enough priority. Most important would be information about impact on
customer or layered product. Please indicate requested target release.