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.
Sharninder says
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.
theconqueror says
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.
Anonymous says
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.
Anonymous says
@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.
Monu says
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
Mike says
Hi all,
How format this USB key as VMFS datastore? I changed partion ID to FB - VMFS but unable to format it using vmkfstools
Patrick says
Update worked but after going from 5.0 to 5.1 I'm now seeing a "503 service unavailable" error.
Paul Martin says
Patrick, did you get a resolution. I'm having the same issue
Salazar Victor says
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
Chris McEwan says
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
Anonymous says
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.
William says
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
italics says
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.)
EXSiNewbie69 says
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,
EXSiNewbie69 says
Sorry, I forgot to mention that it is a vmfs hard drive though an usb cradle.
Thanks again...
EXSiNewbie69 says
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.
Jason says
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.
Jason says
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.
Mahesh says
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
Jim Rojahn says
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!!
Luciano says
Please, use an advice in order to properly warn about usb VM disconnections... Thank you!
Salm says
Works for ESXi 6 Update 2, thanks !
Cam says
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
Chris Thompson says
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.
krish says
http://woshub.com/mount-usb-flash-drive-vmware-esxi/#comment-6162
mcopy can be used as well to copy files from USB to ESXi