Jump to: navigation, search

Difference between revisions of "Nova/proposal about usb passthrough"

(Proposed solution)
(Consideration about usb controller)
Line 17: Line 17:
 
=== Consideration about usb controller ===
 
=== Consideration about usb controller ===
 
I have three alternatives about how to provide this function:
 
I have three alternatives about how to provide this function:
 +
 
Option 1:  
 
Option 1:  
 
Nova supports function and related API to admin/user for creating specified type and number usb controller.
 
Nova supports function and related API to admin/user 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.
 
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:  
 
Advantage:  
 +
 
(1)Admin/user can controll what they want. If usb controllers are not enough then admin/user can create new.
 
(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.
 
(2)Maybe it is more in line with the principle of system expansion.
 +
 
Shortcoming:
 
Shortcoming:
 +
 
(1)The user operations are complex.
 
(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.
 
(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:  
 
Option 2:  
 +
 
Nova not exposure usb controller operating to admin/user.
 
Nova not 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.
 
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:
 
Advantage:
 +
 
(1)The user operations are more simple.  
 
(1)The user operations are more simple.  
 +
 
Shortcoming:
 
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.
 
(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:  
 
Option 3:  
 +
 
Nova creates some default usb controller like ehci, nec-xhci when creating virtual machine.
 
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.
 
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:  
 
Advantage:  
 +
 
(1)The user operations are more simple.  
 
(1)The user operations are more simple.  
 +
 
Shortcoming:
 
Shortcoming:
 +
 
(1)Not all type of usb controller can be supported
 
(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)
 
(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 ===
 
=== Consideration about usb-passthrough and hot-plug ===

Revision as of 09:36, 6 March 2014

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 to admin/user 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 not 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 more simple.

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 more simple.

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