USB Passthru to Windows 2016

IanCH

Active Member
Jun 6, 2017
29
0
41
51
On a test server I've install ProxMox 4.4, and created a Windows 2016 virtual machine.
I want to plug a USB Drive in the host and passthru to the guest.

What I did was.....

lsusb to find the vendor ID and product ID

Then in the qm monitor I did device_add usb-host,id=usb999,vendorid=0x07ab,productid=0xfcd7

In Windows 2016 device manager the "USB Mass Storage Device" appears with a yellow triangle, saying code 10. The "problem status" says "{operation failed}The requested operation was unsuccessful, C0000001"

Tried shutting the VM and starting again, same thing...

I also tried instead of the "device_add" I tried qm set 100 -usb0 host=07ab:fcd7 but that didn't work either, same issue code 10...

I found reference to people having problems with the above on Windows 2008R2 but with version 3.x of Proxmox.

Is passthru possible on Proxmox 4.4 with Windows 2016 Server???

Any ideas?
 
Maybe sounds stupid but have you tried antoher usb device? Or did you tried your USB device with e.g. win7 guest?

I have tried it with an USB Storage and it works very well. Proxmox VE 4.4-13/7ea56165 and Windows Server 2016.
 
Hi

Yes, tried a different USB hard disk and the same result.

"usb-storage" ????

I tried device_add usb-storage,id=usb999,vendorid=0x07ab,productid=0xfcd7
but get the error "Property '.productid' not found

Is the syntax different for "device_add" when using usb-storage instead of usb-host???

If so what is the correct syntax?
 
I've tried both ways.

I've tried - qm set 100 -usb1 host=1-1.2 Bus and Port got from "info usbhost" and "usb-devices"
I've tried - qm set 100 -usb0 host=07ab:fcd7

I've tried - device_add usb-host,id=usb999,vendorid=0x07ab,productid=0xfcd7

All of which show the device in the Windows 2016 Server Device Manager as "USB Mass Storage Device" however there is a yellow triangle, saying code 10. The "problem status" says "{operation failed}The requested operation was unsuccessful, C0000001"

Either the above commands aren't passing thru enough to Windows to detect the device correctly or Windows is missing a driver.
I've checked the drivers and they are there for USB storage devices, and fully up to date.

I've tried a Freecom USB Drive, Western Digital USB Drive, Seagate USB Drive, and a USB Memory stick. All the exact same results, noting I changed the vendorid and productid in the above commands.

Ideas???
 
Last edited:
is this a usb3 device on an usb3 port?
 
### UPDATE ###

Further to my previous posts, I've now tried another Win2016Server VM, a Win10 VM and Win7 VM.

All the exact same result.

Device Manager shows "USB Mass Storage Device" with a yellow triangle, saying code 10. The "problem status" says "{operation failed}The requested operation was unsuccessful"

Interestingly on the Win7 VM whilst watching the device manage it initial detects a "USB Device" which then changed name to "Western Digital USB Drive" when then changed to "USB Mass Storage Device" and the yellow triangle

I've tried various USB drives on all VM's same result.

Just in case it was hardware on the guest (Dell PowerEdge) I fired up a new Proxmox 4.4 on a Intel i7 PC and the exact same issue.

What am I doing wrong?
 
maybe a stupid question, but is the device working anywhere (e.g. a host, a workstation, etc) ? if yes, does this device has its own power connection or does it rely on usb power?
 
Hi

One of the USB Drives has its own power with a NTFS partition on it, and it works fine in my PC and laptop.
The other devices are powered from the USB port with FAT partitions and likewise work in my PC and laptop.

Earlier today I tried a second proxmox installation on a Intel i7, prior to installing Proxmox the hardware was running Windows10 64bit and all USB drives worked on the hardware and in Windows, but after I installed Proxmox they don't (as above in previous postings)

I then took that second proxmox and reinstalled Windows10 bare metal and the USB drives work again.

So it's definitely not hardware related.

