Description of problem: when I plug in USB flash and attach it I cannot detach it in virt-manager any more Version-Release number of selected component (if applicable): libvirt-0.7.1-4.fc12.x86_64 virt-viewer-0.2.0-1.fc12.x86_64 libvirt-client-0.7.1-4.fc12.x86_64 virt-manager-0.8.0-3.fc12.noarch virt-top-1.0.3-5.fc12.x86_64 python-virtinst-0.500.0-2.fc12.noarch libvirt-python-0.7.1-4.fc12.x86_64 virt-mem-0.3.1-9.fc12.x86_64 gpxe-roms-qemu-0.9.7-5.fc12.noarch qemu-kvm-0.10.92-4.fc12.x86_64 qemu-common-0.10.92-4.fc12.x86_64 qemu-system-x86-0.10.92-4.fc12.x86_64 qemu-kvm-tools-0.10.92-4.fc12.x86_64 qemu-img-0.10.92-4.fc12.x86_64 kernel-2.6.31-14.fc12.x86_64 How reproducible: Steps to Reproduce: 1.plug in USB device 2.via virt-manager add usb device as a storage 3.try to detach it via virt-manager Actual results: have to reboot Expected results: guest still running Additional info:
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.