Tuesday, July 6, 2010

Building an installable ESXi USB drive

On a recent project, I had to install ESXi onto an HP DL380 G6.  This chassis is decidedly non-optical drive friendly, as previous chassis would allow you to just snap a DVD drive into it.  The G6 now requires you to disassemble a fair portion of it to install a drive.  I had 140 servers to do, so installing DVD drives wasn’t an option (plus it saved me $14,000 in my budget).  So, after fiddling around a bit, this is what I came up with. 

All you need for an ESXi install is:

A thumb drive of at least 512 megabytes
A copy of UNetbootin
The ISO for ESXi

Download UNetbootin for Windows.  I had used v3.77 originally, and it looks like it is up to v4.71 now.

setup
Run UNetbootin.  Check off Distribution, and select FreeBSD from the dropdown.  For version, select 7.0.  Under Type, select USB Drive, and the current Drive letter of your USB drive.  Click OK.

downloading
UNetbootin will them go out to Sourceforge.net and grab the needed files from the FreeBSD ISO.

exit
UNetbootin will then go about its business extracting the files and installing the Bootloader.  Click Exit.

copy-iso
Now, copy the files from the ISO image onto the USB drive.  I like to use WinRAR.

rename-cfg
Now, rename the original syslinux.cfg to something else, like syslinux.cfg.esxi, and make a copy of the ISOLINUX.CFG file as syslinux.cfg in its place.

Plug in the drive, make sure the server is set to boot from USB, and away you go!