May 25 update: I guess I should have read the install docs before reading a document about deploying vSphere ESX 4 using PXE. There is a pretty comprehensive and readable discussion of PXE boot in the ESX and vCenter Server Installation Guide. You can ignore this entry.
PXE is defined at wikipedia http://en.wikipedia.org/wiki/Preboot_Execution_Environment. Basically you use a dhcp server to provide the DNS name or IP Address of a tiny ftp server (tftp) and the name of a bootstrap program to load, along with the usual information about IP addresses, subnets, default gateway, and DNS names.
The thing I had a lot of trouble with was what bootstrap program to use.
I'm just starting on this stateless booting process, so I haven't included any discussion of configuring the ESX server once it's booted. That's next. For now I just wanted to get the loader to work and ESXi to start.
So here's how I did it in using Windows environment
- I followed the good starting point vsp_4_pxe_boot_esxi.pdf available on the VMware website in the technical library. This describes how to use winrar and winimage to extract the juicy bits from the ESXi ISO image. I put these files from the first partition of the dd file into an empty working folder. The dd file is inside the bz2 file of the same name. The bz2 file is inside image.tgz at /usr/lib/vmware/installer, and image.tgz is inside the ESXi iso.
30/04/2009 07:07 PM 150 boot.cfg
30/04/2009 07:07 PM 12,724,149 cim.vgz
30/04/2009 07:07 PM 1,150,353 cimstg.tgz
30/04/2009 07:07 PM 138 license.tgz
30/04/2009 07:07 PM 138 mod.tgz
30/04/2009 07:07 PM 138 oem.tgz
30/04/2009 07:07 PM 1,228 pkgdb.tgz
30/04/2009 07:07 PM 46,173,366 sys.vgz
30/04/2009 07:07 PM 2,044,404 vmk.gz
30/04/2009 07:07 PM 16,805 vmkboot.gz - I spent most of my "learning" time (i.e., my "how the freekity freek does this stuff work" time) trying to get the stuff in the third partion to work, and trying to understand what I needed. This partition includes the file ldlinux.sys, and I expected it to be a loader. In the end, I downloaded syslinux-3.80.zip from http://www.kernel.org/pub/linux/utils/boot/syslinux/ and copied /core/pxelinux.0, /com32/menu/menu.c32 and /com32/mboot/mboot.c32 to my same folder. I configured the DHCP scope option for the boot file to use pxelinux.0
- I then followed the hints at http://www.itstuff.ca/2007/09/pxe-aka-pre-execution-environment-part.html to create an empty folder pxelinux.cfg and a single file called default in the pxelinux.cfg folder. In there, I put the suggested content from the vsp_4_pxe_boot_esxi.pdf:
default menu.c32
menu title PXE Boot VMware ESXi
timeout 100
label ESXi
menu label Boot VMware ESXi
kernel mboot.c32
append vmkboot.gz --- vmk.gz --- sys.vgz --- cim.vgz --- oem.tgz --- license.tgz ipappend 2
label Hard
menu label Boot from local drive
localboot 0 - I used tftpd32 (http://tftpd32.jounin.net/) as my dhcp and tftp server, using the itstuff.ca reference above to configure dhcp and tftp. I also tried Microsoft dhcp which worked fine, and Solarwind tftp which did not work for me. Finally, I pointed the tftpd32 at my working folder. Note that you need to be careful putting dhcp on a network. Make sure there are no other dhcp servers on the same network.
- Change the BIOS on the ESX server to boot from the network first. Once the disk is initialized, even without an OS the PXE boot won't work unless it's first in the list.
- Now when I start my ESX server, it does a dhcp reservation, is given the instructions to load pxelinux.0 from my tftp server, launches pcelinux.0 which in turn reads the files from the pxelinux.cfg folder and next thing you know, you have an out-of-the-box ESXi server running.
You can have multiple files in the pxelinux.cfg folder to provide the pxe loader configuration information based on the MAC address or the IP address of the ESX server. This article http://syslinux.zytor.com/wiki/index.php/PXELINUX provides some insight into how that all works.
My next step is configuring the ESXi server. The server has no persistent state since there's no OS installed on local disk, or may there is no local disk, so it must be configured "fresh" each time it's started; usually from the vCenter server.
Another mini project is to set up my ESXi to access my new Starwind iSCSI service. The free version has been greatly expanded to increase total allowed disk to 2TB, and allow multiple concurrent connections to the disk - perfect for Windows 2008 clusters, and hopefully VMware shared storage. See http://www.starwindsoftware.com/
Enthusiast (215 points)