It must be a Proxmox (4.4-1/eb2d6f1e) configuration setting, or maybe a missing driver in Windows.

I've been using the Virtio ISO version 0.1.126 (Stable). Looking on the ISO I don't see USB drivers (is that right?)
 
Last edited:
Just do an upgrade over the network. The iso is just with the major release. In the GUI left-click your node in the threebar => select "Updates" => click "Refresh" => and click "Upgrade" or do you have no internet connection?

If you have no valid subscription you have to switch your repository first to no-subscription:
https://pve.proxmox.com/wiki/Package_Repositories

The enterprise repository (default, more stable) is just aviable for subscribers.
 
Now running 4.4-13/7ea56165, rebooted host and guests, same problem.

Any other ideas?
 
Can you please try it with an linux guest (e.g. a live cd)? Just for keep sure that its not windows driver related?

Can you please paste the output of
lspci -v | grep -i usb -A 8
and
dmesg | grep -i usb
from the two host systems you tried?
Maybe you want to try to passtrough a usb keyboard instead of a storage device just for testing purpose.


I am sorry but i cannot reproduce this issue here :( For me it works very well.
 
Ok, So if it works for you what am I doing wrong because I can repeatedly recreate the problem (and on different hardware)

So I must be missing something.


Below is my setup

  1. Hardware is Dell PowerEdge Server, Xeon E5-2430 2.2Ghz CPU, 48Gb Memory, 2Tb RAID5 partition on a Perc H710 Controller

  2. Download the Proxmox ISO - https://www.proxmox.com/en/downloads/item/proxmox-ve-4-4-iso-installer

  3. Boot up with ISO and simply follow the standard setup. With Fixed IP Address 192.168.0.2 [255.255.255.0], GW 192.168.0.1
    Router provides DHCP and DNS

  4. Login into the Proxmox portal https://192.168.0.2:8006/

  5. Create a Pool called TestPool

  6. Look at the Disks and I can see the /dev/sda going to 1.82Tb Dell Raid5, from that I have two storage areas (local & local-lvm)

  7. Click on the local and then select content and upload the following CD/DVD
    • virtio-win-0.1.126.iso
    • Windows 2016 Server Standard
  8. Create a VM with the following hardware
    • Node – TheServer
    • VM ID – 100
    • Name – MyServer
    • Resource Pool - TestPool
    • OS – MS Windows10/2016
    • CD/DVD – Select Windows2016 ISO in Storage Local
    • Harddisk – SCSI disk on local-lvm (80Gb), Cache Default (No backup, Discard IO thread Unticked)
    • CPU – 1 Socket, 1 Core, Default kvm64
    • Memory – 4Gb (Ballooning ticked)
    • Network – Bridged to vmbr0, Intel E1000 (Needed for RRAS as Virtio fails on RRAS setup (that’s another story)
  9. Then I add another CD/DVD and select the virtio-win-0.1.126.ISO

  10. Options of the vm are default apart from Qemu Agent is set to yes. Hotplug is enabled for Disk, Network, USB

  11. Start the VM and go to the console

  12. When prompted to add the drivers I select the SCSI drivers from the Virtio CD to see the partition.

  13. Then do a basic Windows install. No key entered just a trial version for testing

  14. Once up and running in a cmd prompt as admin
    • ROBOCOPY the virtio CD to C:\Drivers

    • PNPUTIL -I -a C:\Drivers\vioscsi\2k16\amd64\vioscsi.inf
    • PNPUTIL -I -a C:\Drivers\NetKVM\2k16\amd64\netkvm.inf
    • PNPUTIL -I -a C:\Drivers\viostor\2k16\amd64\viostor.inf
    • PNPUTIL -I -a C:\Drivers\vioserial\2k16\amd64\vioser.inf
    • PNPUTIL -I -a C:\Drivers\viorng\2k16\amd64\viorng.inf
    • PNPUTIL -I -a C:\Drivers\vioinput\2k16\amd64\vioinput.inf
    • PNPUTIL -I -a C:\Drivers\qemupciserial\qemupciserial.inf
    • PNPUTIL -I -a C:\Drivers\pvpanic\2k16\amd64\pvpanic.inf
    • PNPUTIL -I -a C:\Drivers\Balloon\2k16\amd64\balloon.inf
  15. Install QEMU Guest from the ISO

  16. Install Balloon by running blnsvr.exe -I

  17. Sort the issue of HID Button over Interrupt driver (Useful URL https://bugzilla.redhat.com/show_bug.cgi?id=1377155)

  18. So now I have a fully working Windows2016 with no driver issues.

I now insert the USB drive into the USB port of the DELL server

Log in on the host console with root and mypassword

Type lsusb

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0624:0249 Avocent Corp.
Bus 001 Device 004: ID 0624:0248 Avocent Corp.
Bus 001 Device 007: ID 1058:0701 Western Digital Technologies, Inc.
Bus 001 Device 003: ID 413c:a101 Dell Computer Corp.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Make a note of vendorID and productID for the Western Digital Driver

Then type qm monitor 100

Then type device_add usb-host,id=usb999,vendorid=0x1058,productid=0x0701


Go back to the console of the Windows server and view the device manager and a "USB Mass Storage Device" appears with a yellow triangle, saying code 10. The "problem status" says "{operation failed}The requested operation was unsuccessful”

Capture1.jpg

(Link - https://ibb.co/mEhoCk)

Capture2.jpg
(Link - https://ibb.co/cXYH55)


If I then type on the qm monitor – device_del usb999 that “USB Mass Storage Device” disappears.


I have also upgraded Proxmox to verison 4.4-13/7ea56165


I can repeat this on different host hardware and different guest OS’s (Windows 7, 10 and Windows 2016)



I have now uploaded an Ubuntu 16 ISO and created a linux VM as suggested.

Create a VM with the following hardware

  • Node – TheServer
  • VM ID – 101
  • Name – MyUbuntu
  • Resource Pool - TestPool
  • OS – Linux 4.x/3.x/2.6 Kernal
  • CD/DVD – Select Ubuntu16.04-amd64 ISO in Storage Local
  • Harddisk – SCSI disk on local-lvm (5Gb), Cache Default (No backup, Discard IO thread Unticked)
  • CPU – 1 Socket, 1 Core, Default kvm64
  • Memory – 1Gb (Ballooning ticked)
  • Network – Bridged to vmbr0, Intel E1000 (Needed for RRAS as Virtio fails on RRAS setup (that’s another story)

Install Ubuntu Server basic install.

Back to the proxmox host console

Type qm monitor 101

Type device_add usb-host,id=usb999,vendorid=0x1058,productid=0x0701


Back to the MyUbuntu console and sudo as root

Type lspci -v | grep -i usb -A 8


00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) (prog-if 00 [UHCI])
Subsystem: Red Hat, Inc QEMU Virtual Machine
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at e040
Kernel driver in use: uhci_hcd


00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
Subsystem: Red Hat, Inc Qemu virtual machine
Flags: medium devsel, IRQ 9



Type dmesg | grep -i usb


[ 0.436818] ACPI: bus type USB registered
[ 0.436836] usbcore: registered new interface driver usbfs
[ 0.436848] usbcore: registered new interface driver hub
[ 0.436861] usbcore: registered new device driver usb
[ 1.211518] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.214412] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.217138] uhci_hcd: USB Universal Host Controller Interface driver
[ 1.241391] uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
[ 1.244378] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[ 1.245311] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.246254] usb usb1: Product: UHCI Host Controller
[ 1.247170] usb usb1: Manufacturer: Linux 4.4.0-21-generic uhci_hcd
[ 1.248078] usb usb1: SerialNumber: 0000:00:01.2
[ 1.249084] hub 1-0:1.0: USB hub found
[ 1.563772] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[ 1.725469] usb 1-1: New USB device found, idVendor=0627, idProduct=0001
[ 1.725519] usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=5
[ 1.725565] usb 1-1: Product: QEMU USB Tablet
[ 1.725593] usb 1-1: Manufacturer: QEMU
[ 1.725618] usb 1-1: SerialNumber: 42
[ 1.754182] usbcore: registered new interface driver usbhid
[ 1.754221] usbhid: USB HID core driver
[ 1.757107] input: QEMU QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input5
[ 1.757478] hid-generic 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU QEMU USB Tablet] on usb-0000:00:01.2-1/input0
[ 361.441496] usb 1-2: new full-speed USB device number 3 using uhci_hcd
[ 361.605478] usb 1-2: New USB device found, idVendor=0409, idProduct=55aa
[ 361.605481] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 361.605483] usb 1-2: Product: QEMU USB Hub
[ 361.605485] usb 1-2: Manufacturer: QEMU
[ 361.605486] usb 1-2: SerialNumber: 314159-0000:00:01.2-2
[ 361.607535] hub 1-2:1.0: USB hub found
[ 362.065511] usb 1-2.1: new full-speed USB device number 4 using uhci_hcd
[ 362.346236] usb 1-2.1: New USB device found, idVendor=1058, idProduct=0701
[ 362.346240] usb 1-2.1: New USB device strings: Mfr=89, Product=76, SerialNumber=63
[ 362.346242] usb 1-2.1: Product: External HDD
[ 362.346244] usb 1-2.1: Manufacturer: Western Digital
[ 362.346245] usb 1-2.1: SerialNumber: DEF10C122A23
[ 362.348277] usb 1-2.1: can't set config #1, error -32

