[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.
William Lam is the de-facto authority on fully-automated ESXi deployments, and others have provided recipes for configuring VMware ESXi 4.1 installation media for interactive PXE installation.
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!
Pingback: VMnerds blog » nouveauté vSphere5: AutoDeploy & ImageBuilder
Pingback: Welcome to vSphere-land! » vSphere 5 Links
For me the installation stucks after loading 32 modules:
Aug 31 16:18:41 bootsrv in.tftpd[11019]: RRQ from 192.168.8.11 filename pxelinux.0
Aug 31 16:18:41 bootsrv in.tftpd[11019]: tftp: client does not accept options
Aug 31 16:18:41 bootsrv in.tftpd[11020]: RRQ from 192.168.8.11 filename pxelinux.0
Aug 31 16:18:41 bootsrv in.tftpd[11021]: RRQ from 192.168.8.11 filename pxelinux.cfg/01-bc-30-5b-d3-3f-81
Aug 31 16:18:41 bootsrv in.tftpd[11022]: RRQ from 192.168.8.11 filename menu.c32
Aug 31 16:18:41 bootsrv in.tftpd[11023]: RRQ from 192.168.8.11 filename pxelinux.cfg/01-bc-30-5b-d3-3f-81
Aug 31 16:18:47 bootsrv in.tftpd[11025]: RRQ from 192.168.8.11 filename images/ESXi-5.0-469512/mboot.c32
Aug 31 16:18:48 bootsrv in.tftpd[11026]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/boot.cfg
Aug 31 16:18:48 bootsrv in.tftpd[11027]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/tboot.b00
Aug 31 16:18:48 bootsrv in.tftpd[11028]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/b.b00
Aug 31 16:18:48 bootsrv in.tftpd[11029]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/useropts.gz
Aug 31 16:18:48 bootsrv in.tftpd[11030]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/k.b00
Aug 31 16:18:48 bootsrv in.tftpd[11031]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/a.b00
Aug 31 16:18:48 bootsrv in.tftpd[11032]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v00
Aug 31 16:18:48 bootsrv in.tftpd[11033]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v01
Aug 31 16:18:48 bootsrv in.tftpd[11034]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v02
Aug 31 16:18:48 bootsrv in.tftpd[11035]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v03
Aug 31 16:18:48 bootsrv in.tftpd[11036]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v04
Aug 31 16:18:48 bootsrv in.tftpd[11037]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v05
Aug 31 16:18:48 bootsrv in.tftpd[11038]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v06
Aug 31 16:18:48 bootsrv in.tftpd[11039]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ata-pata.v07
Aug 31 16:18:48 bootsrv in.tftpd[11040]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/block-cc.v00
Aug 31 16:18:48 bootsrv in.tftpd[11041]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ehci-ehc.v00
Aug 31 16:18:48 bootsrv in.tftpd[11042]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/s.v00
Aug 31 16:18:48 bootsrv in.tftpd[11043]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/weaselin.i00
Aug 31 16:18:48 bootsrv in.tftpd[11044]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ima-qla4.v00
Aug 31 16:18:48 bootsrv in.tftpd[11045]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ipmi-ipm.v00
Aug 31 16:18:48 bootsrv in.tftpd[11046]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ipmi-ipm.v01
Aug 31 16:18:48 bootsrv in.tftpd[11047]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/ipmi-ipm.v02
Aug 31 16:18:48 bootsrv in.tftpd[11048]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/misc-cni.v00
Aug 31 16:18:48 bootsrv in.tftpd[11049]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/misc-dri.v00
Aug 31 16:18:48 bootsrv in.tftpd[11050]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-be2n.v00
Aug 31 16:18:48 bootsrv in.tftpd[11051]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-bnx2.v00
Aug 31 16:18:48 bootsrv in.tftpd[11052]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-bnx2.v01
Aug 31 16:18:48 bootsrv in.tftpd[11053]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-cnic.v00
Aug 31 16:18:48 bootsrv in.tftpd[11054]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-e100.v00
Aug 31 16:18:48 bootsrv in.tftpd[11055]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-e100.v01
Aug 31 16:18:48 bootsrv in.tftpd[11056]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-enic.v00
Aug 31 16:18:48 bootsrv in.tftpd[11057]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-forc.v00
Aug 31 16:18:48 bootsrv in.tftpd[11058]: RRQ from 192.168.8.11 filename /images/ESXi-5.0-469512/net-igb.v00
Any Ideas ?
@Greg
Try upgrading to syslinux/pxelinux 3.86. I had the exact same problem with syslinux/pxelinux 3.11.
I keep getting the following error…
Configuration error while parsing /boot.cfg
Fatal Error: 15 (Not Found)
I am running my enviornment on Win 2k8 r2 using tftp32. All perms are correct and I have tried both placing the files in the tftp root and in a sub directory and still I get the same error. When trying the different locations I did change the default file and the boot.cfg file to reflect the location change.
Anyone seen this error or have any ideas?
Thx
Figured this one out. Relative paths don’t work in my enviornment for some reason. The prefix neede to be removed and the path had to be added to each file.
great info… SOOO Much easier than 4 (or 3!)
Don’t know if this is unique to me or not. All the files on the ESXi ISO image were in upper case!
I’m running my TFTP server on Linux, and it took me about 30 minutes to realize the files were in upper case, not lower. ::smack hand on forehead :: Everything worked fine after that when I renamed all “to lower”.
Must have had something to do with how you mounted the ISO, or your distribution’s defaults.
Using VCD (Virtual Clone Drive) under WinXP to mount the ISO as a drive letter, then WinSCP to copy over to my TFTP Linux host.
I’ve done the same thing for years with ESXi-3, 4, and other ISOs (Linux, BSD, Win servers) without an issue. Everything had proper case. Not a big deal to me, as I was able to correct the case in a few seconds with a simple script. Just thought it was strange! (Plus I didn’t immediately recognize it, which has me more upset! LOL!)
Thanks for the tips though. I didn’t know any better, and would have left (and added) all the directory paths in the boot.cfg file for sure. You saved me a bunch of time.
Jeremy’s tip on upgrade pxelinux.0 (syslinux) worked for me in resolving the hang problem. I upgraded using the CentOS 6.1 version of pxelinux.0 with no problems.
Thanks Jeremy!
I am getting blank screen after selecting the ESXi 5 from the main menu.
can any help me what would be wrong.
Just use a newer version of pxelinux.0 (download one of the archive from http://www.kernel.org/pub/linux/utils/boot/syslinux/ and find inside it in core folder pxelinux.0)
Pingback: Derek, and Sylvia » [VMware] ESXi 5 interactive PXE installation
I get a Fatal error: 15 (Not found) when trying to “Configuration error while parsing /esxi5/boot.cfg.
In the tftp log i see that “Read request for file ” not working because //, but where does it come from???
Thanks Andy
I really don`t understand why you copy the files from /tmp to /esx5 or winscp to wherever 🙂
It makes no sense except you wanna waste storage.
You have your ISO image on disk… so all you need to do is to mount it as described and point to the directory. You can even do it with automounter 🙂
auto.iso
* -fstype=iso9660,ro,loop :/nfs/nas01/ISOs/links/&
All you need to have is a directory on the nas where you link to the iso and thats it.
Hope it helps. I setup a complete kickstart env just with iso`s
You are a godsend! I have read all the sites that talk about setting up esxi5 under a pxeboot environment including william lam, the person you mentioned as the guru. Even his site didn’t explain this so concisely or accurately for that matter. Thank you, I now have a PXEboot environment that serves up i386/x86_64 versions of centos as well as ESXi5 thanks to you and your readers comments.
Worked like a charm. brilliant. thanks VM
Cheers, works for 5.1 to
Additionally an easier way is if you have your OS or ESXi .iso locally from a device you can boot to it and install via Dell DRAC card.
1. connected DRAC and went in to virtual console
2. mapped virtual media in console (using DRAC6 version) to my bootable esxi 5.1 flash drive.
3. Installed ESXi as I normally would to the local (remote) storage or media.
listen here: all I can say ……this install is like a knife throught butter.
Funny thing, I have a datacentre where the cdroms eject after the install…Wonder if there is a way to stop it from opening?
Thanks, and its a big thanks for your post…coming from pxe esx4 to esxi4 all flavours, nightmare!!!! to this one that just worked.
Hello Johan,
try this on the firtst reboot.
reboot –noeject
Andy
is this a stateless install like the others? i.e. rebooting means you need to run through the install again?
This is a full, persistent install. Withstands reboots.
Very freaking interestig. Thanks for your guide.
Dear Readers:
If you’ve found VCritical useful, I’d like to ask that you consider voting for me in the 2014 vSphere Land top blog contest going on right now.
More info is available here: https://vcritical.com/2014/02/top-vmware-blog-contest-2014-voting-now-open/
Thanks for reading and sharing your comments!
Eric Gray
Shell script to automate the ISO to PXE process also available:
https://vcritical.com/2014/03/automatically-prepare-an-esxi-iso-image-for-pxe-booting/