usb3=yes not working?

sshaikh

Well-Known Member
Apr 23, 2017
74
22
48
I'm trying to pass through a USB3 device as per:

https://pve.proxmox.com/wiki/USB_Devices_in_Virtual_Machines

As I am running PVE5.0, I understand that all I should need to do is set usb3=yes, so something like this:

usb0: host:4-1,usb3=yes

However this doesn't work. I do see a new xhci controller in the Windows guest, but it is in an error state with

"This device cannot find enough free resources that it can use. (Code 12)

And so the USB 3 device isn't detected.

I see that in previous versions we also had to add in a different way:

args: -device nec-usb-xhci,id=xhci,addr=0x1b,bus=pci.1 -device usb-host,bus=xhci.0,vendorid=0x0480,productid=0xa007


But I read this approach as being deprecated for QEMU > 4.

If it makes any difference, I am also passing though an nVidia GPU.
 
If you're using PVE5.0 just do it via the GUI. On the hardware tab, just add USB device. Select your USB device/Drive and check the box for USB3.
Works perfectly here for passing through an RDX cartridge for backups.
 
So it seems that the VGA passthrough is the issue. For that to work I need:

hostpci0: 01:00,pcie=1,x-vga=on

Which in turn needs:

machine: q35

And apparently nec-usb-xhci doesn't work with q35, as it is attached to a PCI slot instead of a PCIE slot (?)

Any tips on how to fix this? The issue appears to be in the following generated flag:

-device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b'

I tried setting this manually to

-device 'nec-usb-xhci,id=xhci,bus=pcie.0,addr=0x1b'

but I get the following error:

kvm:/usr/share/qemu-server/pve-q35.cfg:62: PCI: slot 27 function 0 not available for ich9-intel-hda, in use by nec-usb-xhci
 
The trick it seems is to manually add the usb devices. For eg:

args: -device nec-usb-xhci,id=xhci -device usb-host,bus=xhci.0,hostbus=4,hostport=2

Omitting bus and addr seems to allow the nec-usb-xhci driver to assign to pcie.

That said, my USB devices still don't like this and I'm getting tons of disconnects. I may try passing through the whole USB controller next - does anyone know how this might be achieved?

EDIT:

lspci -v to get the address, and then add it to your vm config as usual:

hostpci1: [id]
 
Last edited:

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!