ESXi Network Based Build infrastructure

Now that ESXi is replacing ESX classic it’s going to be really important to be able to maintain ESXi more simply than ESX classic. One of the things that held VMware back from deploying ESXi internally was the lack of build automation. The 4.1 release of ESXi addressed this issue and we once more have an automated build for our hosts.

In a past life I made a lot of use of the Altiris Deployment solution to deploy Citrix Metaframe servers so I like the idea of a PXE environment and physical servers that PXE on every restart, only rebuilding selectively. My aim was to make rebuilding a host as easy, if not as pretty, as a Metaframe server was with Altiris. For this I need a PXE environment, a deployment server and a scripting environment. For the PXE I use a Windows server with DHCP installed and a TFTP server. I use the same server as a web server to be a repository. For a scripting environment I chose PowerShell and PowerCLI because together they are so powerful.

This post covers the infrastructure setup for the PXE deployment environment, a following post will cover the automation with PowerCLI part, when I’m happy with what I’ve built.

Information on using a Linux solution can be found in the ESXi install guide, which is also a key reference for the automation parts.

The process is:

Install DHCP & setup a normal scope

Set DHCP options on the scope, the Boot Server is the machine running the TFTP service, in my case the same machine running DHCP.

Get TFTPd.exe and install it as a windows service

Configure the service to start automatically and start it

Put the registry setting in place to hard set the TFTP folder

Place six files from the ESXi installable install CD in the TFTP folder for the version of ESXi

Place two files from the ESXi install CD in the TFTP root folder along with pxelinux.0 that you download as part of the syslinux package, these make the PXE bootloader and it’s menu work.

Copy isolinux.cfg from the ESXi install CD in the TFTP folder, and rename to default

Use a Unix safe editor (I use Crimson) to edit the default file and add the version specific TFTP directory for each file on the line that starts with the word append

Install IIS and copy the ESXi installable install CD contents in a subdirectory

I have both the PXE and IIS directories to be version named to allow me to maintain multiple build versions, this came in handy when ESXi 4.1 Update 1 was released and I wanted to be able to test both versions by rebuilding.

Next ensure your ESXi servers support PXE boot, I doubt you’ll have an issue with hardware that’s on the HCL.

To test the process reboot your ESXi server and invoke PXE boot, this usually means pressing <F12> at the right moment in the boot sequence.

You should see a series of messages about DHCP and TFTP quickly followed by the boot menu, let the timer run down and the installer will launch just as it does when you boot from CD.

So there you have it, a network based install of ESXi using software you already own (Windows Server) and some open source components. At this stage the build of the ESX server is all manual but it no longer requires a CDROM device or drive in teyh ESX server. In a later post I’ll cover the automation I use to build or rebuild ESXi hosts and make them ready to join a cluster.

2 Responses to ESXi Network Based Build infrastructure

I just performed an install for a customer using a VM Workstation build in this way and post config powershell script. Such an easy way to do it. Took about 15 mins per host, 10 of which was boot/reboot