USB 3 Passthrough Error

twentytwo

New Member
Jan 18, 2020
28
0
1
37
Australia
Hello,

Can anyone help me as I am trying to pass through external had drive that is plug into USB 3 to Window 10 VM. I add USB Device - Use USB Port and selected port 2-9. Restart VM and no success to get access to the external portable HDD. I did check Device Manager saw the error which is Code 43 (The USB device returned an invalid USB configuration descriptor.) . Could anyone guide me to how to pass through USBs to Windows 10 VM?
 
Which Proxmox VE version are you running? Did you enable the "use USB3" checkbox?
 
hmm, how did you restart the VM? From within Windows? If so, try to do a restart from the Proxmox VE GUI or shut it down cleanly and start it again.
 
Do you think it is relate to lack of wider USB 3 device support or possible solution via file modification like 100.conf to enable those USB device that I mentioned?
 
Can you please show the config of the VM?
Code:
qm config <VMID>

The USB port is passed through to VMs USB controller, it does not really care what device is plugged in.
Another thing that you could try is to pass through a USB port and plug the disks in there.
 
Here is the config of the VM

agent: 1
balloon: 0
bios: ovmf
bootdisk: scsi0
cores: 4
cpu: host
efidisk0: local-zfs:vm-102-disk-1,size=128K
hostpci0: 02:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
memory: 15000
name: Production
net0: e1000=62:3D:19:4F:7F:0C,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: win10
scsi0: local-zfs:vm-102-disk-0,cache=writeback,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=ffd2ebfb-8eee-4b2f-a301-42388d6f1c10
sockets: 1
usb0: host=1-13.1,usb3=1
usb1: host=1-13.3,usb3=1
usb2: host=1-13.4,usb3=1
usb3: host=2-9,usb3=1
vga: none
vmgenid: 4e1d6f90-0f5e-470e-ae9e-550e2af4bdd3
 
I plugged external drive to USB1 which is USB 2 port which picked up the drive. I plugged USB 3 16GB into different USB 3 port after shutdown the VM and edit USB3. Tried that with the drive without success.

Shutdown the VM again and plug the 16GB into 3.1 USB which is the supported by the external drive and edited USB3 host and start VM. Tested the 16GB which is good but tried the drive without success, no errors in Device Manager.

Might be bug ?

Any suggestion?
 
Let's recap: external HDD on USB3 port is not recognized properly in the VM. external HDD on USB2 port is working. Flash drive in USB3 port is recognized in the VM.

Can you please show me the output of
Code:
qm showcmd <VMID> --pretty
Seems to me like there is some problem as to which USB controller the device is attached to in the VM :/
 
Output Scenario

1. Spinning drive working on USB2 port
--------------------------------------------------------------------
/usr/bin/kvm \
-id 102 \
-name Production \
-chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' \
-mon 'chardev=qmp,mode=control' \
-chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
-mon 'chardev=qmp-event,mode=control' \
-pidfile /var/run/qemu-server/102.pid \
-daemonize \
-smbios 'type=1,uuid=ffd2ebfb-8eee-4b2f-a301-42388d6f1c10' \
-drive 'if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/zvol/rpool/data/vm-102-disk-1' \
-smp '4,sockets=1,cores=4,maxcpus=4' \
-nodefaults \
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vga none \
-nographic \
-no-hpet \
-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,hv_ipi,kvm=off' \
-m 15000 \
-device 'vmgenid,guid=4e1d6f90-0f5e-470e-ae9e-550e2af4bdd3' \
-readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
-device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \
-device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
-device 'vfio-pci,host=0000:02:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' \
-device 'vfio-pci,host=0000:02:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.1,id=usb0' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.3,id=usb1' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.4,id=usb2' \
-device 'usb-host,bus=xhci.0,hostbus=2,hostport=3,id=usb3' \
-chardev 'socket,path=/var/run/qemu-server/102.qga,server,nowait,id=qga0' \
-device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
-device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:8b8d69156ff' \
-drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' \
-device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
-device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-drive 'file=/dev/zvol/rpool/data/vm-102-disk-0,if=none,id=drive-scsi0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' \
-device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
-netdev 'type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' \
-device 'e1000,mac=62:3D:19:4F:7F:0C,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
-rtc 'driftfix=slew,base=localtime' \
-machine 'type=q35+pve1' \
-global 'kvm-pit.lost_tick_policy=discard'


