VCAP-DCV Deploy – Objective 1.1 Perform Advanced ESXi Host Configuration – Part 2

In part 1, we covered using Auto Deploy to install ESXi onto our physical hosts.  In part 2, we will cover unattended installations.

Sometimes known as a scripted install, or a kickstart, this deployment method automates the install process, which in turn makes it easy to deploy multiple hosts quickly.

Here’s a sample ks.cfg file that will automatically accept the EULA, install ESXi on the first hard disk, and overwrite any vmfs volume on that disk.  Then, sets up the mgmt ip statically to 192.168.10.11, and sets the root password to “password”.

vmaccepteula

install --firstdisk --overwritevmfs

network --bootproto=static --device=vmnic0 --addvmportgroup=1 --ip=192.168.10.11 --netmask=255.255.255.0 --hostname=esxi1.tsmith.local --gateway=192.168.1.1 --nameserver=192.168.10.1

rootpw password

reboot

 There are three ways to implement a scripted install.

  • Add the ks.cfg file to the ESXi installer ISO.
  • Put the ks.cfg file on a USB device, and use the default ISO
  • Put the ks.cfg file on a network server, and use the default ISO

Creating a new ESXi ISO containing a ks.cfg file

The easiest way is to edit the ISO using MagicISO.  Follow the instructions here to add the ks.cfg file into the root of the ISO. http://www.winiso.com/support/tutorials/add-iso.html

Now, boot from the ESXi CD (if you burned it) or ISO image, and add the following boot option (Shift + o) :  runweasel ks=cdrom:/ks.cfg

1

*Optional* Edit the default boot.cfg file on the ISO to automatically use the ks.cfg file. Replace kernelopt=runweasel with kernelopt=ks=cdrom:/ks.cfg

ESXi ISO using a USB device for ks.cfg

This is the simplest of the three options, as we just use the original ESXi installer ISO file, and put our custom ks.cfg file on a USB device (fat16 or 32).  When booting the ESXi installer, simply supply the option (Shift + o):  runweasel ks=usb:/ks.cfg 

2

Host the ks.cfg file on a network server

The third option is to host the ks.cfg on a network server.  The options for server are:

  • http / https
  • NFS
  • ftp

When using a network server, we also need to specify some network settings, which can be seen in each example:

3

https(s) – runweasel ks=http://192.168.10.200/pathname/ks.cfg ip=192.168.10.20 netmask=255.255.255.0 gateway=192.168.10.1

NFSrunweasel ks=NFS://192.168.10.200/pathname/ks.cfg ip=192.168.10.20 netmask=255.255.255.0 gateway=192.168.10.1

FTPrunweasel ks=ftp://user:[email protected]/path/ks.cfg ip=192.168.10.20 netmask=255.255.255.0 gateway=192.168.10.1

 

Leave a Comment

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