USB hotplug guest

proximity

Well-Known Member
Jul 19, 2019
48
1
48
50
How can I configure so it is possible to plug in any random usb device and have it working in a guest automatically?

thx
 
depends on the device.but you should be able to plug it in and it shows up in usb hardware and you can pick vendor id. If you like using specific ports you just plug something in to that port and enable only that port being redirected.
 
Last edited:
That's not automatically. It is a VM with a normal desktop on it. I want the user to be able to just plug in any random usb device and have it working. They don't have any access to the host so it needs to be automatic.
 
I hope there is a better way but I currently worked around this by adding all devices from a group to vfio
IOMMU Group 10:
-e 0a:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller [1002:15de]
-e 0a:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
-e 0a:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e0]
-e 0a:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e1]
-e 0a:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3]

and then unbind and bind the driver in /etc/rc.local
echo '0000:0a:00.3' > /sys/bus/pci/drivers/xhci_hcd/unbind
echo '0000:0a:00.3' > /sys/bus/pci/drivers/vfio-pci/bind

and then add the pci device to 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!