ESXi USB PCIe 直通无法连接连接的设备

ESXi USB PCIe 直通无法连接连接的设备

我已安装并运行了 ESXi 6.7U2,可以成功启动虚拟机。在此设置中,我添加了StarTech.com 4 端口 USB 3.0 卡适配器 (PEXUSB3S44V)。这已配置为通过以下https://kb.vmware.com/s/article/1010789。这可以配置为直通到虚拟机:

虚拟机配置

USB PCIe 控制器在此处被检测为uPD720202 USB 3.0 主机控制器。单个 PCIe 适配器有 4 个独立控制器,为了简单起见,我选择将它们全部通过,以便尝试调试此问题。

我曾尝试在虚拟机中使用 Amazon Linux 2(本地)和 Ubuntu Server 18.04.2,以下内容在两者中似乎是等效的。

串行通信输出显示预期的直通设备:

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev 02)
00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)
02:01.0 SATA controller: VMware SATA AHCI controller
03:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
04:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
0b:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)
13:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
1b:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

系统盘将设备连接到适配器之前的输出:

Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

查看消息尝试连接设备时的输出取决于设备(USB 集线器、USB 数据驱动器等),我要么没有得到额外的输出,要么:

[  818.213414] xhci_hcd 0000:04:00.0: Abort failed to stop command ring: -110
[  818.213435] xhci_hcd 0000:04:00.0: xHCI host controller not responding, assume dead
[  818.213453] xhci_hcd 0000:04:00.0: HC died; cleaning up
[  818.213467] xhci_hcd 0000:04:00.0: WARNING: Host System Error
[  818.213497] xhci_hcd 0000:04:00.0: Error while assigning device slot ID
[  818.213511] xhci_hcd 0000:04:00.0: Max number of devices this xHCI host supports is 32.
[  818.213526] usb usb4-port1: couldn't allocate usb_device
[  818.213538] xhci_hcd 0000:04:00.0: Error while assigning device slot ID
[  818.213551] xhci_hcd 0000:04:00.0: Max number of devices this xHCI host supports is 32.
[  818.213565] usb usb3-port1: couldn't allocate usb_device

显然,虚拟机中检测到了一个设备,但有些东西阻止它成功连接。

我尝试过的东西(参考https://bbs.archlinux.org/viewtopic.php?id=236536):

  1. 设置内核参数iommu=soft pci=nomsi
  2. 设置内核参数 intel_iommu=off
  3. 不同的虚拟机(如上所述)
  4. 确保 USB 设备在 VM 启动时已连接
  5. 将 ESXi 主机电源管理设置为“高性能”

为了确认我没有遇到硬件/电源问题,我通过从 USB(LinuxMint)启动来放弃同一硬件上的虚拟机管理程序。在这里,PCIe 适配器可以与所有连接的设备正常工作,所以我认为可以排除这种情况。

目前我的怀疑是:

  1. 尽管网上有很多帖子表明它可以正常工作(这也是我购买它的原因),但这款 uPD720202 芯片组与 ESXi 不兼容。
  2. 我缺少 ESIx 主机内的一些关键配置。

如果有人发现我可以尝试的任何明显的效果,或者想要额外的输出,我将不胜感激。

答案1

看起来它是选项 1,硬件兼容性。

我换了StarTech.com 4 端口 USB 3.0 卡适配器 (PEXUSB3S44V)为一个4 端口 HighPoint RocketU RU1144D现在可以按预期工作。

答案2

由于 vMotion,VMware 向客户推荐使用 USB over IP。不鼓励直接通过 USB 主机控制器,因为虚拟机随后会绑定到物理主机。您无法通过连接到 StarTech 或 RocketU USB 端口的 USB 设备的原因是什么?ESXi 中不需要 USB 设备的驱动程序,vMotion 应该“正常工作”,VMware 更有可能响应支持请求。当然,如果您的主机需要关闭,则无论虚拟机在何处运行,都会暂时丢失设备,但这可能比关闭虚拟机更好。JMHO,很高兴您有工作要做。

这里不是这种情况,但为了让其他人清楚,当 ESXi 从 USB 启动时,不支持主板主机控制器的直通或者使用 USB 作为其本地存储(例如,用于核心转储文件,该配置会导致在启动时打开文件句柄)。请参阅https://kb.vmware.com/s/article/2068645

相关内容