Scripted hands free (almost) ESXi 6.7 install via USB

Creating a home lab shouldn’t be about installing ESXi, it should be about what you do AFTER that. I’ll cover how to create a USB that will install ESXi (almost) hands free to another USB in an ESXi host. Using this method, you can spend less time installing ESXi and more time playing VMware.

I’m going to install ESXi on a single host that contains a M.2 local drive (used as the datastore) and a USB thumb drive for the OS.

note: this is a work in progress…


Step 1: Get VMware ISO

Buy VMug EVALexpierence license:


Step 2: Create USB

Intro (covers main goal): - Download ISO - (to do: create side post on clearing old flash drives w/ diskutil eraseDisk free EMPTY /dev/disk4 && diskutil list )

Create USB with UNetbootin () - UNetbootin

Open up Boot.CFG in

  • KS.CFG (copy to /EFI/BOOT/BOOT.CFG

for now:

  • create KS.CFG, save to main iso
  • boot and Enter Boot Options to Start an Installation or Upgrade Script.

  • Start the host.

  • When the ESXi installer window appears, press Shift+O to edit boot options.

  • At the runweasel command prompt, type ks=location of installation script plus boot command line options

  • ks=KS.cfg

  • kernelopt=runweasel ks=cdrom:/KS_CUST.CFG

  • ks=cdrom:/KS.CFG

#Accept VMware License agreement

# Set the root password
rootpw r00tp@ssw0rd

# Install ESXi on the first (USB) disk, ignore any SSD and do not create a VMFS
install --ignoressd --firstdisk=usb --overwritevmfs --novmfsondisk

# Following will create a VMFS on the second local drive
#partition datastoreM2 --onfirstdisk=local

# Set serial at install

# Set the keyboard
keyboard 'US Default'

# Set the network to DHCP on the first network adapter
network --bootproto=dhcp --device=vmnic0

# A sample post-install script
%post --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write( time.asctime() )

# reboot the host after installation is completed
comments powered by Disqus