如何在VMWare ESXi 5.5下安装USB驱动器?

我想要将一个USB驱动器安装到VMWare ESXi 5.5主机上。

使用lsusb可以看到USB驱动器: Bus 01 Device 03: ID 154b:0095 PNY

但不在/vmfs

/dev/disks/我看到很多条目,但是如果其中一个是我的U盘,

 mpx.vmhba32:C0:T0:L0 vml.0000000000766d68626133323a303a30 mpx.vmhba33:C0:T0:L0 vml.0000000000766d68626133333a303a30 mpx.vmhba33:C0:T0:L0:1 vml.0000000000766d68626133333a303a30:1 mpx.vmhba34:C0:T0:L0 vml.0000000000766d68626133343a303a30 mpx.vmhba34:C0:T0:L0:1 vml.0000000000766d68626133343a303a30:1 mpx.vmhba34:C0:T0:L0:5 vml.0000000000766d68626133343a303a30:5 mpx.vmhba34:C0:T0:L0:6 vml.0000000000766d68626133343a303a30:6 mpx.vmhba34:C0:T0:L0:7 vml.0000000000766d68626133343a303a30:7 mpx.vmhba34:C0:T0:L0:8 vml.0000000000766d68626133343a303a30:8 

dmesg说:

 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: New USB device found, idVendor=154b, idProduct=0095 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: Product: USB 3.0 FD 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: Manufacturer: PNY Technologies 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: SerialNumber: 1955999360 2015-05-27T16:18:36.169Z cpu3:33302)<6>usb 1-6: usbfs: registered usb0103 2015-05-27T16:18:36.254Z cpu3:33302)<6>usb 1-3.1: new high speed USB device number 4 using ehci_hcd 

我尝试了几十个命令,其中包括:

  • chkconfig usbarbitrator off
  • esxcli storage core device list
  • esxcfg-rescan
  • esxcli storage vmfs extent list

我已经阅读了大约200个网页和KB,但我无法find确定正确的磁盘格式的方法。

dmesg某处我看到了这个:

 2015-05-27T16:18:36.739Z cpu3:33321)DMA: 612: DMA Engine 'vmhba32' created using mapper 'DMANull'. 2015-05-27T16:18:36.740Z cpu3:33321)<6>usb-storage 1-6:1.0: interface is claimed by usb-storage 

这是否意味着我的USB驱动器是vmhba32?

如果是的话,我可以以某种方式挂载它,或者我应该格式化它?

你为什么要这么做?

我在外部驱动器上安装了大量操作系统ISO,但是我无法直接安装它们。

以下是我所做的:

  • 在虚拟机中安装Debian
  • 将您想要访问的驱动器传递给Debian VM
  • 将USB驱动器挂载到虚拟机中(例如, /mnt/img0/mnt/img0
  • nfs-kernel-server安装到Debian机器上
  • configurationDebian的/etc/exports指向/mnt/img0 。 例如,你可以添加一行:

    /mnt/img0 1.2.3.4(rw,sync,no_subtree_check,all_squash)

    • 1.2.3.4replace为ESXi主机的IP地址
  • 在您的虚拟机设置中,添加一个新的NFS数据存储。 如果您的Debian VM指向IP地址,如果您使用上面的示例/etc/exports ,则将用户名和密码留空。

现在,您应该能够访问USB驱动器上的文件作为数据存储。 如果您通过sshlogin到ESXi主机,它也将挂载在/vmfs下。

无可否认,使用USB驱动器的工作量很大,但是这个工作非常有效。

我能够通过适当地格式化USB驱动器来实现这一点。 作为2GB或更less的FAT16分区(我的例子是500MB)

在Windows中,以pipe理员身份打开命令提示符并键入diskpart:

 C:\Windows\system32>diskpart Microsoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation. On computer: MIS-001 DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 465 GB 0 B Disk 1 Online 29 GB 0 B DISKPART> select disk 1 Disk 1 is now the selected disk. DISKPART> list part Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 29 GB 1024 KB DISKPART> clean DiskPart succeeded in cleaning the disk. DISKPART> active There is no partition selected. Please select a partition and try again. DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 465 GB 0 B * Disk 1 Online 29 GB 29 GB DISKPART> create part primary size=500 DiskPart succeeded in creating the specified partition. DISKPART> active DiskPart marked the current partition as active. DISKPART> format fs=fat quick 100 percent completed DiskPart successfully formatted the volume. DISKPART> assign DiskPart successfully assigned the drive letter or mount point. DISKPART> exit 

另外:/ u / ewwhite有人问这个问题:

“你为什么要这么做?”

在我的情况下,我必须在失败的硬件后重新安装networking驱动程序。 在主机发生严重故障后,我没有来宾访问权限,没有主机访问权限,也没有存储访问权限。 通过USB或CD重新安装NIC驱动程序是更新这些刀片的唯一方法。

虽然这似乎可能是有用的…(这真的可能是一个方便的事情)

VMware的神不允许它发生,所以除了引导和USB直通到虚拟机的支持用例之外,您实在没有办法select使用可移动介质或USB连接设备。

抱歉。