[This still works great with ESXi 5.5 – September 2013]
[UPDATE March 2014 – shell script to automate this process is also available.]
A flexible PXE infrastructure can be a real force multiplier in your technology arsenal. Fully-automated installs are great time-savers, but there is also value in being able to perform an interactive (manual) install of VMware ESXi, Linux, or Windows over the network. Physical installation media is becoming less and less viable in this day of lights-out datacenters, and virtual media capabilities provided with remote consoles, such as iLO, are best reserved for punishing junior members of the team. It’s easy enough to have a Linux-based PXE server coexist with Windows Deployment Services — useful for environments that need to deploy various operating systems on a single VLAN.
The good news is that with VMware ESXi 5 it is no longer necessary to create the image.tgz file to accommodate a manual PXE installation, and another handy enhancement to boot.cfg makes it slightly cleaner to organize multiple installation sources on a PXE/TFTP server.
Take a look at the following procedures to learn more:
Prepare the VMware ESXi 5 Installation Media
On your TFTP server, simply extract the contents of the installation ISO into a new directory.
# mkdir esxi50 # mount -o loop VMware-VMvisor-Installer-5.0.0-nnnnnn.x86_64.iso tmp/ # rsync -a tmp/ esxi50/ # chmod +w esxi50/*
That’s it. No need to create any additional files with ESXi 5.
Modify the ESXi boot.cfg Configuration File
In order to reflect the fact that the installation source is not in the root of the TFTP server, two tweaks are needed.
- Remove all of the slashes (/) from the boot.cfg file so relative paths will be used (vi :%s#/##g)
- Add a “prefix” directive to the boot.cfg file to specify the proper subdirectory, from the perspective of the TFTP root
NEW – Both of the above can be accomplished with the following one-liner in one fell swoop:
sed -e "s#/##g" -e "3s#^#prefix=/`basename $PWD`/\n#" -i.bak boot.cfg
End result will look something like this:
This is much cleaner that repeating the full path dozens of times throughout the file.
Add a PXE Menu Entry
Typically the PXE menu is pxelinux.cfg/default; add the following section and you’ll be set:
LABEL esxi50 KERNEL /esxi50/mboot.c32 APPEND -c /esxi50/boot.cfg MENU LABEL ESXi-5.0.0
Ready for interactive installation
Now you are ready to boot your physical or virtual machines for an interactive installation of VMware ESXi 5. It’s very easy to run ESXi 5 inside a VM, now with 64-bit nested guest capabilities!Follow @eric_gray Tweet
Comments are now closed.