//
you're reading...
ESXi, vSphere5

Creating vSphere 5 ESXi embedded USB Stick

A very quick post on how to create an image that contains vSphere 5 ESXi Embedded with which you can use to quickly create USB sticks that have the ESXi hypervisor installed.  This is not the same as creating a bootable USB key that contains the installation files to install ESXi from the USB stick.  For this method please refer to this post.

Use this in your lab environment, I wouldn’t recommend doing this in production environments.

In previous versions of vSphere ESXi, it was relatively straight forward to create a bootable USB key which already contained the ESXi hypervizor.  This was done by extracting the files from the ISO and then using ‘dd’ to image the directory structure to the USB stick.  With vSphere ESXi 5 however, this technique is no longer possible.  There is a workaround however.  ESXi is installed and configured in two steps, the installation is done to a disk with a vanilla installation of ESXi without configuration.  The server is then rebooted and the configuration of ESXi continues with the creation of the management network vmk0 or vmk1 (depending on your setup), hostname, DNS etc.

For this to work, we do not perform the second part, which is the configuration, but take an image of the USB key directly after the installation of the vanilla installation of ESXi without configuration.  This enables us to image this vanilla installation onto as many USB sticks, i.e., servers as we like without clashes in virtual MAC addresses and the like.

What you will need: VMware Workstation, 1 USB stick, the ESXi Installable ISO file VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso, WinImage.

Quick steps

  1. Create a new ESX virtual machine in VMware Workstation with CD-ROM drive, USB adapter, 2Gb RAM and 2vCPUs.
  2. Mount the ESXi Installable ISO file to the CD Drive.
  3. Insert the USB stick to your workstation (the same one that runs VMware Workstation).
  4. Boot the VM and connect the USB stick to the VM.
  5. Install ESXi as normal, making sure that you install onto the USB stick, when installation is complete, disconnect the USB stick from the VM and do not reboot the VM, just turn it off.  You no longer need this VM.
  6. With the USB stick still connected to your workstation, open up Winimage.
  7. Go to Disk | Creating Virtual Hard Disk image from physical drive and select the USB stick that you installed ESXi on.
  8. Select a location where to save your image and change the file type to Image file (*.ima).
  9. WinImage will now make a backup on your newly installed USB stick.

Creating vSphere 5 ESXi embedded bootable USB sticks

  1. Now that you have an ESXi image, you can use this to build lots of USB sticks which are ready for ESXi deployment.
  2. Insert a new USB stick into a spare USB port.
  3. Launch WinImage and navigate to Disk | Restore Virtual Hard Disk image on physical drive.
  4. Select the USB stick and click on OK.
  5. Navigate to the image file that you created previously.  WinImage will now restore the backed up image to your new USB stick.
  6. Repeat as necessary.

Configure ESXi

Once the stick is ready, just insert into a spare USB port on your server and ESXi will boot into the configuration screen ready for you to configure management network details.

You may need to log onto the local console once ESXi has finished booting and launch the ‘Restore Network Settings’.  This will reset the vmk0 or vmk1 (depending on your setup) interface.

Advertisements

About Hugo Phan

@hugophan

Discussion

19 thoughts on “Creating vSphere 5 ESXi embedded USB Stick

  1. Ummm… there’s no vswif interfaces in vSphere 5 as it’s ESXi only…

    Posted by Anonymous Coward | September 21, 2011, 10:22
  2. You’re right, I’ve amended the post. Thanks for pointing this out.

    Posted by Hugo Phan | September 21, 2011, 11:01
  3. Hey Hugo,

    I’ve recently tried this and whenever I reboot a host, the configuration is lost. Have you run into this?

    Thanks

    Posted by Jesse | October 25, 2011, 16:17
  4. You don’t need to do anything with Winimage, you can skip the second part all together. So after running the install proces and use USB as destination, you walk to the ESXi host with the USB stick. Boot the host from USB and your done. Only need to enter an IP and hostname

    Posted by Gabrie van Zanten | December 11, 2011, 11:20
  5. Dear “Old” Mr Phan
    I have an alternative solution for you:

    1. Find and download the following tools:
    HPUSBFW & UNETBOOTIN
    2. Run the HPUSBFW tool, click on the USB drive, select ‘Fat32’ and click Format
    3. Run unetbootin, select Diskimage and browse to the ESXi 5 ISO file
    4. Select the USB drive you have just formatted and click OK

    Once completed your USB drive will boot into the ESXi 5 installer. Once booted, install the ESXi 5 Hypervisor to the USB drive (overwriting the installer). This will then leave you with the installed ESXi Hypervisor on the USB

    Lots of Love

    Willy Boy

    Posted by Will | December 14, 2011, 13:24
  6. @Gabrie van Zanten: You’re absolutely right!

    Just when you installed the Hypervisor, shut down the VM and disconnect the stick, travel to your VMware host and boot it…. it works!
    WinImage gives lots of troubles you don’t want, it’s an ancient tool which doesn’t fit in the current windows platforms.
    Thnx 4 this one!

    Posted by Piet Engelen | December 29, 2011, 13:28
  7. The point in using Winimage is to duplicate the image to multiple USB sticks quickly for deployment to multiple hosts.

    Posted by criticalerror | January 31, 2012, 19:41
  8. Hi,
    nice, but it´s not running with integrated CIM Provider, e.g. HP, VmWare Workstation said, you are on Vmware not on HP, no chance to install on Vmware Workstation with CIM Provieder.
    Regards
    Heiko

    Posted by Heiko Garbe | February 29, 2012, 16:00
    • If you want to create a USB stick with HP CIM providers, you will need a physical HP server and download the ESXi image from HP and perform the tasks above. You cannot use VMware Workstation for this.

      Posted by Hugo Phan | February 29, 2012, 16:22
  9. Just wondering – is there any trick to define persistent storage on that USB key (for some basic VM) ?

    Posted by Alex Takacs | April 2, 2012, 21:58
  10. Thanks. But this method is not working for me. I have tried with HP’s ESXs’ versions namely:
    5.0_Mar_2012_ESXi_HD-USB-SDImgeInstlr_Z7550-00334.ISO
    and
    5.0_U1_Mar_2012_ESXi_HD-USB-SDImgeInstlr_Z7550-00352.ISO
    In both the above cases, the disk is created successfully. When I reboot the system, the system boots from USB but while trying to load ubninit file, the system reboots itself

    But when I try with the stock VMware-VMvisor-Installer-5.0.0-469512.x86_64.ISO from VMWare, it just works fine as expected.

    What is wrong with my approach

    Posted by Prashant | April 3, 2012, 15:34

Trackbacks/Pingbacks

  1. Pingback: Creating (a better) vSphere 5 ESXi embedded USB Stick (HP) « VMwire - March 18, 2012

  2. Pingback: Creating vSphere 5 ESXi embedded USB Stick (failed at first in HP XW6600, but with MBR partition table it works) « The Wiert Corner – irregular stream of Wiert stuff - July 30, 2012

  3. Pingback: g33ka | GEEKS UNITE – All Things Tech - August 1, 2012

  4. Pingback: ESXi host fails to upgrade to 5.1 with Update Manager - VirtuallyHyper - September 19, 2012

  5. Pingback: Found back my WinImage license (still going strong: What is WinImage) « The Wiert Corner – irregular stream of stuff - December 10, 2012

  6. Pingback: How To Create Esxi Embedded | How Find Money - May 19, 2016

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: