How to kick-start scripts to automate VMware’s ESXi installation via USB

Rolling out hundreds of VMware’s ESXi hypervisors is a time-consuming challenge with the chance for problems. Understand how to use a USB flash drive to automate the ESXi put in.

Graphic: Wavebreakmedia, Getty Photos/iStockphoto

VMware is arguably the typical when it arrives to virtualizing infrastructure, irrespective of rising assistance for other virtualization types these types of as Docker, Amazon’s AWS, and Microsoft’s Azure. But the concentration of this post isn’t market place share or what’s the ideal solution for your organization—it’s to share a uncomplicated, effective way to automate the set up of the ESXi hypervisor onto bare steel components in purchase to aid the digital deployment of servers with as mild a touch as possible on the aspect of the specialists/admins. A person strategy that supplies a self-contained and thoroughly scripted procedure that is straightforward to replicate is through USB flash generate (UFD).

Learn how to develop a UFD that will install ESXi, use simple community options, and configure the host for remote administration. Before we dive in, there are specifications vital to make this operate with very little to no mistake.

SEE: Server virtualization: Most effective (and worst) techniques (totally free PDF) (TechRepublic)


  • VMware vSphere Hypervisor (ESXi ISO) graphic (Newest supported variation for your hardware)
  • UNetbootin (Mac/Linux/Windows)
  • 4 GB USB flash push (or much larger)

How to build the bootable USB installer

  1. Insert your USB flash travel into an accessible port on your personal computer.
  2. Open UNetbootin and choose the Diskimage radio button, then simply click the “…” button to navigate to the spot the place the VMware ESXi ISO is located.
  3. The USB generate should really be recognized instantly next to the Push: segment. Click on the Okay button to carry on, generating the installer and making the drive bootable.
  4. The moment it is really developed, near UNetbootin, but go away the installer push plugged in.

How to configure the boot.cfg file for unattended installation

Open up the recently created USB installer travel and locate the boot.cfg file. Open the file in the text editor of your alternative and identify the pursuing line:


Append the next text to it soon after the “=” signal to instruct the installer to glance for the kickstart file, or the remedy file that it should really use for unattended installation:


How to configure the kickstart (KS) solution file

  1. From the text editor, shut the boot.cfg file and open up a new, blank webpage.
  2. Copy and paste the adhering to script into the text editor:

# Foundation kickstart script install


clearpart —firstdisk —overwritevmfs

set up —firstdisk —overwritevmfs

network —bootproto=static —ip= XXX.XXX.XXX.XXX —netmask= XXX.XXX.XXX.XXX —gateway=XXX.XXX.XXX.XXX—hostname=HOSTNAME —nameserver= XXX.XXX.XXX.XXX —addvmportgroup=1



%firstboot —interpreter=busybox

# DNS options

esxcli system hostname established —fqdn=HOSTNAME.Domain.EXT

esxcli network ip dns look for increase —domain=Domain.EXT

esxcli community ip dns server insert —server= XXX.XXX.XXX.XXX

esxcli community ip dns server insert —server= XXX.XXX.XXX.XXX

# help & commence SSH

vim-cmd hostsvc/enable_ssh

vim-cmd hostsvc/start out_ssh 

# enable & get started ESXi Shell

vim-cmd hostsvc/empower_esx_shell

vim-cmd hostsvc/commence_esx_shell

# Suppress ESXi Shell warning

esxcli method configurations sophisticated established -o /UserVars/SuppressShellWarning -i 1

# SNTP configuration

cat > /etcetera/ntp.conf << __NTP_CONFIG__

restrict default kod nomodify notrap noquerynopeer





/sbin/chkconfig ntpd on

The script is merely a template that will need to be edited in order for it to work for your organization’s environment. Specifically, the entries that are CAPITALIZED or contain XXX.XXX.XXX.XXX, should be modified to reflect the hostname, domain, and network settings information that will be unique to that ESXi server.

After that information is entered, save the file as KS.CFG, and place the file at the root of the USB installer drive. Safely eject the drive, and your USB-based installer is ready to deploy ESXi hypervisors unattended.

Important changes made by the script

Besides the aforementioned network and hostname configuration, the script auto accepts the VMware EULA and identifies the first storage disk(s) on the server and formats them before installing the ESXi system files on them. The script sets the root account password, as well as setting the SSH and ESXi Shell services to be enabled for remote management. Lastly, the script configures SNTP so that the time/date is set correctly and enables the NTP service.

Also see

Fibo Quantum

Be the first to comment

Leave a Reply

Your email address will not be published.