VMFS Recovery™
Recover data from damaged or formatted VMFS disks or VMDK files
Recover data from damaged or formatted VMFS disks or VMDK files
Last updated: Nov 01, 2023

How to run ESXi from a USB

Here you will find out:

  • how ESXi can be installed
  • what you should know before running ESXi from a USB
  • how to run ESXi from a USB stick
  • how DiskInternals software can help you

Are you ready? Let's read!

Can you run VMware ESXi from a removable device? Apparently, you can. You can run ESXi from a USB device (Flash/Thumb Drive), but there are some CONs you should know. This article explains how to install and launch VMware ESXi from a bootable/installation media (ex., USB drives).

How Can ESXi Be Installed?

Basically, there are multiple ways to install and run. Firstly, you can install it on the system's local storage; secondly, it can be installed on a bootable CD; thirdly, it can be installed on a Universal Serial Bus (USB) device.

Also, you can install ESXi on SD storage devices such as SD cards/memory cards. In essence, it is possible to have a virtual machine (VM) installed on removable storage devices, and in this case, a USB device.

How to Run ESXi From a USB Flash Drive

So, you must remember some crucial advice and information if you need to run ESXi from your USB device. If you don't follow these instructions, you could start anything else instead of your virtual machine. What exactly do you need to know about this? The first set of criteria, or basic specs, are listed below.

  • The USB device must have at least 2GB of empty space on it overall, while larger capacity drives with capacities of 8GB and above are recommended.
  • The virtual machine or host system must use at least 4GB of RAM.
  • To support USB devices (flash/thumb drives), the ESXi must be set up.
  • Other prerequisites are the same as those that apply for a typical ESXi installation.

Now that are the prerequisites for installing ESXi on a USB device; below are the crucial things you should know before launching ESXi from a USB drive.

What You Should Know Before Running ESXi From a USB

When you install ESXi on a Hard Disk Drive (HDD) or Solid State Drive (SSD), or even a Redundant Array of Independent Disks (RAID) storage, the setup procedure would automatically create disk partitions on the destination disk drive or RAID array.

Also, the ESXi 4.x introduced GPT (GUID Partition Table) to replace MBR (Master Boot Record) partition technology. What does this imply? It implies that when ESXi is installed on a removable storage, partitions are not automatically created for log files storage.

Why? ESXi log data is written intensively and regularly, and USB flash drives are engineered for such intense read/write activities. Furthermore, while loading ESXi to a computer, it creates a custom memory disk where it stores system files for ESXi operations.

Finally, when an ESXi server is restarted or shut down, all its data is erased from the RAM disk. Thus, if you're running ESXi from a USB flash drive, a temporary directory is created on the RAM disk where the log files are stored, and when you shut down or reboot the server, the logs get deleted.

Advantages and Disadvantages of Running ESXi From a USB Drive

Well, almost everything has its PROs and CONs, and in this case, running ESXi from USB drives is not left out. Thus, this is to explain to you the advantages and disadvantages of using USB (Flash) drives for ESXi storage and launch.

1. Cost-Effectiveness - Advantage

Okay, firstly, running ESXi from a USB drive is cost-effective; you won't need to purchase a SAS interface.

2. Ease of Usage - Advantage

Running ESXi from USB devices is incredibly more convenient than running it on a primary system. Why? When you install ESXi on a removable disk, it is easier to reinstall ESXi to your primary disks at any time.

In contrast, if you installed ESXi on the primary drive used for data storage, if anything happens to the drive, you'd love your ESXi data along with other files saved on the storage.

3. Easier Updates - Advantage

By installing ESXi on USB drives, you make it easier for you to update the ESXi version(s). All you’d need to do is to clone the USB flash drive (get a new USB drive and copy the ESXi to it), so at any point, if the primary USB drive stops working - maybe after an ESXi update - you can fall back to the other USB drive that has ESXi installed on it too.

4. Longer Boot Time - Disadvantage

