WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / ESXi / How to Access USB Storage in ESXi Shell

How to Access USB Storage in ESXi Shell

03.13.2012 by William Lam // 29 Comments

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.

More from my site

  • Disable passthrough for specific USB devices for use with ESXi
  • Functional USB 3.0 Ethernet Adapter (NIC) driver for ESXi 5.5 & 6.0
  • Disable LUN During ESXi Installation
  • Datastore File Management using vCLI vifs
  • Ghetto webAccess for ESXi

Categories // ESXi, Home Lab, Not Supported Tags // ESXi 4.1, ESXi 5.0, lsusb, usb

Comments

  1. *protectedSharninder says

    03/13/2012 at 12:06 pm

    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.

    Reply
  2. *protectedtheconqueror says

    03/13/2012 at 6:36 pm

    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.

    Reply
  3. *protectedAnonymous says

    07/30/2012 at 11:48 pm

    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.

    Reply
  4. *protectedAnonymous says

    07/31/2012 at 6:15 pm

    @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.

    Reply
  5. *protectedMonu says

    08/09/2012 at 10:38 am

    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

    Reply
  6. *protectedMike says

    08/22/2012 at 10:20 am

    Hi all,

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

    Reply
  7. *protectedPatrick says

    09/19/2012 at 6:04 pm

    Update worked but after going from 5.0 to 5.1 I'm now seeing a "503 service unavailable" error.

    Reply
  8. *protectedPaul Martin says

    09/26/2012 at 1:27 pm

    Patrick, did you get a resolution. I'm having the same issue

    Reply
  9. *protectedSalazar Victor says

    10/08/2012 at 4:16 am

    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

    Reply
  10. *protectedChris McEwan says

    11/14/2012 at 1:44 pm

    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

    Reply
  11. *protectedAnonymous says

    11/29/2012 at 9:39 am

    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.

    Reply
    • *protectedWilliam says

      11/30/2012 at 4:17 am

      I've not tested this with ESXi 5.1, so it possibly may not work or needs other tweaks. I'll try to take a look if I have some free time, but do note this was never officially supported. If you require this functionality, definitely recommend submitting a feature request http://www.vmware.com/contact/contactus.html?department=prod_request

      Reply
  12. *protecteditalics says

    08/16/2014 at 7:43 am

    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.)

    Reply
  13. *protectedEXSiNewbie69 says

    09/24/2014 at 8:43 pm

    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,

    Reply
  14. *protectedEXSiNewbie69 says

    09/24/2014 at 8:46 pm

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

    Thanks again...

    Reply
  15. *protectedEXSiNewbie69 says

    09/25/2014 at 4:32 pm

    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.

    Reply
  16. *protectedJason says

    12/23/2014 at 7:50 pm

    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.

    Reply
  17. *protectedJason says

    12/24/2014 at 7:55 pm

    I came across this article which I will try that seems to say basically the same thing
    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2065934

    I was hoping that since my USB drive already had VFMS system on it , that it would automatically detect it.

    Reply
  18. *protectedMahesh says

    02/25/2015 at 10:07 pm

    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

    Reply
  19. *protectedJim Rojahn says

    01/08/2016 at 12:11 pm

    Don't know if you're still checking this or not, but thank you so much. Your steps worked perfectly (I just needed to use the correct diskpart syntax to format a partition on the USB drive as FAT16) allowing me to add a VIB driver for a new network card. THANK YOU SO MUCH!!

    Reply
  20. *protectedLuciano says

    02/05/2016 at 12:11 pm

    Please, use an advice in order to properly warn about usb VM disconnections... Thank you!

    Reply
  21. *protectedSalm says

    05/27/2016 at 6:59 am

    Works for ESXi 6 Update 2, thanks !

    Reply
  22. *protectedCam says

    09/14/2018 at 9:55 am

    Can you update this for 6.5? I can't access my USB for the life of me, I'm trying to install a network driver via USB but I can't navigate to it at all. The first two steps work, but the third one doesn't. I believe it's in /vmfs/devices/xxx now, but even when I do that it throws a "cannot access" error

    Reply
  23. *protectedChris Thompson says

    01/07/2019 at 6:18 pm

    Anyone figure out how to re-enable the USB Arbitrator after this process making it possible to use USB based storage as a local datastore? ESXi version 6.7. Seems perhaps it's not possible to have the best of both worlds. Either the USB Arbitrator is off and you can use USB Storage for local datastore(s) or USB Arbitrator is on and you can do USB Pass-Thru.

    Reply
  24. *protectedkrish says

    04/09/2021 at 7:17 am

    http://woshub.com/mount-usb-flash-drive-vmware-esxi/#comment-6162

    mcopy can be used as well to copy files from USB to ESXi

    Reply

Trackbacks

  1. Formatting a large USB memory stick using FAT16 says:
    02/07/2016 at 2:29 pm

    […] http://www.virtuallyghetto.com/2012/03/how-to-access-usb-storage-in-esxi-shell.html […]

    Reply
  2. How to Access USB Storage in ESXi Shell – 4 Minutes Ago says:
    04/07/2020 at 2:05 pm

    […] Te re-enable pass-through of USB devices to your VMs, you just need to start the usbarbitrator service.Source:https://www.williamlam.com/2012/03/how-to-access-usb-storage-in-esxi-shell.html […]

    Reply
  3. Ways to transfer files to VMware ESXi server - NetOSec says:
    05/23/2020 at 8:54 am

    […] reference: https://www.williamlam.com/2012/03/how-to-access-usb-storage-in-esxi-shell.html […]

    Reply
  4. Fixing missing NIC drivers for ESXi – blog.zuthof.nl says:
    04/17/2023 at 12:52 pm

    […] Luckily ESXi is able to access FAT formatted USB Drives to fix this issue. Unfortunately some of the old methods do not work nowadays. For example VMware KB article (2065934) 'Configuring a USB Flash drive to transfer files between Windows and an ESXi/ESX host' does not work anymore for ESXi 8. The same counts for this old post of William Lam called 'How to Access USB Storage in ESXi Shell'. […]

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025