Problem solve Get help with specific problems with your technologies, process and projects.

Installing VMware ESXi on a USB drive: A walkthrough

Installing VMware ESXi on a USB drive is a straightforward process. To eliminate any confusion, though, we provide a walkthrough and information on ESXi flash drive maintenance.

In part one of this series, we discuss the pros, cons and requirements of installing VMware ESXi on a flash drive....

In this tip, we cover the installation process and additional information on configuring and maintaining an ESXi flash drive.

Creating a bootable flash drive starts with booting from an ESXi installation CD. But instead of installing to a server's hard drive, you will install VMware ESXi on a USB drive.

Installing VMware ESXi to a USB flash drive: Method one

For this process, you can use any server or workstation that supports ESXi. Once you are ready, follow these steps to create an ESXi flash drive.

  1. Download the ESXi installable ISO file from VMware's website.
  2. After you've downloaded the ISO file, burn it to a CD or DVD for use in a server or workstation.

  3. Click image to enlarge.
  4. Make sure the flash drive is installed into a server's USB port. Then boot from the CD or DVD that you created, and run the ESXi installer.

  5. Click image to enlarge.
  6. When prompted to select a drive, choose the USB flash drive rather than a local disk partition.

  7. Click image to enlarge.
  8. Once the ESXi installation completes, remove the CD or DVD and reboot. ESXi will then load from the flash drive.

  9. Click image to enlarge.

Installing VMware ESXi to a USB drive: Method two

An easier method for installing VMware ESXi on a USB flash drive involves using VMware Workstation, which VMware's Eric Gray about. Here's how.

  1. Create a new virtual machine (VM) in Workstation, and make sure it has at least 2 GB of memory to run ESXi. Workstation 7 can do so natively, but Workstation 6.5 requires some modification. Next, customize the hardware, and add a USB controller to it.

  2. Click image to enlarge.
  3. Connect your USB flash drive directly to a VM by selecting Removable Devices under the VM drop-down menu. Note that it's removed from the host PC when it's connected to a VM.

  4. Click image to enlarge.
  5. When the ESXi installer loads, go through the screens and select the USB flash drive (rather than of a VM's hard drive) on which to install it.You'll know it's the right one because it's the same size as your flash drive (in this case, 4 GB).

  6. Click image to enlarge.
  7. After the installation completes, power off the VM. Pull out the flash drive, and plug it into a server. Now you're ready to go.

  8. Click image to enlarge.

Note: Once you create the ESXi flash drive using VMware Workstation, if you try boot from it with the VM you created, it won't work. Workstation does not support booting from an ESXi-equipped flash drive. There is a workaround, however, that allows you to boot from a thumb drive if you want to test it.

After installing VMware ESXi to your flash drive, if you insert it into a Windows PC, notice that the volume label has been changed to Hypervisor0, and as shown below, there are only four files on it.

Click image to enlarge.

Also the size of the drive now shows as 4 MB rather than 4 GB because there is a 4 MB File Allocation Table partition on the disk, and the other partitions are readable only by ESXi. If we examine the layout of the ESXi flash drive using Partition Manager, the following appears:

Click image to enlarge.

The 4 MB primary partition on the disk is the boot loader, which runs when the host boots up. There is also an 896 MB extended partition with four logical disks, which are used for the following:

  • A 250 MB logical disk, which contains the core hypervisor code (VMkernel). It is packaged into several files, which total up to 60 MB. Any server manufacturer customization (e.g., Hewlett-Packard, Dell and IBM) are also stored here.
  • A 250 MB logical disk, which holds a backup copy of the hypervisor code whenever an update is applied to ESXi. This disk is initially empty (except for a150 byte boot.cfg file) until an update is applied to ESXi. After an update, all files from logical disk 1 are copied to logical disk 2 before the new ESXi image is copied to logical disk 1.
  • A 110 MB logical disk, which is initially empty. But it can be used to hold diagnostic core dumps.
  • A 286 MB logical disk, which contains VMware tool ISO files, the vSphere Client installer, other tools and drivers, and runtime storage. These mostly auxiliary files are not a part of the VMkernel.

Here's a more detailed look at the partitions.

Click image to enlarge.

If you ever want to re-use the flash drive with Windows, you must low-level format it to delete all the partitions. You won't be able to do so with the Disk Management utility that comes with Windows, however.

There are a few ways to low-level format a flash drive, but the easiest method uses a freeware utility called HDD Low Level Format Tool. Simply download, install and run it. Then, select your USB flash drive (be sure you choose the correct drive), and click Continue. Next, on the Low-level Format tab, choose Format This Device. Once the format completes, select the drive in Windows Explorer, and format it to its full capacity.

Click image to enlarge.

Life expectancy of a USB flash drive

You might wonder how long a flash drive will last and whether you should worry about it wearing out, which could cause your server to stop working. Flash drives usually have a finite number of write cycles, meaning that they can be written on only so many times before they start to fail.

Quality flash drives, however, can last many years and sustain at least 10,000 write cycles before they experience problems. Plus, ESXi mostly reads from flash drives, which does not cause it to wear down. Subsequently, your flash drive should last for many years. Still, it's a good idea to have a backup ESXi flash drive in the event of a flash drive failure.

Creating a backup ESXi flash drive

Creating a backup copy of an ESXi flash drive is easy to do. Unfortunately, you cannot simply copy the contents of the drive over to another one. You have to create a disk image of the flash drive and use that image to write to another flash drive of the same size. But you can use the freeware USB Image Tool to do this.

First, insert your flash drive into a Windows workstation. Run the tool, and select your flash drive. Then click the Backup button.

Click image to enlarge.

This process creates an image of the ESXi flash drive in a .img file format. Next remove the flash drive, and insert a new one that is the same size. Then click the Restore button to copy the image to the new drive.

While this method works to periodically back up your ESXi flash drive, you can also use it to quickly make copies of an ESXi flash drive for multiple servers.

Ultimately, installing VMware ESXi on a flash drive is a great way to save money on server hardware and to get new servers running quickly and easily. But if you already use ESXi installed on local disks, it's probably not worth switching. For new servers, however, you should definitely consider it.

And if you're concerned about technical support, VMware fully supports installing ESXi on to a flash drive, which can be found in the ESXi hardware requirements page.

For more information on ESXi, check out the following resources:

Eric Siebert is a 25-year IT veteran with experience in programming, networking, telecom and systems administration. He is a guru-status moderator on the VMware community VMTN forums and maintains, a VI3 information site.


This was last published in March 2010

Dig Deeper on VMware performance enhancements

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.