10

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.

1

5 Answers 5

1

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.

3
  • ESXi supports host-connected USB storage in several ways – FAT16/VFAT (kb.vmware.com/s/article/2065934), FAT32 via /bin/mcopy. Don't blame the product for your own lack of knowledge.
    – ᄂ ᄀ
    Jun 5, 2021 at 8:49
  • Yes, it supports FAT32. It's a pity FAT32 doesn't support files more then 4 GiB. I wrote above, we needed to move VM images, files of several hundreds gigabytes. After 7 years and several major versions released, VMWare ESXi is still piece of crap, it doesn't support any large file capable file systems on USB. In other words, it doesn't support USB properly. Don't use ESXi. And don't blame me for the lack of the knowledge; blame yourself. Jan 25, 2023 at 5:21
  • The question was about the use of USB storage in general, thus your claim "USB support in VMWare host is, in short words, absent" is complete misleading bullshit. Moreover, ESXi supports ext3 as well (max. file size 2TB). So yeah, don't blame the product for your own ignorance. And apparently nobody asked for your advice weather to use ESXi or not – an ignorant person is not in a position to give such an advice.
    – ᄂ ᄀ
    Jan 26, 2023 at 17:07
10

The answer is: yes

USB can be used by the guest OS by editing the settings of a virtual machine and then choosing the Hardware tab.

Once you are at the Hardware tab you can click ADD and select a USB controller.

Once you have added a USB controller you then repeat the same process, except this time add a USB device instead of a controller.

You will see any attached USB devices in a list to choose from.

Once added you then need to open the console of the virtual machine, and mount it to the USB connector (the little USB icon at the top of the console window).

It has been a while since I last did this, however this should get you there.

As for using it as a datastore for VMware only, I'm currently looking into that now. In my case it's more useful to have USB storage for snapshots etc.

And to the guy that said it's better to get eSATA: It really depends on what you are using the USB disk for. If it is just backups or file storage... who cares? Unless you are running things from this disk, performance is not relevant.

1
  • Life saver :) This works without having to halt the guest or anything
    – t123
    Jul 24, 2012 at 13:08
2

ESXi does not support USB devices (either as a datastore, or as passthru to a guest OS). Even using the Alt+F1 unsupported trick, you cannot mount the USB device.

2

Use ESXi 4.1.0 or later - it supports this feature.

2
  • 1
    Do you have any documentation to cite? I need to simply backup some vm's and I want to get in-and-out quick. I was going to stop the vm's one by one, make a copy to my NFS datastore and then copy that to the external USB HDD (from the CentOS box where the exports reside.) However, I'd prefer to keep the NFS step out if possible. Thanks.
    – Bretticus
    Aug 17, 2011 at 21:11
  • Nevermind, it's passthrough only. I did see an example of a guy who got it working as a datastore (FAT only) in 4.1 by disabling the USB arbitrator from startup. I will probably just try stopping the vm and copying the folder via SSH console. That depends on whether I can mount the external HDD.
    – Bretticus
    Aug 17, 2011 at 21:55
1

If it's connected to the ESXi box then ESXi is going to control it, and will need to set it up as a datastore first. If you want something removable I'd recommend going with an eSATA device versus a USB device... should be fewer headaches and better performance.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .