Instructions for updating VIB sources -- nothing to do with getting your USB recognized

  • esxcli software sources vib list -d http://vibsdepot.v-front.de
  • esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
  • esxcli software vib update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

Listing ESXi profiles

  • esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

 

The following is the part where you get your external USB drive recognized aka using a external USB hard drive as a datastore on ESXi 6

It turned out that it's possible to mount an external USB drive to a USB port on a ESXi bare-metal host, and get it attached and available for use as a datastore.

Perform a lspci -v to get all the USB UHCI and EHCI controllers to show up.

This shows up for example as:

0000:00:1a.1 USB controller Serial bus controller: Intel Corporation PowerEdge R710 USB UHCI Controller by chuacw

         Class 0c03: 8086:2938

0000:00:1a.7 USB controller Serial bus controller: Intel Corporation PowerEdge R710 USB EHCI Controller by chuacw

         Class 0c03: 8086:293c

Then, follow these commands, to add the vendor ID and product id. The vendor id in this case, for the above EHCI controller is 8086:293c

  • cd /tmp
  • cp /bootbank/uhci_usb.v00 /tmp/uhci_usb.gz
  • gunzip uhci_usb.gz
  • vmtar -x uhci_usb -o uhci_usb.tar
  • rm -rf uhci_usb
  • mkdir /tmp/uhci_usb/
  • tar xvf uhci_usb.tar -C /tmp/uhci_usb/
  • rm uhci_usb.tar

Edit the usb-uhci.map with the IDs of the output of lspci -v.

vi uhci_usb/etc/vmware/driver.map.d/usb-uhci.map

regtype=linux,bus=pci,id=8086:2934 0000:0000,driver=usb-uhci,class=storage
regtype=linux,bus=pci,id=8086:2935 0000:0000,driver=usb-uhci,class=storage
regtype=linux,bus=pci,id=8086:2937 0000:0000,driver=usb-uhci,class=storage
regtype=linux,bus=pci,id=8086:2938 0000:0000,driver=usb-uhci,class=storage
regtype=linux,bus=pci,id=8086:293a 0000:0000,driver=usb-uhci,class=storage
regtype=linux,bus=pci,id=8086:293c 0000:0000,driver=ehci-hcd,class=storage

 

  • vi usr/share/hwdata/driver.pciids.d/usb-uhci.ids

8086 Intel Corporation by chuacw

2934 PowerEdge R710 USB UHCI Controller by chuacw
2935 PowerEdge R710 USB UHCI Controller by chuacw
2937 PowerEdge R710 USB UHCI Controller by chuacw
2938 PowerEdge R710 USB UHCI Controller by chuacw
293a PowerEdge R710 USB UHCI Controller by chuacw

<-Tab-->NNNN<-Two Tabs->Description

 

  • cd /tmp/uhci_usb/
  • tar -cf uhci_usb.tar *
  • vmtar -c uhci_usb.tar -o uhci_usb
  • gzip uhci_usb
  • mv uhci_usb.gz /bootbank/uhci_usb.v00

stop the usbarbitrator. Also, if you do not see your USB after a reboot, stop the usbarbitrator, and reinsert the USB drive by pulling out the cable out of the USB port and reattaching it.

  • /etc/init.d/usbarbitrator stop 

Detach and reattach the USB drive, otherwise, it wouldn't work

  • fdisk -l

shows the following:

***

*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil

***

Disk /dev/disks/mpx.vmhba32:C0:T0:L0: 2000.3 GB, 2000398933504 bytes

255 heads, 63 sectors/track, 243201 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

                           Device Boot      Start         End      Blocks  Id System

Found valid GPT with protective MBR; using GPT

Then, fdisk /dev/disks/m and press tab to allow it to autocomplete so that you get:

  • fdisk /dev/disks/mpx.vmhba32\:C0\:T0\:L0
In fdisk, press n to create a new partition, then press p for for a primary partition, press 1 for partition 1, and press enter a few times to use default values.
Then, press t to change the partition from type 83 Linux, to vmfs with fb. Press w to write, which closes fdisk.
  • vmkfstools -C vmfs5 -b 1m -S datastore2 /vmfs/devices/disks/mpx.vmhba34\:C0\:T0\:L0:1
And finally, when a reboot cause your newly created datastore to disappear, stop the usbarbitrator service with the command posted above, remove, reinsert the USB drive and rescan the datastores so that the reinserted USB drive would show up again as a datastore.
Here's 2 screenshots of the final results: