<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[USB passthrough test reports in 7.5RC1]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a><br />
Hi</p>
<p dir="auto">It would appear usb pass through is non functional, which is a shame.<br />
My only options are</p>
<ol>
<li>Plan A, wait untill it is fixed, is this probable?</li>
<li>Plan B, install the software on the hypervisor, not good, but probably feasible (freenas is a bit like this, but it is possible as extra's are placed in a protected area<br />
and do not get disabled though updates)</li>
<li>Plan C Raspberry Pi.</li>
</ol>
<p dir="auto">Thanks</p>
<p dir="auto">Aimee</p>
]]></description><link>https://xcp-ng.org/forum/topic/266/usb-passthrough-test-reports-in-7-5rc1</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 14:11:49 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/266.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Aug 2018 18:37:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Fri, 09 Oct 2020 22:05:03 GMT]]></title><description><![CDATA[<p dir="auto">I have good experience with WiBu Key dongles and a "Matrix USB-Key" (also license dongle) but couldn't get an Aladdin HASP working.<br />
I can pass it through (it's visible and attached) but the VM doesn't show it in device manger (Windows 10 1909). I gave up for now and will probably use a network USB thingie from SEH - already have 2 of their devices running in different environments and they work flawlessly.</p>
]]></description><link>https://xcp-ng.org/forum/post/32264</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/32264</guid><dc:creator><![CDATA[cg]]></dc:creator><pubDate>Fri, 09 Oct 2020 22:05:03 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 25 Jul 2020 13:20:31 GMT]]></title><description><![CDATA[<p dir="auto">Let's give it another try to give my host its USB controller back and pass-through just the USB devices. In this case we're going for a virtual machine hosting common USB devices for home domotica.</p>
<p dir="auto">The devices we want to pass-through:</p>
<ul>
<li>Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)<br />
Which apparently is technical speak for a RFXtrx433XL USB 433.92MHz Transceiver</li>
<li>Prolific Technology, Inc. PL2303 Serial Port<br />
Which apparently is technical speak for a ZiGate USB-TTL</li>
<li>Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB</li>
</ul>
<p dir="auto">I'm using XCP-ng Center 20.04.00 to help me out and XCP-NG 8.1 on the host.</p>
<p dir="auto">Let's start with a good old:</p>
<pre><code>[12:56 vmhost ~]# xe pusb-list host-uuid=*****
uuid ( RO)            : 2ba8de5b-8fe1-0262-f741-35b4ed350ae0
            path ( RO): 1-2
       vendor-id ( RO): 067b
     vendor-desc ( RO): Prolific Technology, Inc.
      product-id ( RO): 2303
    product-desc ( RO): PL2303 Serial Port
          serial ( RO):
         version ( RO): 1.10
     description ( RO): Prolific Technology, Inc._PL2303 Serial Port


uuid ( RO)            : 08b23122-e01b-9ab2-e72d-185648ae19d7
            path ( RO): 1-7
       vendor-id ( RO): 0403
     vendor-desc ( RO): Future Technology Devices International, Ltd
      product-id ( RO): 6015
    product-desc ( RO): Bridge(I2C/SPI/UART/FIFO)
          serial ( RO): *******
         version ( RO): 2.00
     description ( RO): Future Technology Devices International, Ltd_Bridge(I2C/SPI/UART/FIFO)_DO2VQGDG
