Hide Forgot
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/host-usb-passthrough. Description: Add support for usb passthrough http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#-usbdevice_2 This feature may be specific for some private cloud use cases only. So an option to disable or disable it by default may be appropriate? Example workflow in horizon: 1. User clicks on the action Attach USB device a. Nova executes lsusb and retuns list of available pci devices with names on the host of the instance b. Horizon shows the names of the usb devices such as Sandisk Cruzer 2. The user chooses to attach the Sandisk Cruzer to instance-x a. Nova get the bus and device number and use libvirt to attach the device using the libvirt api I think there should be a new table called host_usb_devices which stores the name, bus, device, instance_uuid, state Where state would also track the progress, possible states: attaching, attached, available, failed Things that should be considered: - What if the usb device gets unplugged rebooting the instance wont be possible because it cant find the attached device. So when rebooting we need to also check if there are any usb devices attached and if they still exist. Happened to me once was unable to boot the instance if the usb was removed but still attached to the instance. - Live-migration or move to another host - If the instance is powered off and / or suspended we need to use the following command: virsh detach-device instance-000000ca usb-device.xml --config because you can't detach from an inactive domain, maybe the python libvirt api has a flag for it - Device can only be used by single instance - What about other hypervisor support? Specification URL (additional information): None