Search This Blog

2012-02-11

Customizing an VMware ESXi5 installation disc for unattended install

This explains the workflow of creating a customized ESXi5 installation disc using a Windows PC. VMware has documentation on this workflow using a linux machine here.

1) Download the ESXi iso.
2) Extract the iso using your favourite iso extractor to c:\esxi. I used 7zip.
3) Create a KS.CFG file in c:\esxi with your Kickstart config. Documentation of ESXi5 kickstart commands is here.
4) Modify c:\esxi\ISOLINUX.CFG. Append "ks=cdrom:/KS.CFG" to APPEND. Your LABEL install should look like this:
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg ks=cdrom:/KS.CFG
MENU LABEL ESXi-5.0.0-20111104001-custom ^Installer

You can also add multiple LABEL install blocks to specify different KS.CFG files or no kickstart at all.
**When ESXi mounts the CD during setup, all files are capitalized. So even if your kickstart cfg file is ks.cfg you have to put KS.CFG.

Now you have to burn your customized setup onto a disc.
1) Download and extract cdrtools for windows from here.
2) Run this command to create the iso (case senstive):
mkisofs.exe -relaxed-filenames -J -R -o custom_esxi.iso -b ISOLINUX.BIN -c c:\esxi\boot.cfg -no-emul-boot -boot-load-size 4 -boot-info-table c:\esxi
3) Burn custom_esxi.iso to disc with any utility. I used the Windows 7 built-in iso burner.


Common Errors:
Not specifying boot.cfg in mkisofs
kernel= must be set in /boot.cfg
Fatal error: 32 (Syntax)
Using imgburn
“No DEFAULT or UI configuration directive found”
OR
ata-pata.v00 not found

ks.cfg was not capitalized in isolinux.cfg
cannot find kickstart file on cd-rom with path -- /ks.cfg

1 comment:

  1. Great write up, I noted that the following also needs to be done;

    Edit BOOT.CFG and change the kernelopt line to look like:
    kernelopt=runweasel ks=cdrom:/KS.CFG

    Ben

    ReplyDelete