</code></pre>
<p dir="auto">Ok, we have 2 devices already ready to be passthrough. Let's try to make the third one show up!<br />
Using the follow commands and some reading I could identify the DENY rules in "/etc/xensource/usb-policy.conf", which prevent my Aeotec Z-Stick from showing.</p>
<pre><code>[13:06 vmhost ~]# /opt/xensource/libexec/usb_scan.py -d
[13:06 vmhost ~]# cat /var/log/user.log | less
</code></pre>
<p dir="auto">I've adjusted my "/etc/xensource/usb-policy.conf" to the following:</p>
<pre><code># When you change this file, run 'xe pusb-scan' to confirm
# the file can be parsed correctly.
#
# Syntax is an ordered list of case insensitive rules where # is line comment
#  and each rule is (ALLOW | DENY) : ( match )*
#  and each match is (class|subclass|prot|vid|pid|rel) = hex-number
# Maximum hex value for class/subclass/prot is FF, and for vid/pid/rel is FFFF
#
# USB Hubs (class 09) are always denied, independently of the rules in this file
DENY: vid=17e9 # All DisplayLink USB displays
ALLOW:vid=0658 pid=0200 class=02 # Aeotec Z-Stick Gen5 (ZW090) - UZB
DENY: class=02 # Communications and CDC-Control
ALLOW:vid=056a pid=0315 class=03 # Wacom Intuos tablet
ALLOW:vid=056a pid=0314 class=03 # Wacom Intuos tablet
ALLOW:vid=056a pid=00fb class=03 # Wacom DTU tablet
DENY: class=03 subclass=01 prot=01 # HID Boot keyboards
DENY: class=03 subclass=01 prot=02 # HID Boot mice
ALLOW:vid=0658 pid=0200 class=0a # Aeotec Z-Stick Gen5 (ZW090) - UZB
DENY: class=0a # CDC-Data
DENY: class=0b # Smartcard
DENY: class=e0 # Wireless controller
DENY: class=ef subclass=04 # Miscellaneous network devices
ALLOW: # Otherwise allow everything else
</code></pre>
<p dir="auto">but also tried:</p>
<pre><code># When you change this file, run 'xe pusb-scan' to confirm
# the file can be parsed correctly.
#
# Syntax is an ordered list of case insensitive rules where # is line comment
#  and each rule is (ALLOW | DENY) : ( match )*
#  and each match is (class|subclass|prot|vid|pid|rel) = hex-number
# Maximum hex value for class/subclass/prot is FF, and for vid/pid/rel is FFFF
#
# USB Hubs (class 09) are always denied, independently of the rules in this file
DENY: vid=17e9 # All DisplayLink USB displays
ALLOW:vid=0658 pid=0200 # Aeotec Z-Stick Gen5 (ZW090) - UZB
ALLOW: class=02 # Communications and CDC-Control
ALLOW:vid=056a pid=0315 class=03 # Wacom Intuos tablet
ALLOW:vid=056a pid=0314 class=03 # Wacom Intuos tablet
ALLOW:vid=056a pid=00fb class=03 # Wacom DTU tablet
DENY: class=03 subclass=01 prot=01 # HID Boot keyboards
DENY: class=03 subclass=01 prot=02 # HID Boot mice
ALLOW: class=0a # CDC-Data
DENY: class=0b # Smartcard
DENY: class=e0 # Wireless controller
DENY: class=ef subclass=04 # Miscellaneous network devices
ALLOW: # Otherwise allow everything else
</code></pre>
<p dir="auto">After some playing around we got:</p>
<pre><code>[13:14 vmhost ~]# xe pusb-scan host-uuid=*****
[13:15 vmhost ~]# xe pusb-list host-uuid=*****
uuid ( RO)            : 0f7d6f12-6c4e-4f71-0c81-f7a7503a75f1
            path ( RO): 1-8
       vendor-id ( RO): 0658
     vendor-desc ( RO): Sigma Designs, Inc.
      product-id ( RO): 0200
    product-desc ( RO): Aeotec Z-Stick Gen5 (ZW090) - UZB
          serial ( RO):
         version ( RO): 2.00
     description ( RO): Sigma Designs, Inc._Aeotec Z-Stick Gen5 (ZW090) - UZB


uuid ( RO)            : 2ba8de5b-8fe1-0262-f741-35b4ed350ae0
            path ( RO): 1-2
       vendor-id ( RO): 067b
     vendor-desc ( RO): Prolific Technology, Inc.
      product-id ( RO): 2303
    product-desc ( RO): PL2303 Serial Port
          serial ( RO):
         version ( RO): 1.10
     description ( RO): Prolific Technology, Inc._PL2303 Serial Port


uuid ( RO)            : 08b23122-e01b-9ab2-e72d-185648ae19d7
            path ( RO): 1-7
       vendor-id ( RO): 0403
     vendor-desc ( RO): Future Technology Devices International, Ltd
      product-id ( RO): 6015
    product-desc ( RO): Bridge(I2C/SPI/UART/FIFO)
          serial ( RO): *****
         version ( RO): 2.00
     description ( RO): Future Technology Devices International, Ltd_Bridge(I2C/SPI/UART/FIFO)_DO2VQGDG
