The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Definitive Guide to Installing ESXi using iPXE...
2012-01-14, 07:49 (This post was last modified: 2012-01-16 04:11 by MultimediaMan.)
Post: #1
The Definitive Guide to Installing ESXi using iPXE...
There are currently five Seven methods to install ESXi;

1) Boot from Physical Media of some kind... (Slow, boring, mundane, provincial, tragically manual...)
_ a) There are several methods of doing this via CD, DVD and USB Sticks, with and without Kickstart files. All of them, no matter how sophisticated, are like pulling oars on a slave ship; slow, painful and ultimately a waste of time and energy.

2) Boot from Mounted Image (using a RAC Card - DRAC, iDRAC, iLO iLO2, iLO3) SLOW...did I mention SLOW? 3rd. Party Automation tools are horribly cobbled-together and inefficient.

3) PXE Boot using pxelinux.0 (Slow, fraught with corruption opportunities)

4) PXE Boot using ipxelinux.0 (Faster, lacking Scripting Support)

5) iPXE Boot using Memdisk (Excellent Scripting support, CD is Emulated, no Media Depot Required - RAM requirements can be a problem).

6) iPXE Boot from HTTP-Mounted ISO (Sexy, Faster and will get you dates with beautiful women...Oh, and VMware might take a slightly dim view of this). Requires editing the ISO file; Bespoke workaround.

7) iPXE Boot from HTTP-Mounted ISO (Sexy, Faster and will get you dates with beautiful women, all of whom want to bear your children...Oh, and VMware may support you if someting goes awry). Requires editing the ISO file; Supported workaround.

Method 1) RTFM.
Method 2) Ditto.
Method 3) RTFM... specifically this document on Page 26. The most important parts are Creating a Media Depot, but invoking the Media Depot [sarcasm] was thoughtfully somewhat glossed over...[/sarcasm]

This is the most important part...

Code:
install http://example.com/VMware/ESXi

Note: All Most of the network-based installations of ESXi Require a Media Depot and a Kickstart file with the Media Depot Referenced in it. Otherwise you will get the No Media Error message.

Followed by page 34

Code:
default 1
prompt 1
menu title VMware VMvisor Boot Menu
timeout 50
label 1
kernel esxi/mboot.c32
append esxi/vmkboot.gz ks=http://xx.xx.xxx.xxx/kickstart/ks.cfg --- esxi/vmkernel.gz ---
esxi/sys.vgz --- esxi/cim.vgz --- esxi/ienviron.vgz --- esxi/install.vgz
label 0
localboot 0x80

The Kickstart file needs the statement "install http://example.com/VMware/ESXi" placed in it... There are many, many great sites out there that can show the user how to write kickstart files that discover, configure and tweak ESXi out there. This post will not go into that level of detail...

Example:

Code:
vmaccepteula
autopart –firstdisk=local –overwritevmfs
install http://example.com/VMware/ESXi
network –bootproto=dhcp –device=vmnic0 –addvmportgroup=1
rootpw –iscrypted <encrypted_root_password>

# Reboot after the installation
reboot


Method 4) RFTM... substituting iPXE for the obsolete gPXE; paying close attention to the requirements of Method 3.

Method 5) Robinsmidsrod's Way, using Memdisk: No Media Depot or Kickstart file required.

Code:
echo
echo Booting VMware 64-bit installer for ${hostname} from SAN
set root-path iscsi:nas.smidsrod.lan::::iqn.2011-02.lan.smidsrod:${hostname}.boot.vmware
sanhook ${root-path} || goto failed
initrd http://server.smidsrod.lan/tftp/vmware/esxi-5.0-x64.iso
chain http://server.smidsrod.lan/tftp/memdisk iso || goto failed

:failed
echo Boot from ${root-path} failed, dropping to shell
shell

Method 6) Create a Media Depot, and Modify the ISO; Mount the ISO and edit the following file in the root of the ISO: isolinux.cfg
Add "install=http://epimetheus.olympus.bv.ar.us.local/vmware/4.1/x86_64/os/ESXi_4_1_U2" after vmkboot.gz but before vmkernel.gz

Example:
Code:
default menu.c32
menu title VMware VMvisor Boot Menu
timeout 80

label ESXi Installer
menu label ^ESXi Installer
kernel mboot.c32
append vmkboot.gz install=http://epimetheus.olympus.bv.ar.us.local/vmware/4.1/x86_64/os/ESXi_4_1_U2 --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz

label ^Boot from local disk
menu label ^Boot from local disk
localboot 0x80

Copy the ISO to your webserver: I renamed mine "ESXi_4_1_U2_MAN.iso".

Code:
#!ipxe
#564dcda8-1f0f-2292-f735-847aecb320d7.ipxe
goto startme
:retry
sleep 5
:startme
set keep-san 1
set initiator-iqn iqn.2011-04.local.us.ar.bv.olympus:v-ipxe-a.olympus.bv.ar.us.local
sanboot --drive 0x80 iscsi:atlas.olympus.bv.ar.us.local::::iqn.1991-05.com.microsoft:atlas-v-ipxe-a-target ||
sanboot --drive 0x81 --no-describe http://epimetheus.olympus.bv.ar.us.local/vmware/4.1/x86_64/iso/ESXi_4_1_U2_MAN.iso || goto retry

This way of doing it will allow a manual installation of the ESXi without a kickstart file.


Method 7) Create a Media Depot and a Kickstart file with the Media Depot referenced in it.

Mount the ISO and edit the following file in the root of the ISO: isolinux.cfg
Add "ks=http://xx.xx.xxx.xxx/kickstart/ks.cfg" after vmkboot.gz but before vmkernel.gz

Example:
Code:
default menu.c32
menu title VMware VMvisor Boot Menu
timeout 80

label ESXi Installer
menu label ^ESXi Installer
kernel mboot.c32
append vmkboot.gz ks=http://xx.xx.xxx.xxx/kickstart/ks.cfg --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz

label ^Boot from local disk
menu label ^Boot from local disk
localboot 0x80

Copy the ISO to your webserver: I renamed mine "ESXi_4_1_U2_MOD.iso".

Now you can setup the boot in iPXE (undionly.kpxe or other);

Code:
#!ipxe
#564dcda8-1f0f-2292-f735-847aecb320d7.ipxe
goto startme
:retry
sleep 5
:startme
set keep-san 1
set initiator-iqn iqn.2011-04.local.us.ar.bv.olympus:v-ipxe-a.olympus.bv.ar.us.local
sanboot --drive 0x80 iscsi:atlas.olympus.bv.ar.us.local::::iqn.1991-05.com.microsoft:atlas-v-ipxe-a-target ||
sanboot --drive 0x81 --no-describe http://epimetheus.olympus.bv.ar.us.local/vmware/4.1/x86_64/iso/ESXi_4_1_U2_MOD.iso || goto retry

Viola! Working iPXE ESXi Installs.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The Definitive Guide to Installing ESXi using iPXE... - MultimediaMan - 2012-01-14 07:49



User(s) browsing this thread: 1 Guest(s)