Unattended ESXi Installation from an USB Flash Drive

I was asked if it is possible to create an USB Flash Drive that can install ESXi on a server automatically. ESXi has a Scripted Install feature which allows to put all installation parameters into a Kickstart file to run unattended Installations. This post explains how to create an USB Flash Drive that does unattended ESXi installations. You can plug it into a Server, power it on and ESXi will be installed automatically.

  1. Create a bootable ESXi Installer USB Flash Drive with Rufus (Howto)
  2. Navigate to the Flash Drive and open boot.cfg with an editor. Make sure to use an editor that can handle UNIX encoding (PSPad for example)
  3. Replace kernelopt=runweasel with kernelopt=ks=usb:/ks.cfg
  4. Create ks.cfg in the root directory of your Flash Drive
  5. Open ks.cfg with an editor. Creating complex kickstart is out of scope of this post. The only option you need to know is install. The firstdisk flag will install ESXi to the first device, with the following priority:
    1 - locally attached storage (local)
    2 - network storage (remote)
    3 - usb disks (usb)
    Be careful to not destory any data! Remove Shared LUNs and do not use this with Servers that contain data.Copy this to your ks.cfg file. This will install ESXi to the first local disk:

    rootpw vmware
    install --firstdisk --overwritevmfs
    network --bootproto=dhcp --device=vmnic0


  6. Save and Close

That's it. You can plug in the USB Flash Drive to a Server, power it on and it will be installed automatically. The password for the root user is set to "vmware".

Do you want to install plenty hosts to SD Cards or USB Flash Drives?
Create the required amount of USB Flash Drives or SD Cards but replace the ks.cfg file with:

rootpw vmware
install --firstdisk=usb-storage --overwritevmfs
network --bootproto=dhcp --device=vmnic0

Plug it in and power the server on. It will boot from the media and do an unattended installation to the installation media. (It uses the first USB device - might be an issue when you have more than one USB storages connected.)

Of course, you can also write an own ks.cfg file to deploy servers with your own customized configuration.

  1. i followed this post, and tried to boot from usb thru hp iLO interface. it goes to the normal installation, the kickstart file is ignore. Does it works with HP ILO 4?

    • Haven't tried it with iLO, but it schould not affect the installation.
      What ESXi version are you trying to install? This post was created with ESXi 5.5.

  2. NOTE: You MUST have a password > 8 chars for ESXi 6! I tried followed this guide and it didn’t work until I increased my password length.

  3. HP ZL Compute Blade on the Cheap | tinkeringdadblog - pingback on March 4, 2016 at 3:49 pm

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackbacks and Pingbacks: