系统详细信息:
- RHEL 8.8 虚拟机
- ESXi 6.5
问题:将我的 USB 作为存储设备连接到虚拟机。我的笔记本电脑上的 USB 端口是 3.2。USB 密钥是 USB 3.0。
当我尝试将其连接到虚拟机时,出现以下列出的错误:
[519002.985348] usb usb1-port1: attempt power cycle
[519003.163267] usb 1-1: new high-speed USB device number 56 using ehci-pci
[519003.180165] usb 1-1: Invalid ep0 maxpacket: 9
[519003.298280] usb 1-1: new high-speed USB device number 57 using ehci-pci
[519003.317998] usb 1-1: Invalid ep0 maxpacket: 9
[519003.323299] usb usb1-port1: unable to enumerate USB device
但是,如果我将 USB 2.0 驱动器插入同一个 USB 插槽,它就会连接到 VM,没有任何问题。
我会尝试在/etc/modprobe.d
called 中添加一个文件disable-uas.conf
并添加类似如下的行:
options usb-storage quirks=21c4:0cc7:u
但不幸的是,RHEL 看不到该驱动器,因此我无法获取idvendor
和idproduct
。类似于此:
[353100.609396] usb 1-1: new high-speed USB device number 17 using ehci-pci
[353100.979162] usb 1-1: New USB device found, idVendor=21c4, idProduct=0cc7, bcdDevice=11.00
[353100.979173] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[353100.979180] usb 1-1: Product: USB Flash Drive
[353100.979186] usb 1-1: Manufacturer: Lexar
[353100.979191] usb 1-1: SerialNumber: 576EBADSYLR6RLN2
[353100.984665] usb-storage 1-1:1.0: USB Mass Storage device detected
[353100.985634] scsi host34: usb-storage 1-1:1.0
[353102.739453] scsi 34:0:0:0: Direct-Access Lexar USB Flash Drive 1100 PQ: 0 ANSI: 4
[353102.739697] scsi 34:0:0:0: alua: supports implicit and explicit TPGS
[353102.739704] scsi 34:0:0:0: alua: No target port descriptors found
[353102.740438] sd 34:0:0:0: Attached scsi generic sg3 type 0
[353102.758080] sd 34:0:0:0: [sdd] 60620800 512-byte logical blocks: (31.0 GB/28.9 GiB)
[353102.768101] sd 34:0:0:0: [sdd] Write Protect is off
[353102.768109] sd 34:0:0:0: [sdd] Mode Sense: 43 00 00 00
[353102.776265] sd 34:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[353102.837641] sdd: sdd1
[353102.882526] sd 34:0:0:0: [sdd] Attached SCSI removable disk
[353106.593692] fat__get_entry: 214 callbacks suppressed
答案1
我找到了问题。登录 vmware,导航到您的 VM,然后右键单击 VM 以访问设置。检查我是否有 USB 3.0 控制器,我没有。我添加了它。现在我的 VM 使用 USB 3.0 识别 USB 密钥。
至于大容量存储设备,我有一个通过 USB 3.0 连接的 SanDisk Extreme 1TB SSD 驱动器。当我尝试将其安装到 VM 时,即使它识别了该驱动器,它也会将其自动卸载。我将 idproduct 和 idvendor 值添加到 /etc/modprobe.d 中名为 disable-uas.conf 的文件中,这也解决了我的问题。