Xcp-ng usb passthrough

Anyone had luck passing through a usb device to a vm? My xcp-ng host sees the usb, but after configuring passthrough to a vm, the vm doesn’t see it. I’m specifically trying to pass through an aeotec zstick for homeassistant. After changing the DENY class=02 to ALLOW and rebooting the host, it’s now seen when running a pusb-list. It seems like the host is passing it through, but the vm isn’t seeing it. I’m thinking of trying ser2net but would like to avoid that aggravation if possible. Any suggestions would be appreciated.

When you run dmesg on the host, does it show the device?

I have made this work, but it was something of a struggle. Below are some notes that I made for my project to pass a USB plotter connection to a VM. Note that your GUIDs will not match what I got (shown below). You do have to get a command line session on the xcp-ng host to execute the xe commands.

How to configure USB Passthrough with XenServer using xe CLI


1. Plug the USB devices to the XenServer host

2. Enable passthrough

xe pusb-list
	uuid ( RO)            : 83088b6f-0aae-88b2-8829-0945c437e346
				path ( RO): 5-1
		   vendor-id ( RO): 0fe6
		 vendor-desc ( RO): ICS Advent
		  product-id ( RO): 811e
		product-desc ( RO): Parallel Adapter
			  serial ( RO):
			 version ( RO): 1.10
		 description ( RO): ICS Advent_Parallel Adapter
xe pusb-param-set uuid=83088b6f-0aae-88b2-8829-0945c437e346 passthrough-enabled=true

3. Shut down the target guest VM that you want to pass the USB device through since hot plug is not supported.

4. Attach the USB device to the VM, run the following command:

xe usb-group-list PUSB-uuids=83088b6f-0aae-88b2-8829-0945c437e346
	uuid ( RO)                : 38b38107-d2a2-db30-decd-a2aa76c4a445
			  name-label ( RW): Group of 0fe6 811e USBs
		name-description ( RW):

xe vusb-create usb-group-uuid=38b38107-d2a2-db30-decd-a2aa76c4a445 vm-uuid=0490a094-7a64-5e90-b0e0-bf5d7ec5d3c3
5. Start the target guest VM.

xe vm-start uuid=0490a094-7a64-5e90-b0e0-bf5d7ec5d3c3

To detatch:

xe vusb-unplug uuid=<vusb_uuid>		(Unplugs USB from VM)
xe vusb-destroy uuid=<vusb_uuid> 	(Removes the VUSB list from VM)

Thanks greeners for the steps…I’ve done those. The host sees the device, but guest does not. Dmesg does not show the device on the guest.

For anyone wondering, I was able to fix my issue by installing a usb pci card and passing it through. After blacklisting it from dom0 and rebooting, I’m now working perfectly.


Thanks, I might need to do this to get a USB audio device working for some quicker testing. Need to roll out a new DAW and having the ability to mess it up and go back with a simple snapshot will speed up development time. Going to try first through the onboard USB since this is several updates of XCP-NG different from when you posted this.