Once again, Razor comes to the rescue for all of you who’d like to automate the installations of VMware ESXi 5.1 that was just publically released. If you already have a Razor environment up and running you can dive right into the howto below, otherwise please use the howto I posted earlier to get started with Razor and Puppet.

(Disclaimer: I am using Razor version 0.1.6.0 which was the latest version on the PuppetForge while writing this howto.)

Now, let’s get to it!

First, download the VMware ESXi 5.1 ISO from here. Next, upload the file to your Razor server, preferrably with FileZilla or some other tool.

That worked like a charm. Now create a policy with some rules as well, I am using a VM with 2 CPUs and 3GB of RAM to create my new ESXi hosts. I also set a rule that no more than 10 ESX hosts should be deployed with this policy.

Now start your VM/physical host that has the right set of hardware to match the policy, and watch the ESXi automatically install itself using the settings you’ve set. Go grab a coffee, it should be done within 10 minutes.

Voila! Now that it’s installed, you can browse to the IP Address that’s been set and download the vSphere Client to configure the host properly.

Did it work correctly before you say? First of all, make sure the TFTP service is started. Apparently the TFTP module that the Razor module relies on had some issues with being disabled as a standard. So verify that TFTP is actually running on your Razor server as it’s been a large reason why people have been unable to provision.