Tuesday, March 3, 2009

HOWTO Network install VMware ESXi from a PXE server

This is a cycling blog, but several people have asked how to rip an ESXi ISO so you can install it from a PXE server so I figure this is as good a place as any to dump the information.

ESXi Installable is VMware's "thin hypervisor." There's no Linux, no Red Hat Anaconda scripting, and not much in the way of configuration or install options. You can modify the files in the ISO (I enable ssh, for example), but I won't go into that in this document.

This document assumes familiarity with Linux and that a PXE boot server is already set up on a Linux machine.


1. Create a workspace for yourself where you'll copy the ISO file and rip the contents. For example:
cd ~
mkdir esxi-sandbox


2. Grab the ESXi install ISO image from VMware and copy it to your workspace.

3. 3. Mount the ISO image, for example, if the name of the file is _esxi_installable.iso_:
mkdir /mnt/esxiso
mount -o loop ~/esxi-sandbox/esxi-installable.iso /mnt/esxiso


4. On your PXE server, make a space for your ESXi install files, for example (and this will vary depending on your specific environment):
mkdir /data/share/pxeboot/vmware/esxi/


5. Go to the mounted ISO directory and copy the files to your PXE directory. Using the example directory and mount point used before:
cp /mnt/esxiso/* /data/share/pxeboot/vmware/esxi/
All you really need are *.c32, vmkernel.gz, and *.tgz, but the other files are small if you're lazy/sloppy and don't want to delete them.

6. Modify your PXE configuration file so your PXE process can find the ESXi install files. In my installation, I have a file called vmware.conf to which I add a new label like so:
label esx3i
kernel vmware/esxi/mboot.c32
append vmware/esxi/vmkernel.gz --- vmware/esxi/binmod.tgz --- vmware/esxi/ienviron.tgz --- vmware/esxi/cim.tgz --- vmware/esxi/oem.tgz --- vmware/esxi/license.tgz --- vmware/esxi/install.tgz


Note that your "append" directive must include all of the *.tgz files that are in your ISO distribution. Apparently, these can sometimes change between different releases of ESXi so be careful.

7. Boot from your PXE server to test and it should all work out! Celebrate if you succeed, debug and retry if you don't. Good luck!

4 comments:

  1. Dude, I tried that and my chain snapped.

    ReplyDelete
  2. Will this help me get on the internets?

    ReplyDelete
  3. Great doc. We do the same thing I believe and it works like a charm. Can you post the link for the doc that you actually edit the files that allow you to enable ssh though. We have some tweaks that we would like to make available on newly installed systems without having to manually perform them on each system, but I don't know what I need to edit or how it needs to be packaged. They just look like ordinary gzipped tarballs, but how are the new tweaks in the package applied to the installed os?

    ReplyDelete
  4. Thanks a bunch for posting this. Exactly what I needed.

    ReplyDelete