Bug 1375423 - RFE: USB hub attach/detach
Summary: RFE: USB hub attach/detach
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Virtualization Maintenance
QA Contact: lijuan men
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-13 05:27 UTC by Pei Zhang
Modified: 2020-11-06 12:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-06 12:36:20 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.