Can you use a USB hard drive in ESXI

hard driveusbvmware-esxi

I know that you can install ESXi 4.0 on a thumbdrive, but I was wondering if you could plug in an external harddrive to give extra storage to one of your VMs? We run a fileserver inside of ESXi that needs a space upgrade, but we're thinking of migrating to a different fileserver solution and would rather stick to external media to ease the later transition.

edit:

Ideally I'd like the drive to show up to the VM directly and not have ESXi control it, so that I could move it to a different machine and still have all of the data appear the same.

Best Answer

I've solved the similar problem recently, so I can give you some results of my investigation. Our task was to move some VMs between hosts, and there was no high-speed network link between hosts and no provision to make such link, so we decided to copy VMs to external hard disk as files. We bought USB hard drive and... and we were surpsised how awful ESXi is designed (and after this experience I'll personally will NEVER EVER use any VMWare product).

Most useful documentation is this page: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022290

USB support in VMWare host is, in short words, absent.

We're happened to have 5.5 (pre-patch3) and 5.1 hosts, so we haven't had any chance to have USB 3.0 support. We tried to assign USB Hard Disk as a datastore directly into the host.

This is not possible at all. VMWare requres local drive to be VMFS-formatted to be a datastore. There is console tool to partition the drive and other tool to make VMFS partition (both available when you connect to host via SSH). Yes, you can't have arbitrary partitioning. However, these tools don't seem to work with USB devices. The VMFS formatter fails with some cryptic error message.

(It looks like ESXi treats USB block devices differently, not same as say SATA block devices or hardware RAID VDs, which is strange, because USB in essense uses SCSI translation layer.)

ESXi also does not support ANY other file systems that are capable of large files (ntfs, ext2/3/4, hfs+, even exfat), so you can't just mount removable disk in the host, stop VMs and copy VM images.

We succeeded in this way: created small linux VM, forwarded USB device there, partitioned, formatted and mounted it there and exported via NFS. Just to be able to forward USB device to newly created VM, we were required to REBOOT THE HOST (it wasn't appeared in the available devices until reboot. Still want to continue with VMWare? Then read further). Then we added the NFS share from the VM into the host as datastore.

However, the performance of this solution is much, much worse you'll expect. The typical linear data transfer rate was in the order of 1 MB/s (one megabyte per second), and the I/O delays were in the order of 100 ms. I am sure this not any hardware fault, because the same server booted linux had the normal 20 Mb/s performance with same disk via USB 2.0 and much less delays.

So, this way will not work to just extend VM common storage space. This could have limited usefulness to do VM backups.

Related Topic