QA:Testcase Virtualization Hotplug USB device to guest

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Created page with '{{QA/Test_Case |description= |setup=Prepare a machine to support vt-d, e.g. Dell 755. |actions= # Start a VM using virt-manager. # Check device using lspci, here we will hotplug ...')
 
(Note that on Fedora 20 USB2 is the default for new VMs)
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{QA/Test_Case
 
{{QA/Test_Case
 +
 
|description=
 
|description=
|setup=Prepare a machine to support vt-d, e.g. Dell 755.
+
Attach a physical USB device to your guest.
 +
 
 +
|setup=
 +
Functioning Fedora host and a VM of any OS. More VM OS and USB devices the merrier!
 +
 
 
|actions=
 
|actions=
# Start a VM using virt-manager.
+
 
# Check device using lspci, here we will hotplug network from host to guest:
+
=== Verify the VM is configured for USB2 ===
#: <pre>#lsusb
+
 
#: ...
+
VMs created with virt-manager and virt-install on Fedora 20 or later are configured with USB2 by default, but pre-existing VMs may not have it.
#: Bus 002 Device 002: ID 0781:5151 SanDisk Corp. Cruzer Micro Flash Drive
+
 
#: ...
+
# Start with a shutoff VM. Open the VM defails page.
#: </pre>
+
# Select 'Controller USB' and verify model is USB2. If not, change it to USB2 and click apply.
# Open a Virtual Machine->show details->''Add Hardware''->select 'USB Host Device' in hardware type list->select 002:002 in device list to assign the usb device to a vm.
+
 
# In guest,  issue ''lsusb''.
+
=== Attach the host USB device ===
 +
 
 +
# Start the VM
 +
# Add Hardware->USB Host Device
 +
# Choose the device you want to assign from the list, like: <code>009:002 SanDisk Extreme</code>
 +
# Click ''Finish''
 +
# Verify that the guest shows up in 'lsusb' output in the guest.
 +
# Verify the device's functionality in the guest (this will be device specific)
 +
# Select the device in virt-manager, and click 'Remove'.
 +
# Verify the device again appears in the host, and is functional on the host.
 +
 
 
|results=
 
|results=
# After step 4, <code>#lsusb</code> can find the hotpluged usb device
+
No obvious errors occur.
 
}}
 
}}
  
[[Category:Virtualization Hotplug Test Cases]]
+
[[Category:Virtualization Test Cases]]

Revision as of 16:58, 4 October 2013

Contents

Description

Attach a physical USB device to your guest.

Setup

Functioning Fedora host and a VM of any OS. More VM OS and USB devices the merrier!

How to test

Verify the VM is configured for USB2

VMs created with virt-manager and virt-install on Fedora 20 or later are configured with USB2 by default, but pre-existing VMs may not have it.

  1. Start with a shutoff VM. Open the VM defails page.
  2. Select 'Controller USB' and verify model is USB2. If not, change it to USB2 and click apply.

Attach the host USB device

  1. Start the VM
  2. Add Hardware->USB Host Device
  3. Choose the device you want to assign from the list, like: 009:002 SanDisk Extreme
  4. Click Finish
  5. Verify that the guest shows up in 'lsusb' output in the guest.
  6. Verify the device's functionality in the guest (this will be device specific)
  7. Select the device in virt-manager, and click 'Remove'.
  8. Verify the device again appears in the host, and is functional on the host.

Expected Results

No obvious errors occur.