</code></pre>
<p dir="auto">Well we're ready for some pass-through, right?</p>
<p dir="auto">Using XCP-ng Center we can see these 3 devices and "Enable pass-through" for all of these 3 devices. After shutting down the VM, using properties we can attach all 3 USB-devices and start the VM again, but not before running the following command as was recommended:</p>
<pre><code>xe vm-param-set uuid=**** platform:device-model=qemu-upstream-compat
</code></pre>
<p dir="auto">Let's start and monitor dmesg:</p>
<pre><code>[  742.309309] block tda: sector-size: 512/512 capacity: 20971520
[  742.727012] device vif6.0 entered promiscuous mode
[  742.961272] device tap6.0 entered promiscuous mode
[  743.068536] usb 1-8: reset full-speed USB device number 4 using xhci_hcd
[  743.217985] cdc_acm 1-8:1.0: ttyACM0: USB ACM device
[  743.376482] usb 1-8: reset full-speed USB device number 4 using xhci_hcd
[  743.525903] cdc_acm 1-8:1.0: ttyACM0: USB ACM device
[  743.571126] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  743.571136] ftdi_sio 1-7:1.0: device disconnected
[  743.700284] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
[  743.851993] ftdi_sio 1-7:1.0: FTDI USB Serial Device converter detected
[  743.852018] usb 1-7: Detected FT-X
[  743.852171] usb 1-7: FTDI USB Serial Device converter now attached to ttyUSB0
[  743.984286] usb 1-8: reset full-speed USB device number 4 using xhci_hcd
[  744.137611] cdc_acm 1-8:1.0: ttyACM0: USB ACM device
[  744.138491] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  744.138500] ftdi_sio 1-7:1.0: device disconnected
[  744.268258] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
[  744.420007] ftdi_sio 1-7:1.0: FTDI USB Serial Device converter detected
[  744.420029] usb 1-7: Detected FT-X
[  744.420464] usb 1-7: FTDI USB Serial Device converter now attached to ttyUSB0
[  744.465529] pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
[  744.465539] pl2303 1-2:1.0: device disconnected
[  744.592213] usb 1-2: reset full-speed USB device number 2 using xhci_hcd
[  744.741634] pl2303 1-2:1.0: pl2303 converter detected
[  744.742254] usb 1-2: pl2303 converter now attached to ttyUSB1
[  744.876149] usb 1-8: reset full-speed USB device number 4 using xhci_hcd
[  745.025388] cdc_acm 1-8:1.0: ttyACM0: USB ACM device
[  745.025629] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  745.025636] ftdi_sio 1-7:1.0: device disconnected
[  745.156079] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
[  745.307475] ftdi_sio 1-7:1.0: FTDI USB Serial Device converter detected
[  745.307495] usb 1-7: Detected FT-X
[  745.307652] usb 1-7: FTDI USB Serial Device converter now attached to ttyUSB0
[  745.308046] pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
[  745.308054] pl2303 1-2:1.0: device disconnected
[  747.307309] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  747.307318] ftdi_sio 1-7:1.0: device disconnected
[  747.435543] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
[  747.586967] ftdi_sio 1-7:1.0: FTDI USB Serial Device converter detected
[  747.586987] usb 1-7: Detected FT-X
[  747.587202] usb 1-7: FTDI USB Serial Device converter now attached to ttyUSB0
[  756.026324] device tap6.0 left promiscuous mode
[  756.744069] vif vif-6-0 vif6.0: Guest Rx ready
[  757.925017] usb 1-2: reset full-speed USB device number 2 using xhci_hcd
[  758.321147] usb 1-2: reset full-speed USB device number 2 using xhci_hcd
[  768.745084] pl2303 1-2:1.0: pl2303 converter detected
[  768.746207] usb 1-2: pl2303 converter now attached to ttyUSB1
[  769.803089] device vif6.0 left promiscuous mode
</code></pre>
<p dir="auto">And <a href="/forum/assets/uploads/files/1595678047377-xensource.txt">xensource.log</a> as txt file while the VM started and got shutdown.</p>
<p dir="auto">Oh and so far everything looked good, right? Everything got attached, the VM booted and the properties of the VM shows that all 3 devices are "Attached".</p>
<p dir="auto">On the VM running ubuntu I get the following:</p>
<pre><code>vm@vm:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 12M
        |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=pl2303, 12M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
