You are not logged in.

#1 2016-03-07 11:55:57

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

[SOLVED] Unable to Pass USB Device (flash drive) to QEMU Guest

I'm having trouble passing a USB device (a flash drive) to a Windows 7 QEMU guest...

[tony@laptop ~]$ lsusb | grep Kingston
Bus 003 Device 002: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
[tony@laptop ~]$ qemu-system-x86_64 -enable-kvm -m 2G -drive file=win7.img,format=raw -device usb-host,hostbus=3,hostaddr=2
qemu-system-x86_64: -device usb-host,hostbus=3,hostaddr=2: No 'usb-bus' bus found for device 'usb-host'

Any ideas?

Last edited by tony5429 (2016-03-08 12:04:23)

Offline

#2 2016-03-08 01:58:47

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Unable to Pass USB Device (flash drive) to QEMU Guest

Whoops - I realized I had forgotten the "-usb" option. Now, with the command below, Windows loads and attempts to use the flash drive, but returns error "code 10" - "this device cannot start."

qemu-system-x86_64 -enable-kvm -m 2G -drive file=win7.img,format=raw -usb -device usb-host,hostbus=3,hostaddr=2

Here are screenshots...

http://i.imgur.com/bhOLrLA.png
http://i.imgur.com/85iDObm.png

Offline

#3 2016-03-08 12:08:17

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Unable to Pass USB Device (flash drive) to QEMU Guest

Looks like I needed to use "-device usb-ehci..." rather than "-usb". It works perfectly now big_smile

qemu-system-x86_64 -enable-kvm -m 2G -drive file=win7.img,format=raw -device usb-ehci,id=usb,bus=pci.0,addr=0x4 -device usb-host,hostbus=3,hostaddr=2

Last edited by tony5429 (2016-03-08 14:14:15)

Offline

Board footer

Powered by FluxBB