Now, here's one disadvantage of running ESXi on USB (Flash) drives. Running ESXi from removable storage devices can significantly increase the boot time. How? USB drives can only load ESXi and save ESXi configuration files when necessary.

While this is not intensive and allows the USB drive to be used longer for read\write operations, the ESXi boot time is highly affected when ESXi servers run in High Availability clusters in production environments.

Storing Log Files

It is important that you save log files for critical services and actions such as running ESXi on a system. Log files help for diagnosis and data recovery when things go wrong.

Notwithstanding, it is important to note that installing ESXi on diskless servers eliminates log files by default; this is to say that when you run ESXi from USB drives, server logs won't be saved by default during a reboot, and you need log reports to send error complains to VMware.

However, this article would explain how to save ESXi logs even though you’re launching from removable drives.

Guide For Running ESXi From a USB Drive

Remember the prerequisites listed earlier in this article; these tips are simply a comprehensive explanation of those requirements/prerequisites.

  • First Step: Plug in an empty 2GB or 8GB USB drive into the computer system.
  • Second Step: Connect the ESXi installation media to the same computer to which you connected the empty flash drive, then boot from the installation media.
  • Third Step: Create partitions on the empty flash drive, format the partitions, and then install ESXi.
  • Final Step: Restart the system/server, but this time, boot into UEFI (or BIOS) mode and select the USB flash drive (which now has ESXi installed on it) as the first boot device. Once this is done, you're all set to go!

Installing ESXi on a 1-GB Drive

Installing ESXi on a small flash drive? Here are some useful tips you would like to know. Firstly, when you install ESXi on a 1GB flash drive, it creates five (5) partitions, viz;

  • Number 1: System partition (4MB)
  • Number 5: Linux Native /bootbank (250MB)
  • Number 6: Linux Native /bootbank (250MB)
  • Number 7: VMK Diagnostics (110MB)
  • Number 8: Linux Native /store (286MB)

Now, explaining these partitions;

  • Number 1 is the smallest one, and it is the boot loader.
  • Number 1 is the hypervisor operating system, which contains all necessary files for the effective operation of the ESXi hypervisor in this fixed-size partition.
  • Number 1 stores the alternative hypervisor OS image; it is an alternate boot bank partition created to help out when you encounter ESXi update or upgrade errors; so, with this alternative partition, you can roll back a previous good ESXi version. However, even if an ESXi upgrade runs successfully, an image of the previous version is saved in partition #6, just in case you need to fall back to the version at any time.
  • Number 1 stores core dumps in case of PSOD (Purple Screen of Death).
  • Number 1 keeps the VMware Tools disk images and floppy images.

Key Notes: Partitions #5 and #6 store the compressed hypervisor OS image extracted during ESXi boot, while the / (root), /etc, /lib, and other important directories are stored in the RAM. Also, when you plan to reboot or shut down an ESXi server, the system settings changes are saved as a state.tgz file.

Installing ESXi on Bigger USB Flash Drives (8GB drives or Bigger)

If you're installing ESXi on a bigger USB flash drive, the number of partitions to be created will increase.

  • Number 1 System partition (4MB)
  • Number 2 Linux Native /scratch (4GB)
  • Number 3 VMFS Datastore1
  • Number 5 Linux Native /bootbank (250MB)
  • Number 6 Linux Native /bootbank (250MB)
  • Number 7 VMK Diagnostics (110MB)
  • Number 8 Linux Native /store (286MB)
  • Number 9 VMK Diagnostic (2.5GB)

Haven previously explained the #1, #5, #6, #7, and #8 partitions; below are what the other (new) partitions store.

  • Number 2 is the scratch partition that stores log data and files.
  • Number 3 is the remaining disk space on the drive, which serves as the “datastore” for saving all VM files and other files.
  • Number 9 is a second partition that saves core dumps. This new partition was launched with ESXi 5.5 to tackle memory dump issues in servers with less than 110MB of memory space.