</code></pre>
<p dir="auto">My USB 1.1 device (ZiGate) is present! The other 2 devices are USB2.0 and those are magically missing?! Why? How? What did I do wrong!? What can I try to make this work?</p>
<p dir="auto">Ah well, time to pci-pass-through my USB controller into that device again, although I would have prefered USB-passthrough! I did also apply scottyXCPNG's workaround, but not allow my USB 2.0 devices to be passed into the VM with those applied.</p>
]]></description><link>https://xcp-ng.org/forum/post/29452</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/29452</guid><dc:creator><![CDATA[groentjuh]]></dc:creator><pubDate>Sat, 25 Jul 2020 13:20:31 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Thu, 18 Jun 2020 21:20:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/stormi" aria-label="Profile: stormi">@<bdi>stormi</bdi></a> Not at all sadly. The Device never passes though..</p>
]]></description><link>https://xcp-ng.org/forum/post/27891</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/27891</guid><dc:creator><![CDATA[anthr76]]></dc:creator><pubDate>Thu, 18 Jun 2020 21:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Tue, 12 May 2020 12:21:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/stormi" aria-label="Profile: stormi">@<bdi>stormi</bdi></a><br />
Good Morning!<br />
When executing the command xe pusb-list I have no return.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1589286027289-totermw_rhkrrfjh3f.png" alt="totermw_rhkrRFJh3F.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/26477</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/26477</guid><dc:creator><![CDATA[andreborges]]></dc:creator><pubDate>Tue, 12 May 2020 12:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Tue, 12 May 2020 09:25:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi. Does <a href="https://xcp-ng.org/docs/compute.html#usb-passthrough" target="_blank" rel="noopener noreferrer nofollow ugc">https://xcp-ng.org/docs/compute.html#usb-passthrough</a> help in your situation?</p>
]]></description><link>https://xcp-ng.org/forum/post/26455</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/26455</guid><dc:creator><![CDATA[stormi]]></dc:creator><pubDate>Tue, 12 May 2020 09:25:27 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Fri, 08 May 2020 15:06:10 GMT]]></title><description><![CDATA[<p dir="auto">Good Morning!<br />
I'm new to xcp-ng, we have two Hyper-V hosts but we needed to add a usb token to a vm, so we decided to migrate a host to xcp-ng for testing, but my host is not giving me the option passthrough usb, my server is a dell T110 II, I have already checked the bios settings and apparently everything is fine.<br />
I don't know what I could be doing wrong.<br />
I'm using version 8.1 of xcp-ng and xcp-ng center 20.04.<br />
I'm sorry if I posted the wrong call!</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1588950365205-xencentermain_tp1dcckyvk.png" alt="XenCenterMain_Tp1dcckyVk.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/26340</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/26340</guid><dc:creator><![CDATA[andreborges]]></dc:creator><pubDate>Fri, 08 May 2020 15:06:10 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 01 Mar 2020 17:37:30 GMT]]></title><description><![CDATA[<p dir="auto">A <em>slightly</em> less hacky work around for USB v1 passthrough based on the issue I created:</p>
<pre><code>--- /opt/xensource/libexec/usb_scan.py     2019-11-04 10:03:02.000000000 +0000
+++ /tmp/usb_scan.py    2020-03-01 17:32:29.266317478 +0000
@@ -152,10 +152,11 @@
     _CLASS = "bDeviceClass"
     _CONF_VALUE = "bConfigurationValue"
     _NUM_INTERFACES = "bNumInterfaces"
+    _USB_SPEED = "speed"
 
     _PRODUCT_DESC = [_DESC_VENDOR, _DESC_PRODUCT]
     _PRODUCT_DETAILS = [_VERSION, _ID_VENDOR, _ID_PRODUCT, _BCD_DEVICE, _SERIAL,
-                        _CLASS, _CONF_VALUE, _NUM_INTERFACES]
+                        _CLASS, _CONF_VALUE, _NUM_INTERFACES, _USB_SPEED]
     _PROPS = _PRODUCT_DESC + _PRODUCT_DETAILS
     _PROPS_NONABLE = _PRODUCT_DESC + [_SERIAL]
 
@@ -590,7 +591,10 @@
 
     pusb["path"] = device.get_node()
     # strip the leading space of "version"
