USB Passthrough Seen as Root Hub in VM
-
@johanb7 I had the same problem in the past with FTDI-based USB device. I could see it in Xen host, but not in VM. I've spent many evenings trying to make it visible in VM, but with no luck though.
I don't know why, but seems that some USB devices won't attach to VM.
-
@krakers Hi, I have a similar issue the lsusb command on the vm shows a different product than the real one shown on the host for an USB pass-through device. I've followed all the steps for USB pass-through, the device is seen as the real device in XenCenter too but not on the Debian vm.
How can I fix this behavior ?
For information, the USB controller is on a PCIe card and I've tried to use this card using PCI pass-through without success (Operation not permitted on start of the vm) as plan B.
Thanks for your help.
-
@infodavid I don't think I managed to make it working for me. It's been 4 years and after ups and downs with using USB in VM I decided to let it go and no longer attach USB devices to VMs.
-
@krakers Thanks for your answer. The behavior is very strange, the device is attached on start of the vm but status changed to 'not attached' after boot of the vm, few seconds later.
-
I use VirtualHere on a Raspberry Pi as a workaround.
-
@uwood Smart workaround. Unfortunately you have to pay for VirtualHere and use another system to connect the device. It will be nice to have the USB devices working on the hypervisor.
-
@uwood I also switched to use this. I had nothing but trouble with USB passthrough. While initially working all hell broke loose when I detached a host from the pool, with the USB device appearing multiple times in GUI and CLI..... had to reinstall both hosts and pool from scratch.
Xen is just not made for this!
-
@manilx did you try to install the server part on the hypervisor? Is there a free plan for the software?
-
@infodavid I had a dedicated VM with passtrough on xcpng serving other VM's.
BUT: you can't snapshot a VM with passthrough, so you cannot backup if it is running. I also found that you can't migrate it.
It's just NOT worth the trouble. Install the server somewehere else. You can use it free for up to 3 USB connections (I think. Just check the website). -
@manilx so, solutions are:
- use a client / server solution perhaps on another system,
- Install some software directly on the hypervisor.
-
@infodavid Install VirtualHere server on another PC/Pie. I have it on a proxmox VM (proxmox has no issues with passthrough).
Install VirtualHere clients on the VM's in xcpng that need the USB devices.
Sleep well and backup/snapshot/migrate at will
-
@manilx 0k. The device is an ups so I'll try first to install a server software on the hypervisor. I'm not very enthusiastic about adding another system just to plug that ups.
-
Finally, I follow an existing topic and configure nut-server on the hypervisor to access the ups via usb.
I know that Olivier is not fully aligned with the fact that the host is modified but IMO it is an acceptable change on my XCP-NG host.