Key Notes: When you install ESXi on bigger-size flash drives, partitions #2 and #3 won’t be created. The /scratch partition stores log data and is linked with the /tmp/scratch directory on the system’s RAM drive.

How To Install ESXi 5.5 From USB Drives

Firstly, you need to prepare the USB drive and the system; how do you do that? Here are the tips:

  • Install the latest version of syslinux
  • Get a new USB flash drive (from 2GB upwards)
  • Download VMWare ESXi 5 ISO from the official website
  • Insert the USB device, get on your Linux server, and look out for (dmesg). For this guide, our USB device name is dev/mbc

Now, the next thing to do is to completely format the USB drive as FAT32 (even though it’s a new drive with nothing saved inside).

Format the primary partition as FAT32 using the command /sbin/mkfs.vfat -F 32 -n USB /dev/mbc1.

Steps:

  • Install the syslinux bootloader to your USB device.
  • Copy the ISO, but before that, create two mount folders; one for the USB drive and the other for the ISO image.
  • Go to the USB device mount folder and copy the ISOLINUX for SYSLINUX.
  • Edit the syslinux.cfg file by changing the line DEFAULT menu.c32 to DEFAULT mboot.c32.
  • Now, you can unmount the USB drive and install ESXi.

How To Install ESXi 6.5 From USB Drives

The procedure is quite different, and here are the detailed steps you should follow. For this one, you need at least a 4GB USB flash drive. Below are the full requirements:

  • Get the 6.5 ESXi image file from the official website
  • Install Rufus software.
  • Ready your USB device (at least 4GB).

Steps:

  • Run the Rufus software and set the Partition scheme as “MBR partition scheme for BIOS or UEFI.”
  • Click on the icon beside “create a bootable disk using” and select the 6.5 ESXi image file you downloaded.
  • Click on the Start button and also click on “Yes” when the warning prompt comes on.
  • On the next prompt, click "OK" to continue formatting the USB drive.
  • After the formatting is complete, your USB device is then ready for you to install ESXi on it.
  • That's all. You can now run ESXi 6.5 from the USB device.

How To Install ESXi 7.0 From USB Drives

Firstly, you need a new USB Flash drive with nothing saved inside; then, you can proceed with these steps below.

  • Download the VMware ESXi 7.0 image file from the official webpage.
  • Ensure that you save the ESXi 7.0 ISO file in an accessible directory.
  • Download and install the Rufus software.
  • Launch the Rufus software and go to "Drive Properties."
  • Click on the button next to "Boot selection."
  • Browse the directory where you saved the 7.0 ESXi file and import it.
  • Go to the “Partition scheme” drop-down menu and select MBR.
  • Also, click on the "Target System" menu and choose BIOS or UEFI.
  • Click START.
  • Wait for the processes to complete, and your bootable USB drive will be ready.

What Does ESXi Core Dump Mean?

Wondering what could be the meaning of Core Dump? Put simply, coredump is more like ESXi system logs, but it contains much more important data needed for error fixing. The Core Dump is also what the support team would look into to detect whatever went wrong with an ESXi server at any time.

Typically, the coredump partition utilizes 2.5GB of space, but if your ESXi server runs with more than 512GB of RAM allocation, the coredump partition may take more than 2.5GB.

In a standard setup, the coredump partition is partition #9. in some advanced setups, the ESXi host may be configured to utilize a coredump partition on another drive or use ESXi Dump Collector to save vmkernel coredumps on another host in the network.

What Does vSan Traces Mean?

Put simply, vSAN traces are a type of log available on ESXi hosts with vSAN enabled. These traces are not part of the syslogs and are stored in a temporary directory on the RAM disk if ESXi is installed on a removable device (USB). vSAN traces are also erased during an ESXi server reboot or shut down. vSAN traces directory, use this command: esxcli vsan trace get .

How To Back Up ESXi Server Installed On Removable Drives

