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:
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.
Full patch series: https://www.redhat.com/archives/libvir-list/2018-October/msg00719.html
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.