Type lsusb


Bus 001 Device 004: ID 1058:0701 Western Digital Technologies, Inc. WD Passport (WDXMS)
Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
The drive doesn’t appear in /dev due to the error above, so it can’t be mounted.


So looks like its not just limited to just Windows VM’s

Note: I have also tried qm set 100 -usb0 host=1058:0701 instead of the "device_add" but that didn't work either, same issue...


I have installed proxmox on two different PowerEdge servers and clone pc running Intel i7, all with the similar results….

Tried different USB drives, I also tried to pass-through a USB keyboard and likewise that gets a yellow triangle.



If it works for you, I must be missing something but what????
 
Last edited:
The only thing differs from my test is that i'm using the flexVDI Guest Tools and NOT the ones from the virtwin-iso from fedora.
http://depot.flexvdi.com/guest-tools/

But i don't think that the issue is located there.


You underlined the dmesg message
can't set config #1, error -32

I think there is an issue with the power supply. Do you using any kind of USB hub or something else?

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Your USB controller is working in USB 1.1 mode? Why? Have you maybe set anything usb related setting in you BIOS/UEFI? The first "lusb" you pasted shows 2.0.
I'm sorry but i have no idea. Maybe it's a BIOS setting you set on every machine? I'm using also an intel usb controller with the same kernel driver.
 
When I do a dmesg on the proxmox host there is no errors and shows up on the host as /dev/sdc.

I can successfully mount and use the USB drive in the host. It just doesn't pass-through correctly to the guests.

I checked the BIOS and nothing to note in there. However it turns out the two usb ports on the front of a Dell Server are USB1, so I switched to the rear USB ports (USB2) and sadly still the same thing.

I know there is not a hardware issue on the dell server because prior to install proxmox for testing the server had VMWare ESXi installed and USB pass-through was working with the same USB drives, and on the front USB1 ports.
 
### SOLVED ###

With thanks to my colleague Craig he spotted the problem and found the solution.

I was missing something in my device_add.

qm monitor 101

device_add usb-ehci,id=usb,bus=pci.0,addr=0x4

device_add usb-host,id=usb999,vendorid=0x1058,productid=0x0701,bus=usb.0

I was missing the middle line (above) and then the last param on the last line to link to the middle line.

All sorted.....
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!