For the past couple weeks, I have had the pleasure of working closely with VMware Corporate Architect Lance Berc while testing his ESXi hypervisor PXE boot solution. There’s been plenty of good solutions for PXE installing the ESX hypervisor. In fact, Mike Laverick has written a great how-to on the subject. However, when it comes to PXE booting and configuring ESXi, so far we have been left in anticipation.
There are plenty of advantages to PXE booting a hypervisor, including:
- Rapid hypervisor deployment to nearly any server
- Rapid hypervisor updates – a hypervisor’s VMs can be live migrated (e.g. VMotion) to a new server and their original host rebooted to receive an update
- Servers can be deployed without any internal hard disks, making them more energy efficient (the PXE-booted hypervisor would run in physical RAM, removing the need for a physical hard disk)
Virtual Iron realized the benefits of this concept a long time ago and has offered PXE boot support of their Xen hypervisor implementation for years. Considering ESXi’s small size (32MB), offering a PXE boot option for ESXi makes a lot of sense. Some ESX gurus have been working on solving the ESX PXE boot riddle for quite some time (see Vinternals’ PXE Boot ESX 3i Installable Edition for more details). However, it was VMware’s Lance Berc that was able to develop a fully working proof of concept that includes deploying a new ESXi hypervisor and configuring all necessary settings (e.g. storage, vSwitches and physical NICs, cluster association). I’ve had the opportunity to test and validate Lance’s solution in my lab, and with his permission, I’m able to disclose a rough outline of the details. It’s my hope that by disclosing the VMware proof-of-concept that enough interest will be generated to propel PXE booting ESXi as a future product feature.
Now let’s get on to the details. For starters, you’re going to need a PXE server, and each ESXi server will need network interfaces and a system BIOS that supports PXE/network boot. If you have a system so old that it doesn’t support these features, then it’s probably not a good candidate to run ESXi anyway.
In addition to the PXE server, you will also need:
- VMware ESXi boot and image files extracted from the ESXi installable CD (binmod.tgz, environ.tgz, cim.tgz, oem.tgz)
- A Virtual Center server
- A PXE boot midwife
- Microsoft PowerShell (installed on the VC server)
- VMware PowerShell toolkit
- VMware SDK Perl toolkit
- lance.tgz
- Midwife scripts (download Lance’s samples here)
Lance’s PXEextract document does a nice job detailing the steps needed to extract the ESXi boot and image files from the ESXi installation CD or .iso image. The PXE boot midwife runs the scripts necessary to remotely configure the PXE booted ESXi server; in essence, it assists in the birth of the server. Here is Lance Berc’s description of the midwife’s role:
Introducing the new machine to the environment has several steps:
- Boot ESXi via DHCP/PXE, passing the address of the midwife
- After initialization the new system sends a birth message to the midwife
- The midwife cleans residual state from Virtual Center
- The midwife uses Virtual Center to configure the new system
We have built a prototype midwife out of scripts utilizing the VMware VI3 SDK. There are two sets of scripts, one in Perl and the other in PowerShell. This is very raw code and has not been made robust.
Microsoft PowerShell, the VMware PowerShell toolkit, and the VMware SDK Perl toolkit had to be installed on the VC server (also the midwife) in order to run the midwife scripts. lance.tgz contains a few files that I’ll let remain nameless. As you can suspect, that package is needed to get the stateless configuration to fully run.
Once you have everything in place, deploying a new ESXi host is a piece of cake. In my lab, I was able to automatically configure an ESXi box and join it to an existing VC cluster. Thus far, I’ve booted stateless ESXi hosts with both NFS and iSCSI storage without a hitch, and plan to test a PXE boot ESXi box with Fibre Channel storage in the coming weeks.
PXE booting ESXi opens numerous hypervisor management and deployment possibilities that previously didn’t exist. If this is a feature you would like to see in a future VMware release, please let me know via a comment to this blog. Let’s consider this a virtual petition for requesting a necessary new feature in VMware Virtual Infrastructure deployment and management.
I’m guessing that some of you may want to be able to test this solution in some capacity as soon as it is available. If that sounds like you, keep your eye on Lance Berc’s posts in the VMware forums.







#1 by Duncan - August 10th, 2008 at 02:56
Cool stuff!
#2 by Stu from vinternals - August 10th, 2008 at 07:38
Thx for the mention :-)
I’ve been having a look at Lance’s stuff too (during my day job), was a funny co-incidence that I was put in touch with him completely on the fly during a quick visit to London that he had, right as we were putting the final touches on statelesx (http://www.vinternals.com/2008/08/announcing-statelesx-100.html) which essentially does the same thing but with Java.
We’re still working on the ESXi client piece (neither of us can code in C), but when it’s done I’ll ping you to get your thoughts :-)
#3 by Chris - August 10th, 2008 at 08:20
Excellent! Thanks, Stu. And keep up the great work.
#4 by Jim McCann (jimb0) - August 21st, 2008 at 15:02
I figured out how to save the state of the esxi via pxe boot
http://docs.google.com/Doc?id=ddcwgcd6_4fs6s7jcf
#5 by techman - September 27th, 2008 at 21:01
Great article – I’ll definitely be looking at doing this in my lab. Native support for stateless PXE bootup would be very desirable.
#6 by Gijs - April 24th, 2009 at 23:14
For those trying the link in “Mike Laverick has written a great how-to on the subject” and finding it broken: The link is http://www.rtfm-ed.co.uk/docs/vmwdocs/uda-1.4.pdf
#7 by Gijs - April 24th, 2009 at 23:27
For those trying the link in “(see Vinternals’ PXE Boot ESX 3i Installable Edition for more details).” and finding it broken. The link is:
http://vinternals.com/2008/01/pxe-boot-esx-3i-installable-edition/
#8 by bg - May 4th, 2009 at 10:24
Can ESXi Server software and Virtual Center Server software be loaded on the same physical server?
#9 by Chris - May 7th, 2009 at 05:30
Sure can. You’d just need to run vCenter server in a VM on the ESXi host.