如何修复 Ubuntu 14.04 VirtualBox VM 中的 USB 3.0 问题

mcf*_*son 5 virtualbox macosx usb-storage xhci-hcd

在过去的几天里,我花了大量时间寻找解决这一挑战的方法。

我有一个 Seagate Expansion Desktop Drive,它是一个用于测试的外部 2 TB USB 3.0 磁盘。在一次测试中,该驱动器连接到我的 Macbook Pro 上的 USB 3.0 端口,并连接到我的 Mac Mini 上的 USB 3.0 端口进行另一次测试。Macbook Pro 和 Mac Mini 都安装了 virtualbox 并安装了 Ubuntu 客户机。该驱动器应该可供 ubuntu 来宾访问。

我当前的设置:Macbook Pro:

Model Name: MacBook Pro
  Model Identifier: MacBookPro11,1
  Processor Name:   Intel Core i7
  Processor Speed:  2,8 GHz
  Number of Processors: 1
  Total Number of Cores:    2
  L2 Cache (per Core):  256 KB
  L3 Cache: 4 MB
  Memory:   16 GB
  Boot ROM Version: MBP111.0138.B15
  SMC Version (system): 2.16f68
Run Code Online (Sandbox Code Playgroud)

版本:

主持人:

Mac OSX: 10.10.5
VirtualBox: 5.0.4 r102546
USB device: Seagate Expansion Desktop Drive 2TB
Oracle VM VirtualBox Extension Pack: 5.0.4r102546 Installed
In Setup - Ports - USB  USB 3.0 (xHCI) Controller is enabled
Run Code Online (Sandbox Code Playgroud)

客人:

Guest:  Ubuntu 14.04
VboxGuestAdditions installed
Run Code Online (Sandbox Code Playgroud)

uname -a

Linux patal-vbox-ubuntu-002 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

前提条件:希捷硬盘连接到 Macbook Pro(或 Mini)上的电源和 USB 3.0 端口(在 osx 中的 Filer 中弹出) Macbook Pro 启动并登录 VirtualBox 启动 Guest (Ubuntu 14.04) 启动并登录(窗口模式不是全屏)

预期结果:希捷硬盘应列在 ubuntu 设备下的文件管理器中。该驱动器应在 /dev 中列为驱动器,例如 ubuntu 中的 /dev/sdb 该驱动器应可在 ubuntu 中安装

实际结果:该驱动器未列在 ubuntu 中设备下的文件管理器中 该驱动器未列在 ubuntu 中 /dev 下

root@patal-vbox-ubuntu-002:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8, 0 sep 26 09:16 /dev/sda
brw-rw---- 1 root disk 8, 1 sep 26 09:11 /dev/sda1
brw-rw---- 1 root disk 8, 2 sep 26 09:16 /dev/sda2
brw-rw---- 1 root disk 8, 5 sep 26 09:11 /dev/sda5
Run Code Online (Sandbox Code Playgroud)

lsusb:

root@patal-vbox-ubuntu-002:~# lsusb
Bus 002 Device 002: ID 0bc2:3321 Seagate RSS LLC 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Run Code Online (Sandbox Code Playgroud)

Seagate RSS LLC 的详细 lsusb 输出:root@patal-vbox-ubuntu-002:~# lsusb -v

Bus 002 Device 002: ID 0bc2:3321 Seagate RSS LLC 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x3321 
  bcdDevice            1.00
  iManufacturer           2 Seagate
  iProduct                3 Expansion Desk
  iSerial                 1 NA4KX5JA
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          121
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-out pipe (0x04)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x0001
  Self Powered
Run Code Online (Sandbox Code Playgroud)

dmesg 输出:

[  795.810773] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd
[  795.829590] usb 2-1: New USB device found, idVendor=0bc2, idProduct=3321
[  795.829594] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[  795.829595] usb 2-1: Product: Expansion Desk
[  795.829596] usb 2-1: Manufacturer: Seagate
[  795.829597] usb 2-1: SerialNumber: NA4KX5JA
[  795.857795] usb 2-1: USB controller 0000:00:0c.0 does not support streams, which are required by the UAS driver.
[  795.857798] usb 2-1: Please try an other USB controller if you wish to use UAS.
[  795.857799] usb-storage 2-1:1.0: USB Mass Storage device detected
[  795.857848] scsi host5: usb-storage 2-1:1.0
[  822.485641] usb 2-1: reset SuperSpeed USB device number 3 using xhci_hcd
[  822.503463] xhci_hcd 0000:00:0c.0: xHCI xhci_drop_endpoint called with disabled ep ffff880013ebac00
[  822.503468] xhci_hcd 0000:00:0c.0: xHCI xhci_drop_endpoint called with disabled ep ffff880013ebac48
[  890.772127] audit_printk_skb: 120 callbacks suppressed
[  890.772130] audit: type=1400 audit(1443252349.697:62): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=2761 comm="apparmor_parser"
[  890.772135] audit: type=1400 audit(1443252349.697:63): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2761 comm="apparmor_parser"
[  890.772386] audit: type=1400 audit(1443252349.697:64): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2761 comm="apparmor_parser"
Run Code Online (Sandbox Code Playgroud)

我怀疑问题出在 dmesg 的这一行上:

[  795.857795] usb 2-1: USB controller 0000:00:0c.0 does not support streams, which are required by the UAS driver.
Run Code Online (Sandbox Code Playgroud)

是 Virtualbox 问题还是 Ubuntu 问题?ubuntu 无法正确处理 USB xHCI 控制器吗?

顺便说一下,驱动器在专用的 kubuntu 工作站上工作,在同一台 macbook pro 的 Windows 10 虚拟机上工作。

@nephente(按要求追加)我假设您的意思是将 VirtualBox 中的控制器设置为 USB 2.0 (EHCI) 控制器。如果是这种情况,那么我在 VirtualBox 中收到以下错误:

Failed to attach the USB device Seagate Expansion Desk [0100] to the virtual machine patal-vbox-ubuntu-002. 

Failed to create a proxy device for the USB device. 

(Error: VERR_PDM_NO_USB_PORTS). 

Result Code:    NS_ERROR_FAILURE (0x80004005) Component: ConsoleWrap Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Run Code Online (Sandbox Code Playgroud)

我也尝试过但没有提及的另一件事是将 USB 3.0 设备连接到 USB 2.0 集线器,然后将集线器连接到 Macbook Pro。这也不起作用。

@Takkat 感谢您建议创建过滤器并确保从 osx 卸载/弹出驱动器。

我为 Seagate Expansion Desk(台式机和台式机)创建了一个过滤器,并确保该驱动器未安装在 osx 中。

结果:确保未安装驱动器并为驱动器创建过滤器没有任何区别。该驱动器仍可识别,如本文开头所述。

Nic*_*Tux 5

最近在 VirtualBox 5.0 版中添加了 USB 3.0 支持。请在此处阅读发行说明。(要快速搜索,请使用浏览器中的搜索功能并输入“USB 3”)。

为了访问这个新功能,您必须安装扩展包。

在这里下载

为了安装扩展包,您必须右键单击下载的文件和“打开方式...” virtualbox。

我不知道这是否与 Linux 中的(在 MAC 中)相同,但是您可能需要将您的用户添加到“virtualbox”组中,以便毫无问题地访问某些功能。