I recently received a question from one of my readers who was looking to migrate from ESXi 4.1 to newer version and one of the challenges they faced was around their ESXi scripted installs, better known as ESXi Kickstart. Previously, they had relied on using a custom syslinux boot menu to be able to select a specific Kickstart configuration file that resided locally on a bootable ESXi Image (USB, ISO or CDROM) as a PXE/DHCP environment was not allowed in their environment. There was a small change to how ESXi boot files were reference between ESXi 4.x and ESXi 5.x/6.x and a new boot.cfg configuration is now used which I had written about here with respect to scripted installs when ESXi 5.0 was first released.
Luckily, even with these changes one can still use a custom menu with ESXi 5.x/6.x and be able to select a specific Kickstart configurations based on user input. Here is a screenshot example of a custom ESXi Image that I built providing three different install options that could be selected which would map to three different Kickstart configurations which can be either local to the boot media or can also be retrieved remotely.
The first thing you should be aware of if you plan to boot the custom ESXi Image from local media such as USB, CDROM or ISO is that the path to the Kickstart file must be in all UPPER CASE which is mentioned in this VMware KB 1026373. The next caveat that I found in my testing is that if you plan to store the local Kickstart files inside of a directory within the ESXi Image, the name of the directory can not be too long. I would recommend using "ks" as "kickstart" apparently was too long.
After you have extracted the contents of an ESXi ISO which you have downloaded, you will want to create a root directory called "ks" which will contain the different Kickstart configuration files. Here is an example of what structure look like:
Next, you will need to edit the isolinux.cfg file which comes by default within the ESXi ISO. This is where you will add the different Kickstart options that a user will be able to select from. In this first example, we will look at referencing the Kickstart files locally on the media which can be either USB or CDROM and you will need to ensure you specify the right boot option as shown here in the VMware documentation. The path to the Kickstart file needs to be appended to the line that contains boot.cfg reference and you must ensure you include "+++" at the end of that line.
Here is an example of referencing a Kickstart file that lives on a USB device under this path /ks/ks.cfg:
APPEND -c boot.cfg ks=usb:/KS/KS.CFG +++
Here is an example of my isolinux.cfg for the boot menu that I have shown above which provides three different options mapping to three different Kickstart configuration files:
DEFAULT menu.c32 MENU TITLE vGhetto Custom ESXi 6.0 Boot Menu NOHALT 1 PROMPT 0 TIMEOUT 80 LABEL Ghetto Install KERNEL mboot.c32 APPEND -c boot.cfg ks=cdrom:/KS/KS1.CFG +++ MENU LABEL ^1 Ghetto Install LABEL A bit More Ghetto Install KERNEL mboot.c32 APPEND -c boot.cfg ks=cdrom:/KS/KS2.CFG +++ MENU LABEL ^2 A bit More Ghetto Install LABEL Super Ghetto ESXi Install KERNEL mboot.c32 APPEND -c boot.cfg ks=cdrom:/KS/KS3.CFG +++ MENU LABEL ^3 Super Ghetto ESXi Install LABEL hddboot LOCALBOOT 0x80 MENU LABEL ^Boot from local disk
As I mentioned earlier, the Kickstart configuration file can either be retrieved locally or it can also be retireved remotely using one of the following supported protocols: http, https, ftp & nfs as shown here in the VMware documentation.
Here is an example of isolinux.cfg for a boot menu which references both a local kickstart as well as one that remotely lives on a web server:
DEFAULT menu.c32 MENU TITLE vGhetto Custom ESXi 6.0 Boot Menu NOHALT 1 PROMPT 0 TIMEOUT 80 LABEL Ghetto Install KERNEL mboot.c32 APPEND -c boot.cfg ks=cdrom:/KS/KS1.CFG +++ MENU LABEL ^1 Ghetto Install LABEL A bit More Ghetto Install KERNEL mboot.c32 APPEND -c boot.cfg ks=http://172.30.0.108/ks/ks2.cfg +++ MENU LABEL ^2 A bit More Ghetto Install LABEL Super Ghetto ESXi Install KERNEL mboot.c32 APPEND -c boot.cfg ks=http://172.30.0.108/ks/ks3.cfg +++ MENU LABEL ^3 Super Ghetto ESXi Install LABEL hddboot LOCALBOOT 0x80 MENU LABEL ^Boot from local disk
For additional ESXi Kickstart resources and example, be sure to check out my pages here.