@olivierlambert Thank you!
Posts made by fjen
-
RE: USB passthrough test reports in 7.5RC1
@olivierlambert Ah thanks for the test! Guess the feature just doesn't play well with my Bluetooth dongle and mouse.
-
RE: USB passthrough test reports in 7.5RC1
Actually, re-doing the procedure on a fresh VM, I actually got the same error... This doesn't happen with XCP-ng Center though.
I can resolve it though by specifying the
platform:device-model
parameter.xe vm-param-set uuid=<uuid> platform:device-model=qemu-upstream-compat
-
RE: USB passthrough test reports in 7.5RC1
@olivierlambert Sure thing!
Because I was passing through a USB Bluetooth dongle, I had to specifically create an "allow" entry in
/etc/xensource/usb-policy.conf
.- Run
lsusb
and identify the device to be passed through.
Bus 001 Device 002: ID 1b70:100f Bus 001 Device 003: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Bus 001 Device 005: ID 0557:7000 ATEN International Co., Ltd Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 006: ID 0557:2419 ATEN International Co., Ltd
I happened to want to pass through the Cambridge Silicon Radio entry. Note the ID of
0a12:0001
. The format isvid:pid
that will come in handy later.- Run
/opt/xensource/libexec/usb_scan.py -d
and runcat /var/log/user.log | grep "'idVendor': '<vid>'"
. I found the line that had:
Aug 1 11:56:24 ascension usb_scan.py DEBUG: UsbDevice: (u'1-12', {'idVendor': '0a12', 'ID_VENDOR_FROM_DATABASE': u'Cambridge Silicon Radio, Ltd', 'bConfigurationValue': '1', 'bDeviceClass': 'e0', 'ID_MODEL_FROM_DATABASE': u'Bluetooth Dongle (HCI mode)', 'version': ' 2.00', 'idProduct': '0001', 'bNumInterfaces': ' 2', 'serial': '', 'bcdDevice': '8891'})#012#011|__ UsbInterface: (u'1-12:1.0', {'bInterfaceNumber': '00', 'bInterfaceClass': 'e0', 'bInterfaceProtocol': '01', 'bInterfaceSubClass': '01'})#012#011|__ UsbInterface: (u'1-12:1.1', {'bInterfaceNumber': '01', 'bInterfaceClass': 'e0', 'bInterfaceProtocol': '01', 'bInterfaceSubClass': '01'})
but a different device would have a different line but similar content. Note down the 'bDeviceClass'.
- Edit the
/etc/xensource/usb-policy.conf
file and add
ALLOW:vid=<vid> pid=<pid> class=<bDeviceClass>
using the values from earlier.
- Rerun
/opt/xensource/libexec/usb_scan.py -d
and the USB Device should now be added.
Now to actually pass through the USB to the VM.
- Run
xe pusb-list
. My output is:
uuid ( RO) : f20850de-c998-5541-4d16-f06eccf87b40 path ( RO): 1-12 vendor-id ( RO): 0a12 vendor-desc ( RO): Cambridge Silicon Radio, Ltd product-id ( RO): 0001 product-desc ( RO): Bluetooth Dongle (HCI mode) serial ( RO): version ( RO): 2.00 description ( RO): Cambridge Silicon Radio, Ltd_Bluetooth Dongle (HCI mode) uuid ( RO) : 8560df9a-d712-687b-1f36-3ecd1c84dad1 path ( RO): 1-2 vendor-id ( RO): 0764 vendor-desc ( RO): Cyber Power System, Inc. product-id ( RO): 0501 product-desc ( RO): CP1500 AVR UPS serial ( RO): version ( RO): 1.10 description ( RO): Cyber Power System, Inc._CP1500 AVR UPS
I actually have 2 USB devices but I didn't want to pass through the UPS. Note the UUID of the USB device:
f20850de-c998-5541-4d16-f06eccf87b40
.-
Run
xe pusb-param-set uuid=<uuid> passthrough-enabled=true
with the UUID from earlier. -
Shutdown the target VM.
-
Run
xe usb-group-list PUSB-uuids=<uuid>
. For me, output is:
uuid ( RO) : 316ac764-39fe-4120-0d6a-759ecb81a1ea name-label ( RW): Group of 0a12 0001 USBs name-description ( RW):
Note the group UUID of
316ac764-39fe-4120-0d6a-759ecb81a1ea
.-
Run
xe vusb-create usb-group-uuid=<group_uuid> vm-uuid=<vm_uuid>
-
Run
xe vm-start uuid=<vm_uuid>
Those are the exact procedures I followed to try to get my USB passed through. Hope it will help troubleshoot!
For most devices, you probably don't have to do the first section. My UPS showed up perfect fine without the first section.
- Run
-
RE: USB passthrough test reports in 7.5RC1
For me, I basically followed the instructions on Citrix's docs regarding USB Passthrough.
Interesting now, I'm getting an error trying to boot the VM of:
INTERNAL_ERROR(xenopsd internal error: Call to usb reset failed: Forkhelpers.Spawn_internal_error("usage: usb_reset.py attach [-h] -d DOMID -p PID [-r RESET_ONLY] device\nusb_reset.py attach: error: argument -r: expected one argument\n", "", _))
The VM will actually finish its boot, but it won't look like it to XO or XCP-ng Center for a few seconds.
I can test with XS7.5 instead but it seems like it's an enterprise only feature? Also, would the revert to XS simply involve inserting the ISO and doing an "upgrade" or would it need to be fresh?
-
RE: USB passthrough test reports in 7.5RC1
Just wanted to chime in here and say that USB Passthrough is also non-functional for me. Can't pass through a USB Bluetooth dongle, even though I added an allow run to the
usb-policy.conf
file and it shows up fine in the CLI and XCP-ng Center. -
RE: XCP-ng 7.5.0 Release Candidate
Upgrading via
yum
went smoothly! Had a slight issue with the reboot. The XCP-ng splash would display and the bar would go all the way down, but the server wouldn't actually turn off. Had to do a power cycle over IPMI.