Bug 1041276 - [RFE][nova]: Support passthrough of USB devices of host
Summary: [RFE][nova]: Support passthrough of USB devices of host
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_none upstream_stat...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 14:14 UTC by RHOS Integration
Modified: 2015-03-19 17:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 17:02:03 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-12 14:14:10 UTC
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


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