Backing up an ESXi installed on a USB drive is quite easy and centers on cloning the USB drive. How do you do that? Here’s a comprehensive explanation. Firstly, you will need to shut down the ESXi server before proceeding.

Clone The USB Device

  • Plug in the USB flash drive that has the ESXi installed in it into a Linux system.
  • Verify the USB device name using any of these:

dmesg | grep -i usb

dmesg | grep -i 'attached'

  • The USB device name would appear with /dev/mbc/ - where “mbc” is the USB device name (your USB device’s name should replace the mbc).
  • Access the partitions on your USB device using: lsblk | grep mbc or fdisk -l /dev/mbc.
  • Now, clone the device to an image file (ESXi-flash.img) using the low-level dd utility. (NOTE!!! When using the dd utility, you’ve got to be very careful because any slight mistake can lead to irrecoverable data loss). Below is how to use this utility:

dd if=/dev/mbc of=./esxi-flash.img bs=4M status=progress

Where:

If = an input file

of = an output file

bs=4M = a block size (4MB)

status=progress – a status used to display the progress bar

Remember that "mbc" should be replaced with the actual name of your USB device.

Deleting ESXi From a USB Flash Drive

Let’s say you want to erase ESXi from your flash drive and use the USB device for another operation, here’s how to do it.

But then, to erase everything in an ESXi USB flash drive, you must occupy the free space with zeroes using the dd utility and /dev/zero pseudo-device.

dd if=/dev/zero of=/dev/mbc status=progress

Once the process is complete, the USB device won’t have any partitions anymore; you can confirm this with the fdisk -l /dev/mbc command.

Recovering/Cloning ESXi on a USB Device From ISO Files

Okay, assuming you need to recover your ESXi data from the image file created in the previous step, here’s how to do it. Well, it’s more like switching the command you used earlier - place the ISO as the input file and your USB as the output file.

dd if=./esxi-flash.img of=/dev/mbc bs=4M status=progress

After that, check for the partitions using: fdisk -l /dev/sdd

After the processes are completed, you can connect the USB to your system and run ESXi.

Did you lose some of your important data? Don't worry, you can get them back using DiskInternals VMFS Recovery.

Use VMFS Recovery To Retrieve Your Data

DiskInternals VMFS Recovery software is a special utility program designed to help computer users keep their files safe (in a Disc Image format) and recover lost files effortlessly. This program is fast in scanning and recovering lost VMware files from any storage device.

DiskInternals VMFS Recovery can easily read the VMware VMFS file system and recover files from damaged or healthy VMFS-formatted drives remotely. Furthermore, with the DiskInternals VMFS Recovery software, you can retrieve lost VMDK images on ESXi and VMware vSphere servers.

The good thing about DiskInternals VMFS Recovery is that it can be used by both newbies and professionals, thanks to the intuitive Recovery Wizard that puts the user through all required processes for data recovery to be done. When you finally recover your lost files using this software, you can export the files to remote storage drives via FTP.

How To Use DiskInternals VMFS Recovery For VMware/ESXi Data Recovery

First things first, ensure that your SSH connection is up and running (for users that utilize SSH connections). Then follow the steps below:

  • Download VMFS Recovery and install it on your PC; launch the application and open a remote or local drive to be scanned.
  • Choose between Full and Quick scan modes.
  • When the app scans and retrieves your VMDK files, you can mount them right away or preview them for free.
  • However, to actually save the retrieved files, you must purchase a license to use DiskInternals VMFS Recovery Pro.

Conclusion

Conclusively, this article has detailed everything you need to know about installing and running ESXi on a removable device - particularly USB Flash drives. To be on the safe side, you can quickly backup your data using DiskInternals VMFS Recovery for free. Also, if you lose some files during the ESXi setup processes, you can retrieve them using DiskInternals VMFS Recovery.

Related articles

FREE DOWNLOADVer 4.20, WinBUY NOWFrom $699

Please rate this article.
51 reviews