Transform Your vMA Appliance Into a PXE Server For Your ESXi

This is the translation of a great article posted in French on All credits go to NiTRo.

The vSphere Management Assistant (aka vMA/VIMA) is required when you need to manage a bunch of ESXi. regularly we use the command which allows you, as you may know/guess, to backup and also to restore configuration settings of your ESXi hosts.

Whilst we were very interested into a PXE stateless deployment solution for ESXi, it became obvious that we would need to share or extract ConfigBundle files from the vMA appliance (or from a Power CLI installed under Windows) so the TFTP could send them to the ESXi host whilst booting up. But there is a much more simple solution: install the DHCP and TFTP services on the vMA appliance.

VMwares vMA appliance is actually a RHEL 5 x64, so we searched our genuine installation CDs of that we had at hand and extracted dhcp-3.0.5-18.el5.x86_64.rpm et tftp-server-0.42-3.1.x86_64.rpm which will do for our little experience 🙂

To make some of the steps more simple, we have beforehand unlocked the root account (in the /etc/passwd file). We then need to install the packages and configure them accordingly, then authorize TFTP through the firewall. We have also increased the size of the partitions to be more comfortable:

  • rpm -i ./dhcp-3.0.5-18.el5.x86_64.rpm
  • rpm -i ./tftp-server-0.42-3.1.x86_64.rpm
  • /sbin/chkconfig –level 345 xinetd on
  • /sbin/chkconfig –level 345 tftp on
  • /sbin/chkconfig –level 345 dhcpd on
  • Add -A RH-Firewall-1-INPUT -p udp -m udp –dport 69 -j ACCEPT in /etc/sysconfig/iptables
  • increase vMA’s partitions

You change the dhcp.conf and MAC/IP reservations following your needs:

Then you configure the TFTP part as shown by Jim McCann and by William Lam.  We chose to sort out by the version of the ESXi (installable & embedded) and assigned a dedicated folder to the configBundle files and others such the vpxa agent (vcenter) and aam (HA cluster):

The pxelinux.cfg folder is dedicated to the  MAC/ESXi reservations:

Here is a short exhibit of one of our pxelinux configuration files:

default menu.c32
menu title PXE Boot VMware ESXi ESX4i-8
timeout 30

label ESXi 4.0.0 b208167
menu label Boot VMware ESXi 4.0.0 b208167
kernel ./mboot.c32
append /eESX4.0b208167/vmkboot.gz — /eESX4.0b208167/vmk.gz — /eESX4.0b208167/sys.vgz — /eESX4.0b208167/cim.vgz — /eESX4.0b208167/oem.tgz — /eESX4.0b208167/license.tgz — /agents/vpxa-208111.vgz — /agents/aam-208111.vgz — /configBundle/configBundle-ESX4i-8.tgz
ipappend 2

label ESXi 4.0.0 b193498
menu label Boot VMware ESXi 4.0.0 b193498
kernel ./mboot.c32
append /eESX4.0b193498/vmkboot.gz — /eESX4.0b193498/vmk.gz — /eESX4.0b193498/sys.vgz — /eESX4.0b193498/cim.vgz — /eESX4.0b193498/oem.tgz — /eESX4.0b193498/license.tgz — /agents/vpxa-208111.vgz — /agents/aam-208111.vgz — /configBundle/configBundle-ESX4i-8.tgz
ipappend 2

The configBundle files are trapped into a script executed by the crontab (the esxi.csv file can contain a list of names or IPs):

awk -F’;’ ‘{ print $1 }’ ./esxi.csv | while read name
esxcfg-cfgbackup –server $name –username root –password ” -s /tftpboot/configBundle/configBundle-$name.tgz

The vpxa and aam agents are extracted from the /bootbank directory of a vanilla ESXi. Those agents evolve with the different releases of vCenter, thus you need to keep them up to date otherwise vCenter will upgrade them each time an ESXi reboots:

When all components are working, it’s like magic:


About PiroNet

Didier Pironet is an independent blogger and freelancer with +15 years of IT industry experience. Didier is also a former VMware inc. employee where he specialised in Datacenter and Cloud Infrastructure products as well as Infrastructure, Operations and IT Business Management products. Didier is passionate about technologies and he is found to be a creative and a visionary thinker, expressing with passion and excitement, hopefully inspiring and enrolling people to innovation and change.
This entry was posted in Uncategorized. Bookmark the permalink.

5 Responses to Transform Your vMA Appliance Into a PXE Server For Your ESXi

  1. hypervizor says:

    Nice Translate 🙂

  2. Pingback: Why Should I Install ESXi instead of ESX? « DeinosCloud

  3. Eric van der Meer says:

    Thanks, great article… will try this @home 🙂

  4. Pingback: VMware vSphere Fast Track Day#5 – Lessons Learned « DeinosCloud

  5. Pingback: » VCAP-DCA Study notes–9.2 Plan and execute scripted ESX builds

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s