How to mount an USB drive under VMWare ESXi 5.5

hardwareusb-flash-drivevmware-esxivmware-vsphere

I want to mount an USB drive to VMWare ESXi 5.5 host.

The USB drive is visible with lsusb :
Bus 01 Device 03: ID 154b:0095 PNY

But not under /vmfs.

Under /dev/disks/ I see many entries, but dunno if one of those is my USB disk:

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 says:

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

I tried dozens of commands, including:

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

And I have read approximately 200 web pages and KBs, but I was not able to find the way to identify the right disk to be able to format it.

Somewhere in dmesg I saw this:

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

Does it means that my USB drive is vmhba32?

If yes can I mount it somehow, or should I format it?

Best Answer

Why are you trying to do this?

I have a whole bunch of operating system ISOs on an external drive that I'd like to use on my home ESXi 6 lab, but I can't mount them directly.

Here's what I did:

  • Install Debian in a virtual machine
  • Pass the drive you'd like to access to the Debian VM
  • Mount the USB drive(s) in the VM, (for example, to /mnt/img0)
  • Install nfs-kernel-server into the Debian machine
  • Configure Debian's /etc/exports to point to /mnt/img0. For example, you could add the line:

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

    • Replace 1.2.3.4 with the IP address of your ESXi host
  • In your virtual machine settings, add a new NFS datastore. Point it to the IP address if your Debian VM, leaving username and password blank if you used the sample /etc/exports above.

Now, you should be able to access the files on the USB drive as a datastore. It will also be mounted under /vmfs if you log into the ESXi host via ssh.

Admittedly, this is a lot of work to use a USB drive, but this worked in a pinch.