2. Spinning drive not working on USB3 port
--------------------------------------------------------------------

/usr/bin/kvm \
-id 102 \
-name Production \
-chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' \
-mon 'chardev=qmp,mode=control' \
-chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
-mon 'chardev=qmp-event,mode=control' \
-pidfile /var/run/qemu-server/102.pid \
-daemonize \
-smbios 'type=1,uuid=ffd2ebfb-8eee-4b2f-a301-42388d6f1c10' \
-drive 'if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/zvol/rpool/data/vm-102-disk-1' \
-smp '4,sockets=1,cores=4,maxcpus=4' \
-nodefaults \
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vga none \
-nographic \
-no-hpet \
-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,hv_ipi,kvm=off' \
-m 15000 \
-device 'vmgenid,guid=4e1d6f90-0f5e-470e-ae9e-550e2af4bdd3' \
-readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
-device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \
-device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
-device 'vfio-pci,host=0000:02:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' \
-device 'vfio-pci,host=0000:02:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.1,id=usb0' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.3,id=usb1' \
-device 'usb-host,bus=xhci.0,hostbus=1,hostport=13.4,id=usb2' \
-device 'usb-host,bus=xhci.0,hostbus=2,hostport=3,id=usb3' \
-chardev 'socket,path=/var/run/qemu-server/102.qga,server,nowait,id=qga0' \
-device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
-device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:8b8d69156ff' \
-drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' \
-device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
-device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-drive 'file=/dev/zvol/rpool/data/vm-102-disk-0,if=none,id=drive-scsi0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' \
-device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
-netdev 'type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' \
-device 'e1000,mac=62:3D:19:4F:7F:0C,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
-rtc 'driftfix=slew,base=localtime' \
-machine 'type=q35+pve1' \
-global 'kvm-pit.lost_tick_policy=discard'
 
Thanks for the output for the working and non-working example. They are completely identical though.

It might be possible that the big HDD has some problems with the passthrough...

As a workaround, you could pass through the USB controller as PCI device if it's possible with your hardware.
 
Thanks for the output for the working and non-working example. They are completely identical though.

It might be possible that the big HDD has some problems with the passthrough...

As a workaround, you could pass through the USB controller as PCI device if it's possible with your hardware.
How to do this?
 
How to do this?
The same way you passed your GPU. Except you don't check the Primary GPU box.

IF you can't identify the USB controller through the GUI, try running command through the shell:
lspci -v |grep "USB"

Your motherboard can have more than one controller. (My motherboard had 1 controller per 4 5Gbps and 2 10Gbps ports)
 
  • Like
Reactions: Whitterquick
The same way you passed your GPU. Except you don't check the Primary GPU box.

IF you can't identify the USB controller through the GUI, try running command through the shell:
lspci -v |grep "USB"

Your motherboard can have more than one controller. (My motherboard had 1 controller per 4 5Gbps and 2 10Gbps ports)
I will give this a try, thanks :)
 
The same way you passed your GPU. Except you don't check the Primary GPU box.

IF you can't identify the USB controller through the GUI, try running command through the shell:
lspci -v |grep "USB"

Your motherboard can have more than one controller. (My motherboard had 1 controller per 4 5Gbps and 2 10Gbps ports)

This worked and I was able to pass it through, but when I click on one of the disks in ‘Files’ I receive the following error message:
This location could not be displayed.
You do not have the permissions necessary to view the contents of “HDD1”.
How do I fix this?
 
The same way you passed your GPU. Except you don't check the Primary GPU box.

IF you can't identify the USB controller through the GUI, try running command through the shell:
lspci -v |grep "USB"

Your motherboard can have more than one controller. (My motherboard had 1 controller per 4 5Gbps and 2 10Gbps ports)

Do you leave PCI-Express checked?
The owner of these drives is systemd-coredump, is there a way to change this using GUI?
 
Last edited:
Do you leave PCI-Express checked?
The owner of these drives is systemd-coredump, is there a way to change this using GUI?
I leave pcie checked.

If you pass through the controller, I don't see why you'd need to change the permissions. Is this an error in windows 10?
 
Last edited:
I leave pcie checked.

If you pass through the controller, I don't see why you'd need to change the permissions. Is this an error in windows 10?

It was in a Linux VM, I formatted the drives in Ubuntu Live and now they have strange permissions in the VM.
 

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!