XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. fjen
    3. Posts
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 7
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: USB passthrough test reports in 7.5RC1

      @olivierlambert Thank you! 😄

      posted in Development
      F
      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. 😞

      posted in Development
      F
      fjen
    • RE: USB passthrough test reports in 7.5RC1

      @olivierlambert

      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

      posted in Development
      F
      fjen
    • 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.

      1. 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 is vid:pid that will come in handy later.

      1. Run /opt/xensource/libexec/usb_scan.py -d and run cat /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'.

      1. Edit the /etc/xensource/usb-policy.conf file and add
      ALLOW:vid=<vid> pid=<pid> class=<bDeviceClass>
      

      using the values from earlier.

      1. 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.

      1. 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.

      1. Run xe pusb-param-set uuid=<uuid> passthrough-enabled=true with the UUID from earlier.

      2. Shutdown the target VM.

      3. 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.

      1. Run xe vusb-create usb-group-uuid=<group_uuid> vm-uuid=<vm_uuid>

      2. 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.

      posted in Development
      F
      fjen
    • RE: USB passthrough test reports in 7.5RC1

      @olivierlambert

      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?

      posted in Development
      F
      fjen
    • RE: USB passthrough test reports in 7.5RC1

      @aimdev

      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.

      posted in Development
      F
      fjen
    • 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.

      posted in Development
      F
      fjen