Jump to: navigation, search

Difference between revisions of "Nova/USB device hot cold plug"

(USB device hot/cold plug features)
(Technical verification)
Line 31: Line 31:
 
     <address type='usb' bus='1' port='1'/>
 
     <address type='usb' bus='1' port='1'/>
 
   </hostdev>
 
   </hostdev>
 +
 +
  (3)Command of adding usb controller:
 +
        virsh attach-device vm usb.xml --config
 +
        virsh attach-device vm usb.xml
 +
 +
  (4)Command of removing usb controller:
 +
        virsh detach-device vm usb.xml --config
 +
        virsh detach-device vm usb.xml
  
 
3. The test results
 
3. The test results

Revision as of 09:04, 4 March 2014

USB device hot/cold plug features

Related Content

https://wiki.openstack.org/wiki/Nova/USB_device%26USB_controller

https://wiki.openstack.org/wiki/Nova/USB_controller_hot_cold_plug

Background

Adding usb devices to a exist vm is a necessary supplement features to usb device passthrough.

User scenarios

When a user transfers money online, him may need to attach a usb-key provided by bank to vm for authentication.

Technical verification

1. Test case

   (1)Attaching different type and number usb controllers and usb devices to vm when vm in diffrent status(running, stopped and so on).
   (2)Detaching usb devices from vm when vm in diffrent status(running, stopped and so on).

2. Xml definition

   (1)Sample of usb controller:
  <controller type='usb' index='2' model='piix3-uhci'/>
  <controller type='usb' index='1' model='ehci'/>
  (2)Sample of pass-through usb devices
  <hostdev mode='subsystem' type='usb'>
   < source>
    <vendor id='0x136b'/>
    <product id='0x0003'/>
    <address bus='2' device='2'/>
   </source>
   <address type='usb' bus='1' port='1'/>
  </hostdev>
  (3)Command of adding usb controller:
       virsh attach-device vm usb.xml --config
       virsh attach-device vm usb.xml
  (4)Command of removing usb controller:
       virsh detach-device vm usb.xml --config
       virsh detach-device vm usb.xml

3. The test results

Proposed solution

1. Use cases

2. System requirements and things should be considered(An optional Implementation):