-    pusb["version"] = device[UsbDevice._VERSION].strip()
+    if int(device[UsbDevice._USB_SPEED]) &lt;= 12:
+        pusb["version"] = "1.00"
+    else:
+        pusb["version"] = device[UsbDevice._VERSION].strip()
     pusb["vendor-id"] = device[UsbDevice._ID_VENDOR]
     pusb["product-id"] = device[UsbDevice._ID_PRODUCT]
     pusb["vendor-desc"] = device[UsbDevice._DESC_VENDOR]
</code></pre>
<p dir="auto">in <em>theory</em> any deice which is "low" or "full" speed (i.e. USB1) will have it's version number changed to 1.00 which forces xenopsd to use a USB1 bus.  It may have side effects if the driver in the guest relies on the version number so caveat emptor.</p>
]]></description><link>https://xcp-ng.org/forum/post/23050</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23050</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sun, 01 Mar 2020 17:37:30 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 01 Mar 2020 15:39:42 GMT]]></title><description><![CDATA[<p dir="auto">OK, this is rather amusing.  I've got USB passthrough working for my USB 1.0 device.</p>
<pre><code>[15:28 xcp-ng-bywirlgr log]# diff -u /opt/xensource/libexec/usb_scan.py.orig /opt/xensource/libexec/usb_scan.py
--- /opt/xensource/libexec/usb_scan.py.orig     2019-11-04 10:03:02.000000000 +0000
+++ /opt/xensource/libexec/usb_scan.py  2020-03-01 15:20:53.323512746 +0000
@@ -590,7 +590,8 @@
 
     pusb["path"] = device.get_node()
     # strip the leading space of "version"
-    pusb["version"] = device[UsbDevice._VERSION].strip()
+    #pusb["version"] = device[UsbDevice._VERSION].strip()
+    pusb["version"] = "1.00"
     pusb["vendor-id"] = device[UsbDevice._ID_VENDOR]
     pusb["product-id"] = device[UsbDevice._ID_PRODUCT]
     pusb["vendor-desc"] = device[UsbDevice._DESC_VENDOR]
</code></pre>
<p dir="auto">I do <em><strong>NOT</strong></em> recommend this <em><strong>AT ALL</strong></em>.  It is a gross hack.  Apparently the xenopsd relies on the version number returned by the device to dictate the USB bus type of the controller it attaches to.  I have no idea in what universe that makes sense.</p>
<p dir="auto">The above only works for me as that is the only USB device attached to the HV.  I guess I could make the code a little smarter by looking for a particular device ID and only over-riding the version then</p>
]]></description><link>https://xcp-ng.org/forum/post/23046</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23046</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sun, 01 Mar 2020 15:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 01 Mar 2020 15:20:43 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, perfect <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ab1daa29750" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/23045</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23045</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sun, 01 Mar 2020 15:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 01 Mar 2020 15:19:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> created <a href="https://github.com/xcp-ng/xcp/issues/342" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/xcp-ng/xcp/issues/342</a> under xcp project.  Thanks!</p>
<div class="row github-embeds-container">

<div class="col-md-6">
<div class="github-embed card">
<div class="card-body">

<div class="meta">
<img class="author-picture not-responsive" src="https://avatars.githubusercontent.com/u/61658282?v=4" title="ScottyGuy" />
<a href="https://github.com/ScottyGuy"><span class="username">ScottyGuy</span></a> created this issue <span class="timeago" title="2020-03-01T15:17:50Z"></span> in <a href="//github.com/xcp-ng/xcp">xcp-ng/xcp</a>
</div>
<h3>
<span class="badge closed float-end">closed</span>
<a href="https://github.com/xcp-ng/xcp/issues/342">Please create test packages to help with USB support (related to CA-328130 )</a>
<span class="number">#342</span>
</h3>



</div>
</div>
</div>

