PXE booting ESXi 4.1 installer from Altiris(HP RDP)

I am looking to do PXE booting of the ESXi installer as the first step in rolling out my new automated deployment solution. We already have an Altiris (HP RDP) PXE server in house for Windows deployments so I needed to figure out a way to make it work. Below is the first phase of this using standard pxelinux and not gPXE.

  1. Download the ESXi 4.1 installable release from VMware
  2. Download the current 3.x branch of syslinux
  3. Create a folder esxi_41_pxe to contain our custom boot files.
  4. Copy core\pxelinux.0 from the syslinux release into esxi_41_pxe
  5. Copy the following files from the ESXi 4.1 release into esxi_41_pxe: cim.vgz, ienviron.vgz, install.vgz, mboot.c32, menu.c32, sys.vgz, vmkboot.gz, vmkernel.gz
  6. Create a directory pxelinux.cfg
  7. Create a text file esi_41_pxe\pxelinux.cfg\default with the following contents
default 1
prompt 1
menu title VMware VMvisor Boot Menu
timeout 50

label 1
kernel mboot.c32
append vmkboot.gz ks=<ks path> --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz

label 0
localboot 0x80
  1. In the Altirs PXE Configuration Utility Create a New Boot Menu Option with a meaningful name such as ESXi 4_1
  2. Select Linux x64 for the OS & Processor Option
  3. Under Image Creation Method select User Supplied
  4. Click the Manual Boot Image Option and browse to the location of the esxi_41_pxe folder created in step 3 and click Ok
  5. Make a note of the Final Location on PXE Server field at the bottom of the Window. It should be something like …\PXE\Images\MenuOption163
  6. Click Ok twice to exit the PXE Configuration Utility
  7. Navigate to the Altiris Express program directory. A default installation of Altiris will be in C:\Program Files\Altiris\eXpress\Deployment Server.
  8. Now go into the directory containing the PXE files for our custom boot image. The path was noted in step 5.
  9. Go into the X64 folder.
  10. Rename MenuOption<xx>.0 to MenuOption<xx>.0.orig
  11. Rename pxelinux.0 to MenuOption<xx>.0
  12. PXE boot a test system using the new menu option

At this point all of your system builds use the same kickstart file. That may be ok if you do all of your customization after the initial build, but it leaves me wanting more to match my current ESX build strategy.

There are at least two strategies that I can see for injecting some per server customization into this process.

  1. Instead of using the pxelinux.cfg/default file use a per server file based upon MAC address. Check out the PXELINUX docs for more information on this approach.
  2. Use %pre and %post scripts in the kickstart and have them query a central authority to determine what configuration scripts should be downloaded based upon some unique attribute available to the setup environment.

There is clearly more work for me to do 🙂

Miscellaneous
Problem: You receive “not a com32r image” on booting
Solution: Use pxelinux.0 from the 3.x release of syslinux not 4.x

Comments (13)

  1. Malcolm Farwell

    Your post was a real help to me. I needed to get the PXE build for ESXi 4.1 on Altiris in a hurry.
    I found that steps 16-18 were not needed. It appears as if Altiris will rename pxelinux.0 to MenuOptionxx.0 on it’s own.
    Otherwise, I am building ESXi from PXE using your directions.
    Thanks

  2. 5truja

    I would like to try but to what “curren 3x brach” are you reffering to. There is bunch of 3.x which of these did you get it to work and what ver of altiris do you have?

  3. 5truja

    “current 3x branch of syslinux” should be written here..

  4. Tim

    @5truja

    So thanks for the instructions, I got it to PXE boot but where do you specify the install files? I don’t need the ks.cfg necessarily, just how to locate the system image. When I go through this, I get an installer failure since it is asking for the system image.

  5. Eric (Post author)

    @5truja

    I used 3.63 as it was documented as the tested version in the VMware documentation. As they say others may work, but I know that I had issues with the 4.x branch.

    Reference ESXi Installable Installation Guide p. 26

  6. Eric (Post author)

    @Tim

    I am not sure of the exact error you are getting, but this method relies upon the ks.cfg file pointing to an installation source for the actual installation files. For my kickstart I am using:
    install url http://vmware-src/netinstall/src/esxi41

    You could also try booting the entire ISO image, but I have not done that myself. gpxelinux’s TCP oriented protocol support would probably come in handy here as tftp can be slow.

  7. sham

    Thanks for this very useful article. I managed to get our ESXi builds working with Altiris and now find myself in the exact same position as you with regards to needing per server customisations.

    Ive decided to use the approach of entering a small set of variables into the computer object in altiris (e.g. hostname, IP, vMotion IP) and running a powershell post script as a job on the Altiris server which makes use of these variables to configure the host. So far the results are promising! The only thing missing is the continuation from the build complete to running the post script powershell job. This has to be done manually as alritis is unaware of the build completing. Any ideas on how this could be one continuous operation??

  8. Michel

    I did a similar thing on my installation but it is not quite the same.

    I maintained the deployment partition and copied the installer files and the ISOlinux-file to the harddisk.

    I made the KS available through automation on a webserver on the DS (including token replacements). The only modification I made is adding the location and token (hostname.cfg as ks) to the KS.

    Final step would be installing the bootloader from the SYSLINUX package (in my case WinPE using syslinux.exe -fma C:) After this, the server reboots and starts the installer with a correct pointer to a KS-file.

  9. RDPuser

    Just discovered that HP releas HP Insight Control server deployment 6.2.0 on 1 October. According to the release notes, it now supports deploying ESXi 4.1. Not sure about customization, since i haven’t tested jet.

    http://h18013.www1.hp.com/products/servers/management/rdp/knowledgebase/20000062.html

  10. Chris

    Where would you put the ks.cfg file and what would you put in as the ks path in the pxelinux.cfg file?

  11. Eric (Post author)

    @Chris

    Here are the network related options from the VMware installation documentation:

    ks=:// Performs a scripted installation with a script located at the
    given URL. can be http, https, ftp, or nfs

    Based upon your choice you would need a server to host the protocol and that would dictate where to store the ks file.

  12. Pgt

    Thanks, using a 3.x gpxelinux [kernel.org/pub/linux/utils/boot/syslinux/3.xx/]solved the com32 issue.

  13. Michael

    Thanks a lot for sharing this! Very helpful.

Leave a Comment

Your email address will not be published.