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:

├── ks1.cfg
├── ks2.cfg
└── ks3.cfg

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:

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:

For additional ESXi Kickstart resources and example, be sure to check out my pages here.

18 thoughts on “How to create custom ESXi boot menu to support multiple Kickstart files?

  1. Would it be possible to create an iso and pull the install files from a http server? I want to have one boot iso and just update that to pull the different version of esxi.

  2. Hi
    Would it be possible to have an ISO image with kickstart.cfg files which are selected automatically based on the MAC address of the esx host that was to be built. I know it can be done through pxe booting, but I can’t use pxe unfortunately.

    • Sure! Selecting it isn’t the difficult part … unlike specifying a DHCP Reservation and associating that to a particular MAC Address which has all of that information centralized in the DHCP conf, you would need to ensure you have that mapping as part of the ISO. If you have that, then its merely parsing out the MAC and then calling into a specific set of KS configurations. The way I can see this working is you have a generic KS that runs, but within that you’ll have bunch if/else statements that’ll execute based on the rules you’ve setup for the MAC Address

    • I’m well aware 🙂 However, for many customers PXE install is NOT an option and this post is specifically for such customers that require a deployment via USB/CDROM/ISO

  3. William, thanks so much for all your posts on kikstart. They helped quite a lot. But there is one last thing i am strugling and this is exactly this scenario. I have the multi-KS menu (same iso – different environments – no possibility for pixboot ) and providing static IP configuration via appending to the boot option. However, while it boots and applies the network configuration (i can ping the IP once everything loads) it does not download the KS file. Just times out. Here is how the string looks like in ISOLINUX.CFG of the 5.5 install:

    KERNEL mboot.c32
    APPEND -c boot.cfg hostname= ip= netmask= gateway= nameserver= vlanid= netdevice=vmnic5 vmotion= iSCSI1= iSCSI2= ks= +++

    The BOOT.CFG is plain like this

    title=Loading ESXi installer
    modules=/b.b00 — — /imgpayld.tgz

    Pretty sure i am missing something simple, yet unable to pinpoint it. Any pointers? Oh, and i have noticed that it tries to download the ks file a few seconds (1-2) before the interface starts to respond to ping. Could it be the process needs to wait for interface? But then i am not sure how to make the download of KS file waitime.

    • 🙂 Never mind – our Network team is playing on the wrong side and put the firewall ACLs between ESX infrastructure and other hosts… Sometimes it is that simple

  4. great post! i modified the isolinux.cfg under my usb bootable drive, but it went straight into the normal installation page. no custom menu displayed! i was booting from usb thru HP iLo4. the custom menu will show up if i booting my laptop from the usb. i guess kickstart does not work well with HP ILO. do you have experience booting esxi from usb thru HP ILO? maybe something else i need to do?

  5. i found out the problem is i was using uefi to boot instead of legacy bio. do you know what to do for custom ESXi boot menu under uefi?

    • Hi I have the same issue to create a bootable USB with ks option on HPO servers using UEFI boot and iLO4.
      Have you resolve this ?
      Do I need to use syslinux instead of isolinux ?
      What’s the format and location of the .cfg file ?
      Tks for your help
      And tks for all ths posts..very very helpfull

  6. William, nice article! I always used the manual way or Auto Deploy – so, I’m new to scripted installations.
    In my lab I’m trying to get familiar with the syntax and the options and I set up the files according to your article.
    But I always get this error: “cannot find kickstart file on cd-rom with path — /KS.CFG”.

    The boot.cfg is default and this is my isolinux.cfg:
    DEFAULT menu.c32
    MENU TITLE Custom ESXi-6.0.0U1 Boot Menu
    NOHALT 1
    PROMPT 0
    TIMEOUT 80
    LABEL Kickstart1 Installer
    KERNEL mboot.c32
    APPEND -c boot.cfg ks=cdrom:/KS.CFG +++
    MENU LABEL ^1 Kickstart1 Installer

    What am I missing here?

  7. Great process and would love to use it but like others have posted newer HP servers and UEFI is a show stopper. Would be great if you could give us some guidance on if there is a workaround or a fix coming in a up coming release.

  8. Hi William Lam,

    I am using windows WDS. trying to install esxi 6 from pxe boot also using kick start ..my vmk0 not comes up.

Thanks for the comment!