USB Host Device passthrought [Host --> Guest] is not working

Bug #1603558 reported by Gannet
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Confirmed
Medium
Unassigned
virt-manager (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I'm trying to passthrough USB Flash drive from Host to Guest with virt-manager with no success.

1. I'm starting virt-manager.
2. Putting my USB Flash drive into USB port.
3. Adding USB Host Device with my USB Flash drive. It appears in hardware list as USB 090c:1000 device.
4. I'm starting my VM and when it is finished no usb device I can see in my guest: lsusb doesn't shows it.
-------------------
I tried another way. When VM is started I executed:

$ sudo virt-xml Kubuntu-16.04.x-x86_64-14GiB --update --add-device --host-device 090c:1000
Для пристрою успішно виконано дію hotplug.
Домен «Kubuntu-16.04.x-x86_64-14GiB» успішно визначено.

But nothing's changed in guest system: no any new device appeared.
-------------------
I tried also:
1. Creating usbhostdev.xml file with the following content:

<hostdev mode='subsystem' type='usb'>
        <source>
                <vendor id='0x090c'/>
                <product id='0x1000'/>
        </source>
</hostdev>

2. $ sudo virsh attach-device Kubuntu-16.04.x-x86_64-14GiB /tmp/usbhostdev.xml

This also added USB 090c:1000 device in virt-manager but nothing's changed is guest system again.

I think this is a bug or something I'm doing wrong possibly.

Some additional info:
Host: Kubuntu 16.04 LTS
Linux: 4.7.0-040700rc7-generic x86_64
libvirt-bin: 1.3.1-1ubuntu10.1
qemu-system-x86: 2.5+dfsg-5ubuntu10.2

Guest: Kubuntu 16.04 LTS / Windows 7 x64
Linux: 4.4.0-28-generic x86_64

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: virt-manager 1:1.3.2-3ubuntu1.16.04.1
Uname: Linux 4.7.0-040700rc7-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: KDE
Date: Fri Jul 15 22:40:58 2016
InstallationDate: Installed on 2014-06-08 (768 days ago)
InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.1)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: Upgraded to xenial on 2016-02-04 (161 days ago)

Revision history for this message
Gannet (ken20001) wrote :
summary: - USB Host Device passthrought [Host --> Guest] is not working with virt-
- manager
+ USB Host Device passthrought [Host --> Guest] is not working
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libvirt (Ubuntu):
status: New → Confirmed
Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Gannet (ken20001) wrote :

Also I've tried 'virt-manager --debug' and adding USB Host Device. It seems output shows all is correct (http://pastebin.ubuntu.com/19548401/):

[сб, 16 лип 2016 00:21:58 virt-manager 26388] DEBUG (addhardware:124) Showing addhw
[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (addhardware:1280) Running setup() for device=<virtinst.devicehostdev.VirtualHostDevice object at 0x7f92f40d2ed0>
[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (addhardware:1282) Device setup() complete
[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (addhardware:1295) Adding device:
<hostdev mode="subsystem" type="usb" managed="yes">
  <source>
    <vendor id="0x090c"/>
    <product id="0x1000"/>
  </source>
</hostdev>

[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (domain:1014) attach_device with xml=
<hostdev mode="subsystem" type="usb" managed="yes">
  <source>
    <vendor id="0x090c"/>
    <product id="0x1000"/>
  </source>
</hostdev>

[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (libvirtobject:74) Redefining <vmmDomain name=Kubuntu-16.04.x-x86_64-14GiB> with XML diff:
--- Original XML
+++ New XML
@@ -111,5 +111,11 @@
     <memballoon model="virtio">
       <address type="pci" domain="0x0000" bus="0x02" slot="0x06" function="0x0"/>
     </memballoon>
+ <hostdev mode="subsystem" type="usb" managed="yes">
+ <source>
+ <vendor id="0x090c"/>
+ <product id="0x1000"/>
+ </source>
+ </hostdev>
   </devices>
 </domain>

[сб, 16 лип 2016 00:22:14 virt-manager 26388] DEBUG (addhardware:134) Closing addhw

But anyway the device doesn't appeared in guest.

Changed in virt-manager (Ubuntu):
importance: Undecided → Medium
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Daedra (daedra-86) wrote :

Greetings!
I take ~jacob/+archive/ubuntu/virtualisationrepository in Ubuntu 16.04.
The problem with usb passthrought.
Through virt-manager add a usb mouse/keyboard, run the virtual machine, and the vm does not see them.
Then I pull them out of the USB port, re-insert through virt-manager add a usb mouse/keyboard, and now vm sees them.
After turning off the vm, repeated all over again.
I do not know to whom to address this problem.
Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.