ESXi: Kickstart installs using CD-ROM or USB media

Kickstart and PXE are almost always used in conjunction, however you don’t have to use PXE to kickstart your installs. Fortunately you can provide the location of a kickstart even if you are using bootable media from USB and/or CD-ROM.

The process I’m going to describe here involves putting the kickstart(s) in a place accessible on the CD/USB media. This is particularly useful if you have an isolated network, a network that has limited resources or if you simply want to eliminate any questions during a manual install process. For example, I use kickstart to do the basic network configuration and the like, however there are very few things that can not bet set via the command line, so, you could, if desired, use kickstart as a method of configuration management. Or, you could simply have it do the install exactly the same as if you answered the questions when the default media is booted, but without actually answering the questions for each host.

You can also provide kickstart files from a web or NFS server even if you are using media. This can prove especially beneficial if you have frequently updated kickstarts (or a large number of them) and you don’t want to have to update the media when kickstarts are changed and/or added. VMware’s documentation describes how to provide the location if you are using web (http) or NFS as the method for providing the configuration.

The example I have here was done from a linux host (RHEL5 to be exact). All of this is reproducible in Windows, however I am not providing any documentation on how to do that.

Firstly, we need to extract the files from the media. I am using the ISO here and mounting it, however aside from the act of mounting an ISO, this should be the same if you already have a physical vSphere hypervisor (ESXi) disk.

So, a lot of things going on here. Most of it is self explanatory, however there are two things that need more…the kickstart files and isolinux.cfg.

The kickstart(s) are just like I have detailed in this comment, or as has been described by many others. Incidentally, each of those links is an excellent resource for PXE booting using kickstart also. William Lam’s website is also an exceptionally good resource for PXE/kickstart information.

Here is an example kickstart that I use….

You can change the install cdrom line to use USB (install usb) if you are using USB media. Also, instead of specifying the network information you can simply provide the --bootproto=dhcp option so that you don’t have to specify that information. I chose to provide the hostname and IP in the kickstart so that once the install process is done I can simply add the host in vCenter.

When the media boots it loads a version of linux called ISOLINUX. ISOLINUX reads a file (isolinux.cfg) which it uses to determine what the display shows to the user. Below is a sample isolinux.cfg

I’m simply providing different kickstarts for different hosts. I also have a kickstart for simply answering the questions and getting ESXi installed (the dhcp boot one). The default ESXi installer is also available so that if nothing else I can use that to install the OS.

One thing to note here is that the entire path to the kickstarts is capitalized. I’m not sure why this is required, but when the CD-ROM is mounted, the install OS (which is actually ESXi itself) sees all files on the media in ALL CAPS.

The only thing left is to create a new ISO with the kickstarts on it. Assuming you followed the first block of code, by executing the following we will create a new ISO that can be remotely mounted or burnt onto media for doing your installs.

The end result is that when you boot the media you should see a screen like the following:

ks_menu

You can get much more sophisticated if you like with the menu system, including adding multi-level menus and different colors.

Well, I hope you’ve lasted this long, this turned out to be longer than I expected. Hopefully this will put you on the way to streamlining loading ESXi onto your hardware. Questions are welcome in the comments!

10 thoughts on “ESXi: Kickstart installs using CD-ROM or USB media

  1. Hey there,

    I tried the esxi installation on your way. But i get an error “Cannot find kickstart file on cd-rom with path — /KICKSTART/ESX01.CFG

    My kickstart file is nearly like yours. I also adapted your ISOLINUX config.

    I don´t understand why the Installer show me this error.

    Any other solutions?

    I unzipped the .iso with winrar, insert the kickstart folder with the .cfg files in it and create an new image with ImgBurn and burn it on CD.

    Regards

    • Hellsing,

      After a lot of testing, I think I may have found the problem. It seems that in some, not all cases as it worked for me, the file system for the mounted media cuts off files that have a file name longer than eight characters, similar to what DOS did back in it’s day with 8.3 file names.

      Try changing the name of the directory that contains the kickstart file(s) to just “KS” or if you don’t mind the untidiness, put the kickstarts in the root directory of the CD-ROM.

      Hope it helps…

      Andrew

  2. Wow! Great Page. I was stuck with trying to figure out why I was getting invalid checksum errors and either it was just bad CDs + GUI (I was using ISOMaster) for creating the boot disk, but your mkisofs command was the last step I did and it worked. Thanks!

  3. Hello Andrew!
    I read your very interesting post above, but I did understand only half of it. I am trying to install on my dear old Satellite Toshiba, Ubuntu 10.04 from a USB as the CD-ROM is not working. Do you think is somehow possible? I have been able to reach the point of installation where from the menu asks you to place the CD-ROM, which is funny as it began reading from the USB to begin with…
    Don’t know if you will have the time or patience to help me out, but I truly hope so.
    Regards from Barcelona and many thanks in advance!
    Patricia

  4. Just what the doctor ordered! I think that mixing this approach with PXE boot will make provisioning a breeze. On another front, I have heard that VMware is moving away from locally loaded hypervisor (SAN boot being their default choice). I would make a case for PXE boot. From what I have read and what I am currently testing in the lab, you can have multiple configurations pulled from a single set of binaries to boot many hosts at once (not unlike how VDI servers up client linked VMs from a single source). This would remove dependency on the local HDD moving even further towards true “cloud” in the datacenter, your server then being only Proc and RAM. Thoughts? Maybe deserving of its own thread at some point.

  5. i have tried to install this without PXE on ATCA-4500 server (the menu.c32 is from syslinux 3.54 version), it is stopped at: “Loading ienviron …..”, any ideal for this?

Leave a Reply