【问题标题】:How do I pass a generic USB peripheral from macOS X host to Ubuntu 16.04 x64 guest in VirtualBox?如何将通用 USB 外围设备从 macOS X 主机传递到 VirtualBox 中的 Ubuntu 16.04 x64 来宾?
【发布时间】:2019-04-29 21:58:23
【问题描述】:

我可以在我的 macOS 主机上执行此操作以在命令行上查看 USB 设备

ioreg -p IOUSB
+-o Root  <class IORegistryEntry, id 0x100000100, retain 21>
  +-o AppleUSBVHCIBCE Root Hub Simulation@80000000  <class AppleUSBRootHubDevice, id 0x1000004c7, registered, matched, active, busy 0 (0 ms), retain 18>
  | +-o iBridge FaceTime HD Camera (Built-in)@80200000  <class AppleUSBDevice, id 0x1000004c9, registered, matched, active, busy 0 (4 ms), retain 18>
  | +-o iBridge ALS@80300000  <class AppleUSBDevice, id 0x1000004ce, registered, matched, active, busy 0 (2 ms), retain 11>
  | +-o Headset@80400000  <class AppleUSBDevice, id 0x1000004d2, registered, matched, active, busy 0 (3 ms), retain 14>
  | +-o iBridge@80100000  <class AppleUSBDevice, id 0x1000004d6, registered, matched, active, busy 0 (3 ms), retain 13>
  | +-o iBridge Display@80600000  <class AppleUSBDevice, id 0x1000004ed, registered, matched, active, busy 0 (2 ms), retain 15>
  | +-o iBridge DFR brightness@80700000  <class AppleUSBDevice, id 0x1000004f1, registered, matched, active, busy 0 (1 ms), retain 11>
  | +-o Apple Internal Keyboard / Trackpad@80500000  <class AppleUSBDevice, id 0x100001fbf, registered, matched, active, busy 0 (11 ms), retain 22>
  +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, id 0x100000511, registered, matched, active, busy 0 (0 ms), retain 9>
  | +-o USB2.0 Hub             @14300000  <class AppleUSBDevice, id 0x100000cac, registered, matched, active, busy 0 (2 ms), retain 16>
  |   +-o USB 2.0 Hub@14340000  <class AppleUSBDevice, id 0x100000ce0, registered, matched, active, busy 0 (2 ms), retain 18>
  |   | +-o USB Optical Mouse@14343000  <class AppleUSBDevice, id 0x100000d0e, registered, matched, active, busy 0 (4 ms), retain 14>
  |   | +-o USB Keyboard@14344000  <class AppleUSBDevice, id 0x100000d23, registered, matched, active, busy 0 (5 ms), retain 16>
  |   | +-o PCAN-USB@14341000  <class AppleUSBDevice, id 0x100002f33, registered, matched, active, busy 0 (1 ms), retain 14>
  |   | +-o PCAN-USB@14342000  <class AppleUSBDevice, id 0x100002f7a, registered, matched, active, busy 0 (1 ms), retain 14>
  |   +-o Flash Disk      @14330000  <class AppleUSBDevice, id 0x100002f8e, registered, matched, active, busy 0 (1 ms), retain 14>
  +-o AppleUSBXHCI Root Hub Simulation@00000000  <class AppleUSBRootHubDevice, id 0x100000cc4, registered, matched, active, busy 0 (1 ms), retain 9>
    +-o USB3.0 Hub             @00100000  <class AppleUSBDevice, id 0x100000cc8, registered, matched, active, busy 0 (2 ms), retain 15>
      +-o Plugable UD-3900@00110000  <class AppleUSBDevice, id 0x10000159d, registered, matched, active, busy 0 (24 ms), retain 31>

现在...假设我想使用闪存盘或 PCAN-USB 之类的设备并将其直接传递给我的 Ubuntu 16.04 x64 VirtualBox VM?

我已经按照这些思路在我的 macOSX 主机 (Mohave 10.14.1) 上安装了 VirtualBox 扩展包

https://askubuntu.com/questions/25596/how-to-set-up-usb-for-virtualbox

安装这些东西后,我将 VM 上的总线设置为 USB 2.0,然后尝试让它检测插入主机的 USB 设备,但到目前为止没有运气。

我注意到在 VirtualBox USB 设置中我可以做一个过滤器......我可以以某种方式通过 USB 设备吗?如果是这样,我不知道如何根据 macOS 主机正确设置过滤器。这就是它的样子。

有没有人能够在 VirtualBox 中手动设置一个从 macOS 主机传递到 linux VM 的 USB 设备?任何帮助表示赞赏!

【问题讨论】:

    标签: macos usb virtual-machine virtualbox


    【解决方案1】:

    我想多了……原来我只需要在安装 VirtualBox 和 VB 扩展包后重新启动我的机器。

    重新启动我的主机,然后在 VirtualBox 中从冷启动启动我的虚拟机后,我现在可以看到我所有的 USB 设备!

    对于任何好奇如何获取 USB 过滤器设置的 USB 信息的人来说,这个命令似乎给出了正确的输出:

    system_profiler SPUSBDataType
    

    示例输出:

    PCAN-USB:
    
                  Product ID: 0x000c
                  Vendor ID: 0x0c72
                  Version: 54.ff
                  Speed: Up to 12 Mb/sec
                  Manufacturer: PEAK-System Technik GmbH
                  Location ID: 0x14342000 / 36
                  Current Available (mA): 500
                  Current Required (mA): 200
                  Extra Operating Current (mA): 0
    
    PCAN-USB:
    
                  Product ID: 0x000c
                  Vendor ID: 0x0c72
                  Version: 54.ff
                  Speed: Up to 12 Mb/sec
                  Manufacturer: PEAK-System Technik GmbH
                  Location ID: 0x14341000 / 35
                  Current Available (mA): 500
                  Current Required (mA): 200
                  Extra Operating Current (mA): 0
    

    【讨论】:

    • 向任何使用 macOS 主机上的 Ubuntu VM 并遇到性能问题的人提供提示 -- 我的 Ubuntu VM 运行速度也非常慢,直到我在 VirtualBox 中为我的 VM 的显示选项启用硬件加速 :)
    • 另外,这个用户似乎证实了我的经历forums.virtualbox.org/viewtopic.php?f=8&t=87706
    猜你喜欢
    • 2011-08-19
    • 2013-06-23
    • 2020-02-07
    • 2010-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-27
    • 2017-04-29
    相关资源
    最近更新 更多