Bug 524035
Summary: | libvirt should support USB device detach | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vladimir Benes <vbenes> |
Component: | libvirt | Assignee: | Daniel Veillard <veillard> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 12 | CC: | berrange, clalance, crobinso, itamar, markmc, veillard, virt-maint |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-03-16 15:22:42 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 514891 |
Description
Vladimir Benes
2009-09-17 16:34:53 UTC
Yeah, seems like libvirt doesn't support USB detach for some reason I assume the error message is: only SCSI or virtio disk device can be detached dynamically Looks like this is perfectly possible to implement, adding to F13VirtTarget The reason its not implemented is that QEMU's usb_del monitor command is more or less useless First consider what you do to attach a USB device, eg either on command line use '-usb mouse' or via monitor use 'usb_add mouse' The monitor 'usb_del' command though requires the USB bus+device address of the device to be attached. The trouble is that this address is not assigned at time of usb attachment - its assigned only when the guest OS activates the USB device. eg, consider this example $ ./i386-softmmu/qemu -usb -usbdevice mouse -usbdevice tablet -monitor stdio QEMU 0.11.50 monitor - type 'help' for more information (qemu) info usb Device 0.0, Speed 12 Mb/s, Product QEMU USB Mouse Device 0.0, Speed 12 Mb/s, Product QEMU USB Hub Device 0.0, Speed 12 Mb/s, Product QEMU USB Tablet You can do 'usb_del 0.0' but which device is it going to detach - its anybody's guess :-( Even if addresses were present, its impossible to distinguish two devices of the same type in 'info usb'. So to do this we need qdev 'id' flag support I think. libvirt could assign a unique identifier 'usbmouse0', and then be allowed todo 'usb_del usbmouse0' (In reply to comment #2) > The trouble is that this address is not assigned at > time of usb attachment - its assigned only when the guest OS activates the USB > device. Ah, okay - interesting. > So to do this we need qdev 'id' flag support I think. libvirt could assign a > unique identifier 'usbmouse0', and then be allowed todo 'usb_del usbmouse0' Yep This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Pretty sure this is fixed in latest libvirt. Since this is part of -device support which is hugely invasive, it will only be in rawhide/F14 unless we rebase older Fedora. Closing as RAWHIDE. |