While performing some experiments in my home lab, I needed to access a USB storage key directly on my ESXi host (not pass-through to VMs) and found it required a small trick after some tinkering. I thought I share the process in case this comes in handy for others.

Disclaimer: This is mainly for educational and testing purposes as this is not officially supported by VMware. Please use at your own risk.

Before I begin, you should know that only USB storage devices formatted with FAT16 can be accessed in the ESXi shell and is applicable to both ESXi 4.1 and 5.0.

Step 1 - Login to ESXi Shell via SSH and disable the USB Arbitrator service (this is automatically enabled by default to allow pass-through of USB devices to your VMs) using the following command: /etc/init.d/usbarbitrator stop

Step 2 - Plug-in your USB device to your ESXi host and you can verify by using the two ESXCLI commands: verifying the storage device using the command: esxcli storage core device list | grep -i usb or viewing the mounted filesystems using the command: esxcli storage filesystem list

Step 3 - Lastly, after you verify the USB device can be seen by the ESXi host, you can of course browse and access your USB device by looking under /vmfs/volumes/

Te re-enable pass-through of USB devices to your VMs, you just need to start the usbarbitrator service.

19 thoughts on “How to Access USB Storage in ESXi Shell

  1. Excellent tip. The problem is that the usbarbitrator takes over the USB bus since the vmkernel needs it to provide pass-through services. So, when that is running the ESX OS can’t get access to the devices connected on the USB bus.

  2. Just out of curiosity, can you format the USB storage as a VMFS volume and then run VMs off of the USB storage? This might solve a problem with my home lab.

  3. Service stopped good, but all steps afterwards did not help me get my 2TB disk back on VM. Actually, all USB devices are gone now.
    Also after restart (and rescan in vSpere) /etc/init.d/usbarbitrator.

    No other thing then to reboot ESXi completely, pitty.

    DG.

  4. @theconqueror, yes its possible, I have just done it. The only problem is that the usbarbitrator service needs to be off all the time (well thats my quick fix so far at least, otherwise ESXi will hang during boot) but I am searching for a way to get around that, something like excluding the datastore USB drive from the usbarbitrator but I havent found it yet.

  5. Hi Guys,

    Suppose I have to mount an ISO file in my VM(I want to boot my VM from that on next reboot), how can I do that? If anyone can share the commands that would be nice.

    Thanks,
    Renjith

  6. Hi all,

    How format this USB key as VMFS datastore? I changed partion ID to FB – VMFS but unable to format it using vmkfstools

  7. Hello, could you please tell me how to use the HDD once the OS is able to watch it? see the output commands below. thanks in advance

    /vmfs/volumes # esxcli corestorage device list |grep -i usb
    Display Name: Local USB Direct-Access (mpx.vmhba36:C0:T0:L0)
    /vmfs/volumes # ls -l /dev/disks/
    -rw——- 1 root root 250059350016 Oct 7 19:52 mpx.vmhba36:C0:T0:L0
    -rw——- 1 root root 250059317760 Oct 7 19:52 mpx.vmhba36:C0:T0:L0:3
    -rw——- 1 root root 146163105792 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2
    -rw——- 1 root root 939524096 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:1
    -rw——- 1 root root 4293918720 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:2
    -rw——- 1 root root 140925468672 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:3
    -rw——- 1 root root 4177920 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:4
    -rw——- 1 root root 262127616 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:5
    -rw——- 1 root root 262127616 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:6
    -rw——- 1 root root 115326976 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:7
    -rw——- 1 root root 299876352 Oct 7 19:52 naa.60019b90d320a90017c8a92f840165d2:8
    lrwxrwxrwx 1 root root 20 Oct 7 19:52 vml.0000000000766d68626133363a303a30 -> mpx.vmhba36:C0:T0:L0
    lrwxrwxrwx 1 root root 22 Oct 7 19:52 vml.0000000000766d68626133363a303a30:3 -> mpx.vmhba36:C0:T0:L0:3
    lrwxrwxrwx 1 root root 36 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035 -> naa.60019b90d320a90017c8a92f840165d2
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:1 -> naa.60019b90d320a90017c8a92f840165d2:1
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:2 -> naa.60019b90d320a90017c8a92f840165d2:2
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:3 -> naa.60019b90d320a90017c8a92f840165d2:3
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:4 -> naa.60019b90d320a90017c8a92f840165d2:4
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:5 -> naa.60019b90d320a90017c8a92f840165d2:5
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:6 -> naa.60019b90d320a90017c8a92f840165d2:6
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:7 -> naa.60019b90d320a90017c8a92f840165d2:7
    lrwxrwxrwx 1 root root 38 Oct 7 19:52 vml.020000000060019b90d320a90017c8a92f840165d2504552432035:8 -> naa.60019b90d320a90017c8a92f840165d2:8

  8. in 5.1 the USB device never seems to appear in volumes.

    it lists it in esxcli storage core device list | grep -i usb
    but in esxcli storage filesystem list nothing appears

  9. Same problem here, the device is listed with “lsusb” and “esxcli storage core device list | grep -i usb”.

    But it won´t automount. (8GB USB key formated with FAT32)

    Yes, usbarbitrator is off.

    What filesystem is needed? Dident have the time to test NTFS.. Need to be able to save files bigger than 2GB.

  10. I just thought that I would mention to all the people that are having issues with their drives not showing in volumes and to the guy with the 2tb drive..

    When the poster mentioned that only fat16 drives worked with this, that was an important part. Almost every drive made today will be either FAT32 or NTFS. Actually, as many kudos as I will give for inginuity, it is much less useful than one would have hoped simply due to how old a format fat16 and because of the massive limitations set for this. (Simply put, it would be nearly impossible to transfer off a virtual machine using this method without using something like tar/dd.)

  11. I’m stuck because of my lack of knowledge of the commands. What’s the syntax for the mount command to make “mpx.vmhba1160:C0:T0:L0″ available to my VMware host?

    Thanks in advance,

  12. Sorry, I forgot to mention that it is a vmfs hard drive though an usb cradle.

    Thanks again…

  13. In case it is of use, my device mpx.vmhba1160:C0:T0:L0 is listed at /dev/disks/ as vml.0000000000766d686261313136303a303a30 but it is not linked to a naa.xxxxxxxx ID.

    Please help if you can.

  14. I have the same issue. I was trying to move a VMFS disk to a a new temp ESXI server. I took the drive put it in a USB dock and it show up but will not mount.

    ~ # esxcli storage core device list | grep -i usb
    Display Name: Local USB Direct-Access (mpx.vmhba33:C0:T0:L0)
    Is USB: true
    Is Boot USB Device: false
    Is USB: false
    Is Boot USB Device: false
    Is USB: false
    Is Boot USB Device: false
    Display Name: Local USB Direct-Access (mpx.vmhba32:C0:T0:L0)
    Is USB: true
    Is Boot USB Device: true

    i am running ESXI 5.5 from a USB drive which is the 16gb unit. The USB drive is a SSD 242GB in a USB cradle which would be the mpx.vmhba32

    ~ # esxcli corestorage device list |grep -i usb
    ~ # ls -l /dev/disks/
    total 4394954089
    -rw——- 1 root root 16008609792 Dec 23 19:48 mpx.vmhba32:C0:T0:L0
    -rw——- 1 root root 4161536 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:1
    -rw——- 1 root root 262127616 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:5
    -rw——- 1 root root 262127616 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:6
    -rw——- 1 root root 115326976 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:7
    -rw——- 1 root root 299876352 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:8
    -rw——- 1 root root 2684354560 Dec 23 19:48 mpx.vmhba32:C0:T0:L0:9
    -rw——- 1 root root 240057409536 Dec 23 19:48 mpx.vmhba33:C0:T0:L0
    -rw——- 1 root root 240053748224 Dec 23 19:48 mpx.vmhba33:C0:T0:L0
    :1
    -rw——- 1 root root 1000204886016 Dec 23 19:48 t10.ATA_____APPLE_H
    DD_HTS541010A9E662_____________________J88000EZJHVTZD
    -rw——- 1 root root 209715200 Dec 23 19:48 t10.ATA_____APPLE_HDD_H
    TS541010A9E662_____________________J88000EZJHVTZD:1
    -rw——- 1 root root 999860912128 Dec 23 19:48 t10.ATA_____APPLE_HD
    D_HTS541010A9E662_____________________J88000EZJHVTZD:2
    -rw——- 1 root root 1000204886016 Dec 23 19:48 t10.ATA_____APPLE_H
    DD_HTS541010A9E662_____________________J890011VH5DG4D
    -rw——- 1 root root 209715200 Dec 23 19:48 t10.ATA_____APPLE_HDD_H
    TS541010A9E662_____________________J890011VH5DG4D:1
    -rw——- 1 root root 999345127424 Dec 23 19:48 t10.ATA_____APPLE_HD
    D_HTS541010A9E662_____________________J890011VH5DG4D:2
    -rw——- 1 root root 650002432 Dec 23 19:48 t10.ATA_____APPLE_HDD_H
    TS541010A9E662_____________________J890011VH5DG4D:3
    lrwxrwxrwx 1 root root 20 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30 -> mpx.vmhba32:C0:T0:L0
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:7
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133323a303a30:9 -> mpx.vmhba32:C0:T0:L0:9
    lrwxrwxrwx 1 root root 20 Dec 23 19:48 vml.0000000000766d68626
    133333a303a30 -> mpx.vmhba33:C0:T0:L0
    lrwxrwxrwx 1 root root 22 Dec 23 19:48 vml.0000000000766d68626
    133333a303a30:1 -> mpx.vmhba33:C0:T0:L0:1
    lrwxrwxrwx 1 root root 72 Dec 23 19:48 vml.0100000000202020202
    0204a3838303030455a4a4856545a444150504c4520 -> t10.ATA_____APPLE_HDD_HTS541010A9
    E662_____________________J88000EZJHVTZD
    lrwxrwxrwx 1 root root 74 Dec 23 19:48 vml.0100000000202020202
    0204a3838303030455a4a4856545a444150504c4520:1 -> t10.ATA_____APPLE_HDD_HTS541010
    A9E662_____________________J88000EZJHVTZD:1
    lrwxrwxrwx 1 root root 74 Dec 23 19:48 vml.0100000000202020202
    0204a3838303030455a4a4856545a444150504c4520:2 -> t10.ATA_____APPLE_HDD_HTS541010
    A9E662_____________________J88000EZJHVTZD:2
    lrwxrwxrwx 1 root root 72 Dec 23 19:48 vml.0100000000202020202
    0204a383930303131564835444734444150504c4520 -> t10.ATA_____APPLE_HDD_HTS541010A9
    E662_____________________J890011VH5DG4D
    lrwxrwxrwx 1 root root 74 Dec 23 19:48 vml.0100000000202020202
    0204a383930303131564835444734444150504c4520:1 -> t10.ATA_____APPLE_HDD_HTS541010
    A9E662_____________________J890011VH5DG4D:1
    lrwxrwxrwx 1 root root 74 Dec 23 19:48 vml.0100000000202020202
    0204a383930303131564835444734444150504c4520:2 -> t10.ATA_____APPLE_HDD_HTS541010
    A9E662_____________________J890011VH5DG4D:2
    lrwxrwxrwx 1 root root 74 Dec 23 19:48 vml.0100000000202020202
    0204a383930303131564835444734444150504c4520:3 -> t10.ATA_____APPLE_HDD_HTS541010
    A9E662_____________________J890011VH5DG4D:3
    ~ #

    I am on a Mac MIni 6,2 with 2x2TB SATA drives. I am not touching these drives , just need access to the USB drive with VMFS3 on it.

  15. Hi

    I was able to see below —

    /vmfs/volumes/54dfa85f-b96b880e-9e26-bc305bda4b59 # esxcli storage core device list | grep -i usb
    Is Boot USB Device: false
    Is Boot USB Device: false
    Is Boot USB Device: false
    Display Name: Local USB Direct-Access (mpx.vmhba34:C0:T0:L0)
    Is Boot USB Device: false
    Is Boot USB Device: false

    But faced issues to detect the USB drive in vmfs … refer below

    /vmfs/volumes/54dfa85f-b96b880e-9e26-bc305bda4b59 # esxcli storage filesystem list
    Mount Point Volume Name UUID Mounted Type Size
    ————————————————- ————– ———————————– ——- —— ————-
    /vmfs/volumes/54dfa85f-b96b880e-9e26-bc305bda4b59 datastore1 (2) 54dfa85f-b96b880e-9e26-bc305bda4b59 true VMFS-5 3991635230720
    /vmfs/volumes/54ee6c8f-d9212568-d963-bc305bda4b59 OpenFiler 54ee6c8f-d9212568-d963-bc305bda4b59 true VMFS-5 716722667520
    /vmfs/volumes/54dfa86e-b589d3fa-9365-bc305bda4b59 54dfa86e-b589d3fa-9365-bc305bda4b59 true vfat 4293591040
    /vmfs/volumes/7f8bf27a-7566b43d-43cb-9caa4d684164 7f8bf27a-7566b43d-43cb-9caa4d684164 true vfat 261853184
    /vmfs/volumes/ccd0ae73-7b288d2f-ee24-28ddca8d7b69 ccd0ae73-7b288d2f-ee24-28ddca8d7b69 true vfat 261853184
    /vmfs/volumes/54dfa808-54694060-b8f5-bc305bda4b59 54dfa808-54694060-b8f5-bc305bda4b59 true vfat 299712512

    Can someone suggest me what went wrong ???

    Regards..
    Mahesh

Thanks for the comment!