</div>]]></description><link>https://xcp-ng.org/forum/post/23044</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23044</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sun, 01 Mar 2020 15:19:05 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 01 Mar 2020 14:46:27 GMT]]></title><description><![CDATA[<p dir="auto">Can you create an issue asking for this detailed change to be made? We can create a test package with this change, so it won't impact other users <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ab1daa29750" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/23040</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23040</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sun, 01 Mar 2020 14:46:27 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 29 Feb 2020 18:08:03 GMT]]></title><description><![CDATA[<p dir="auto">Further update: I've found the USB device is added to qemu after the vm has started through hot plugging.  It seems this is done in xenopsd.   It even has explicit code to support USB v1 devices in there</p>
<p dir="auto">According to xenopsd sources from 0.101.0 from the XCP-NG 8.0 SRPM, the code is</p>
<pre><code>let vusb_plug ~xs ~privileged ~domid ~id ~hostbus ~hostport ~version =
  debug "vusb_plug: plug VUSB device %s" id;
  let get_bus v =
    if String.startswith "1" v then
      "usb-bus.0"
    else begin
      (* Here plug usb controller according to the usb version*)
      let usb_controller_driver = "usb-ehci" in
      let driver_id = "ehci" in
      vusb_controller_plug ~xs ~domid ~driver:usb_controller_driver ~driver_id;
      Printf.sprintf "%s.0" driver_id;
    end
  in
  if Qemu.is_running ~xs domid then
    begin
      (* Need to reset USB device before passthrough to vm according to CP-24616.
         Also need to do deprivileged work in usb_reset script if QEMU is deprivileged.
      *)
      begin match Qemu.pid ~xs domid with
        | Some pid -&gt; usb_reset_attach ~hostbus ~hostport ~domid ~pid ~privileged
        | _ -&gt; raise (Xenopsd_error (Internal_error (Printf.sprintf "qemu pid does not exist for vm %d" domid)))
      end;
      let cmd = Qmp.(Device_add Device.(
                     { driver = "usb-host";
                       device = USB {
                         USB.id = id;
                         params = Some USB.({bus = get_bus version; hostbus; hostport})
                       }
                     }
                  ))
      in qmp_send_cmd domid cmd |&gt; ignore
    end
