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.
My reference for making a Windows Server a PXE host was http://unattended.sourceforge.net/pxe-win2k.html however I used GUI tools a bit more than they did.
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.

DHCP_Options

  • Get TFTPd.exe and install it as a windows serviceTFTPd_Install
    • Configure the service to start automatically and start itTFTPd_Service
    • Put the registry setting in place to hard set the TFTP folderTFTPd_Registry
    • Place six files from the ESXi installable install CD in the TFTP folder for the version of ESXiTFTPd_Folder
    • 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. TFTPd_Root_Folder
    • Copy isolinux.cfg from the ESXi install CD in the TFTP folder, and rename to default PXELinux_cfg
    • 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 appenddefault_File
    • Install IIS and copy the ESXi installable install CD contents in a subdirectoryIIS_Folder

    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.

    Boot_Menu

    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.

  • © 2011, Alastair. All rights reserved.

    About Alastair

    I am a professional geek, working in IT Infrastructure. Mostly I help to communicate and educate around the use of current technology and the direction of future technologies.
    This entry was posted in General. Bookmark the permalink.

    2 Responses to ESXi Network Based Build infrastructure

    1. Greg says:

      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

    2. Barrie says:

      There’s a few things to worry about with PXE boot though. Security of whats booting off it, accidental installations, wiping data, struggling with segregating it in a highly converged environment.

      Have you seen PXE install in the real world?

      ESXi install via USB memory stick works well with custom kickstart config, just leave the USB drive plugged into the blade chassis for use anytime

    Comments are closed.