Understanding USB Passthrough Limitations

gdi2k

Renowned Member
Aug 13, 2016
83
1
73
We have a VM that we would like to attach a USB device to, using USB passthrough. However, it is also an important VM that must have minimal downtime, so we need to be able to live migrate it to other PVE cluster members when doing server upgrades etc.

I would like to know if it is possible to attach / detach USB devices while the VM is running, or if it only works with reboots of the VM. I understand from the wiki that initial config requires a reboot, but that the VM will boot without the configured USB device, and accept it once it becomes available on the host. But can it then be detached prior to migration? Will all migration be blocked if any USB device is passed through, even if it is detached?

Alternatively, if we had an identical USB hardware device on the target server during migration, would this work?

The VM in question is a VOIP PBX, and the device in question is a USB FXO device (allows PBX to connect to analog PSTN); Sangoma USBfxo. Obviously voice calls through the device would be dropped during migration, but the analog lines are only used minimally, so it's a non-issue for us.
 
this does not work currently

we do not detect if the device is present and the config is non hot pluggable at the moment (due to some technical issues)
we abort migration if we detect local devices

there is one option though:

if you use the -force parameter of the qm migration call, it should migrate regardless but beware: this may not work and has potential to break something

in general i do not think this can reliably work because the hardware is for sure in a different state on the two hosts and there you will run into errors

another option entirely is to use a network usb hub
 
Thanks for the clarifications dcsapak, good that I took advice here before pulling the trigger. Would you have any recommendations with regard to Network USB hub hardware that work with Linux / Proxmox VE?
 
Thanks for the clarifications dcsapak, good that I took advice here before pulling the trigger. Would you have any recommendations with regard to Network USB hub hardware that work with Linux / Proxmox VE?
no real recommendations here, maybe someone in the community has such a setup and can chime in here?

but the hub has to be compatible with the os running inside the vm, because there sits the network client, proxmox ve would not even know there is a usb device
 
Hi gdi2k, you may take an terminal server like moxa 3050 and attach your pstn there, so you could share the serial connection over tcp/ip
cu peje
 
Or use an USB over IP solution, like this. It's supported on Windows and Linux on multiple architectures. You might be able to install the server component on the HN and the client in the VM. Just an idea.
 
Many thanks for all the suggestions, will definitely look into these.

I am also considering just setting up a cheap stand alone Asterisk box and connecting the FXO to that - maybe even a Raspberry Pi could do the job...
 

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!