</code></pre>
<p dir="auto">unfortunately I cannot find where the mysterious "version" parameter is that needs to be set to "1" to enable the use of USB bus 0 in the guest, which is USB 1.  I'm wondering if it's stupidly reading the version string of the USB device itself rather than something else</p>
<p dir="auto">I note that the latest code in the upstream xapi-project/xenopsd <a href="https://github.com/xapi-project/xenopsd/blob/master/xc/device.ml#L1818" target="_blank" rel="noopener noreferrer nofollow ugc">device.ml line 1818</a> is radically different and now has a "speed" parameter.  This was added in commit ab15e6c3b1b06b2eac4f2a8be724eac50c9d4b22 in Oct 2019 for CA-328130 (whatever that is).  It looks like code was also added to the upstream xapi-project/xenapi to add the "speed" parameter to the data model there.  So there <em><strong>may</strong></em> be a fix in a future version of XCP-NG if they pull in these fixes.  I haven't looked at 8.1-beta but I suspect it's too late to go making wholesale changes there if the code hasn't already been merged.</p>
<p dir="auto">ok, just downloaded the SRPM from 8.1 xenopsd and it still has the old code for vusb plug, so I'm guessing 8.1 doesn't have this fixed (yet)</p>
]]></description><link>https://xcp-ng.org/forum/post/23033</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23033</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sat, 29 Feb 2020 18:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 29 Feb 2020 17:46:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/axiom00" aria-label="Profile: axiom00">@<bdi>axiom00</bdi></a> yes, once I dug further I had the same issues.  I don't have anything to pair with my stick yet, I was trying to get it working before splashing out on zigbee devices.  I'm not sure why it's having issues.  If you look at the Conbee serial protocol it's all done via binary commands sent over 38400 baud serial, so it should work OK.  I also had an issue where my stick disconnected/reconnected after about an hour and came up with a different path in /dev so it didn't attach any more.  I suspect this was because qemu was holding the original device open.</p>
<p dir="auto">To remove the device from the vm again do</p>
<pre><code>xe vm-param-remove vm-param-add uuid=&lt;uuid&gt; param-name=platform param-key=hvm_serial
</code></pre>
<p dir="auto">else it won't start if the serial device isn't present.</p>
]]></description><link>https://xcp-ng.org/forum/post/23032</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23032</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sat, 29 Feb 2020 17:46:11 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 29 Feb 2020 05:03:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/scottyxcpng" aria-label="Profile: ScottyXCPNG">@<bdi>ScottyXCPNG</bdi></a> Do you mind sharing details on how you attached your Conbee 2 stick? My setup is a vm Ubuntu running deconz in docker. deconz "see" the stick as a raspbee gateway and the channel is set to 0. Hence I cannot pair anything. Clicking on the channel set button doesn't do anything. deconz log show invalid current channel 0 (todo) repeatedly.</p>
]]></description><link>https://xcp-ng.org/forum/post/23022</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/23022</guid><dc:creator><![CDATA[axiom00]]></dc:creator><pubDate>Sat, 29 Feb 2020 05:03:52 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 22 Feb 2020 16:36:20 GMT]]></title><description><![CDATA[<p dir="auto">Nice workaround indeed!! Well done and thanks a lot for reporting your progress, that's essential for the whole community <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ab1daa29750" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">edit: start a chat with me, I'd like to send you some goodies <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ab1daa29750" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://xcp-ng.org/forum/post/22803</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22803</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 22 Feb 2020 16:36:20 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 22 Feb 2020 15:59:02 GMT]]></title><description><![CDATA[<p dir="auto">Bonus: I just tried and snapshot/backup still works with the serial port tied in that way</p>
]]></description><link>https://xcp-ng.org/forum/post/22802</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22802</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sat, 22 Feb 2020 15:59:02 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 22 Feb 2020 15:58:16 GMT]]></title><description><![CDATA[<p dir="auto">Update:  I haven't been able to figure out how to tell qemu to use a USB1.x interface instead of USB2.x (EHCI) which would let me pass the device through, but I've found a different work around.  The device I'm trying to pass through appears as a USB serial device.  After I stumbled upon a page mentioning that you could tie an emulated serial port to a TCP socket I dug further and found that you can do</p>
<pre><code>xe vm-param-add uuid=&lt;uuid&gt; param-name=platform hvm_serial=/dev/ttyACM0
</code></pre>
<p dir="auto">and hey presto your /dev/ttyS0 in the guest is now tied to the device on the hypervisor</p>
<p dir="auto">I may still poke around and try and find a better solution but for now my needs appear to be satisfied.</p>
]]></description><link>https://xcp-ng.org/forum/post/22801</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22801</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sat, 22 Feb 2020 15:58:16 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Tue, 18 Feb 2020 14:04:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Thanks for the reply <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/stormi" aria-label="Profile: stormi">@<bdi>stormi</bdi></a></p>
<p dir="auto">I've kind of hit a roadblock in my own probing so far.  I was trying to figure out how the VUSB parameters got passed into qemu.  The daemon.log shows it's run by forkexecd, but comparing the command of the same vm run with and without VUSB shows no real differences, so there must be a configuration file or other metadata being passed in with the VUSB passthrough configuration.  I tried poking at the xenapi and quickly got lost in the ocaml code which I can't really read.</p>
<p dir="auto">I've also found that a VM with a VUSB attached cannot be snapshotted and backed up, which is <em>really</em> unfortunate.  I'm not entirely sure why that restriction exists.  Surely if the VM is rolled back to the snapshot then the system can treat it the same as if the USB device vanishes?  It seems that the system removes the VUSB attachment if the device vanishes so I would have thought the same could be done from snapshots or backups?</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Gary</p>
]]></description><link>https://xcp-ng.org/forum/post/22681</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22681</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Tue, 18 Feb 2020 14:04:26 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Mon, 17 Feb 2020 16:10:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the feedback and interesting findings. I have really little knowledge about all this, so I can't answer your questions. Maybe <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/r1" aria-label="Profile: r1">@<bdi>r1</bdi></a> will have partial answers. Else this is an area where, at short term, I hope that the community, step by step, gets closer to a solution that we could implement.</p>
]]></description><link>https://xcp-ng.org/forum/post/22646</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22646</guid><dc:creator><![CDATA[stormi]]></dc:creator><pubDate>Mon, 17 Feb 2020 16:10:24 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sun, 16 Feb 2020 14:57:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have XCP-NG 8.0 loaded onto an Intel NUC and I'm trying to pass a USB device through to a guest V.M.  Although the setup using the CLI seems to go OK, the guest never sees the device.  I've tried 2 different guests with no success</p>
<p dir="auto">Digging into the logs a bit more I found this:</p>
<pre><code>Feb 15 14:20:49 xcp-ng-bywirlgr qemu-dm-17[18527]: qemu-dm-17: Warning: speed mismatch trying to attach usb device "ConBee II" (full speed) to bus "ehci.0", port "1" (high speed)
</code></pre>
<p dir="auto">This seems to come from <a href="https://github.com/xcp-ng/qemu-dp/blob/master/hw/usb/bus.c#L510" target="_blank" rel="noopener noreferrer nofollow ugc">qemu-dp/hw/usb/bus.c:usb_check_attach()</a> which sets the warning if the speed of the probed USB device is different to the speed of the emulated USB controller in the guest (at least that's what I think it does)</p>
<p dir="auto">Despite the fact that it is classed as a warning, it appears to abort the attachment of the device to the guest in <a href="https://github.com/xcp-ng/qemu-dp/blob/master/hw/usb/bus.c#L533" target="_blank" rel="noopener noreferrer nofollow ugc">qemu-dp/hw/usb/bus.c:usb_device_attach()</a> if the warning has been generated.</p>
<ul>
<li>
<p dir="auto">is it possible to use one of the "xe vusb-param-*" commands to set the emulated USB bus to USB 1.x   instead of 2.x (ehci)?  I haven't been able to trace back where the bus is created yet</p>
</li>
<li>
<p dir="auto">if not, is it possible to comment out that check and see what happens?  To be honest, the check puzzles me.  It is perfectly valid to plug a FULL speed (USB1.x) device into a HIGH speed (USB2.x) or SUPER speed (USB3.x) bus and have it work normally.  There might be some magic have to happen at the port level to make it work, but it works just fine as the USB 1.x device I'm trying to use is plugged into a USB 2.x port on my NUC</p>
</li>
</ul>
<p dir="auto">Any ideas?</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Gary</p>
]]></description><link>https://xcp-ng.org/forum/post/22600</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22600</guid><dc:creator><![CDATA[ScottyXCPNG]]></dc:creator><pubDate>Sun, 16 Feb 2020 14:57:51 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Sat, 08 Feb 2020 17:04:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kcah427" aria-label="Profile: kcah427">@<bdi>kcah427</bdi></a> did you do anything special to pass through the USB card?</p>
<p dir="auto">I'm trying with a ASM1142 but can not boot the VM once it is assigned.</p>
<p dir="auto">Is there a particular reason why you chose the card that you used?</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://xcp-ng.org/forum/post/22167</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/22167</guid><dc:creator><![CDATA[jmccoy555]]></dc:creator><pubDate>Sat, 08 Feb 2020 17:04:54 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Thu, 15 Aug 2019 17:12:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kcah427" aria-label="Profile: kcah427">@<bdi>kcah427</bdi></a> Thanks for sharing your solution. I end up using a Raspberry Pi as a Socat host and passing the USB Zigbee stick over ethernet to the VM. Not ideal but it works.</p>
]]></description><link>https://xcp-ng.org/forum/post/15628</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/15628</guid><dc:creator><![CDATA[axiom00]]></dc:creator><pubDate>Thu, 15 Aug 2019 17:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Thu, 15 Aug 2019 08:57:42 GMT]]></title><description><![CDATA[<p dir="auto">That's a solution <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61b.png?v=ab1daa29750" class="not-responsive emoji emoji-android emoji--stuck_out_tongue" style="height:23px;width:auto;vertical-align:middle" title=":p" alt="😛" /></p>
]]></description><link>https://xcp-ng.org/forum/post/15607</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/15607</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 15 Aug 2019 08:57:42 GMT</pubDate></item><item><title><![CDATA[Reply to USB passthrough test reports in 7.5RC1 on Thu, 15 Aug 2019 03:04:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/axiom00" aria-label="Profile: axiom00">@<bdi>axiom00</bdi></a></p>
<p dir="auto">I did a bit more research and determined that XCP-ng was passing the USB device through to the guest OS, although either didn't have the right drivers for my z-wave USB stick, or otherwise didn't know what to do with it; so it always just passed it to the guest as a root hub.</p>
<p dir="auto">I wasn't particularly interested in spending too much more time on it so I purchased the following PCI-E card and passed the whole controller through to the guest. That solved my problem and it has been working ever since.</p>
<p dir="auto"><a href="https://www.amazon.com/gp/product/B00JFR2H64/ref=ppx_yo_dt_b_asin_title_o05_s00" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.amazon.com/gp/product/B00JFR2H64/ref=ppx_yo_dt_b_asin_title_o05_s00</a></p>
]]></description><link>https://xcp-ng.org/forum/post/15599</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/15599</guid><dc:creator><![CDATA[kcah427]]></dc:creator><pubDate>Thu, 15 Aug 2019 03:04:58 GMT</pubDate></item></channel></rss>