Jump to: navigation, search

Nova/proposal about usb passthrough

< Nova
Revision as of 09:43, 6 March 2014 by Yj.yuan@huawei.com (talk | contribs) (Consideration about usb-passthrough and hot-plug)

USB device and USB controller features

Background

Currently, nova has supported function of pci-passthrough, but hasn't supported usb-passthrough. There were a bp about it in https://blueprints.launchpad.net/nova/+spec/host-usb-passthrough but hasn't progress by now.

As I know, some telecom and enterprise customers have desired for usb-passthrough especially in private cloud. So I think maybe it's a good choice to provide this function in openstack.

Use case

Our customers have the following requirement:

1. There are some erp softwares deployed in virtual machines that need usb-key for authentication. Customers will first insert usb-key to host, then use the cloud management software to attach usb-key to vm, the last guest os will discovery usb-key and we can use it.

2. Popular usb device are supporting usb 2.0 or usb 3.0 standard, so our cloud management software should guarantee the transfer speed of usb device.

Consideration about usb controller

I have three alternatives about how to provide this function:

Option 1:

Nova supports function and related API for creating specified type and number usb controller.

When admin/user attach a usb device to virtual machine, him should specify the type of usb controller, then nova will select a matched usb controller/port for this device.

Advantage:

(1)Admin/user can controll what they want. If usb controllers are not enough then admin/user can create new.

(2)Maybe it is more in line with the principle of system expansion.

Shortcoming:

(1)The user operations are complex.

(2)System should manage complex relationship between usb controller and usb device, and making decisions about which usb controller/port to which usb device.


Option 2:

Nova dosen't exposure usb controller operating to admin/user.

When admin/user attach a usb device to virtual machine, him can specify the type of usb controller optionaly, then nova will automatically create appropriate usb controller/port for this device.

Advantage:

(1)The user operations are simpler.

Shortcoming:

(1)System should manage complex relationship between usb controller and usb device, and making decisions about which usb controller/port to which usb device.


Option 3:

Nova creates some default usb controller like ehci, nec-xhci when creating virtual machine.

When admin/user attach a usb device to virtual machine, him can specify the type of usb controller optionaly, then nova will select a matched usb controller/port for this device.

Advantage:

(1)The user operations are simpler.

Shortcoming:

(1)Not all type of usb controller can be supported

(2)There are restrictions for number of suported usb devices(Maybe it is not a problem because normal business scenes don' t need many usb devices)

Consideration about usb-passthrough and hot-plug

The core