Install VMware ESXi 5.1 automatically using Razor

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 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.

Next, add the ISO as an image in Razor:

root@puppet:~# razor image add esxi ./VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso
Attempting to add, please wait...
New image added successfully
Added Image:
 UUID => 29XxYGoid8kr6KVmyFp00O
 Type => VMware Hypervisor Install
 ISO Filename => VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso
 Path => /opt/razor/image/esxi/29XxYGoid8kr6KVmyFp00O
 Status => Valid
 Version => VMware ESXi 5.1 GA

Now look at that, Razor already knows that this is the GA version of ESXi 5.1, how cool is that? 🙂

Let’s go ahead and create a new model with this image as well:

root@puppet:~# razor model add template=vmware_esxi_5 label=install_esxi5.1 image_uuid=29XxYGoid8kr6KVmyFp00O
--- Building Model (vmware_esxi_5):

 Please enter ESX License Key (example: AAAAA-BBBBB-CCCCC-DDDDD-EEEEE)
(QUIT to cancel)
Please enter root password (> 8 characters) (example: P@ssword!)
default: test1234
(QUIT to cancel)
 > test1234
Please enter IP Network for hosts (example: 192.168.10)
(QUIT to cancel)
 > 192.168.72
Please enter IP Subnet (example:
(QUIT to cancel)
Please enter Starting IP address (1-254) (example: 1)
(QUIT to cancel)
 > 201
Please enter Ending IP address (2-255) (example: 50)
(QUIT to cancel)
 > 210
Please enter Gateway for node (example:
(QUIT to cancel)
Please enter Prefix for naming node (example: esxi-node)
(QUIT to cancel)
 > esxi-node
Please enter Nameserver for node (example:
(QUIT to cancel)
Please enter NTP server for node (example: ntp.razor.example.local)
(QUIT to cancel)
Please enter Optional for broker use: the vCenter to attach ESXi node to (example: vcenter01)
(SKIP to skip, QUIT to cancel)
Please enter Optional for broker use: the vCenter Datacenter path to place ESXi host in (example: Datacenter01)
(SKIP to skip, QUIT to cancel)
Please enter Optional for broker use: the vCenter Cluster to place ESXi node in (example: Cluster01)
(SKIP to skip, QUIT to cancel)
Model created
 Label => install_esxi5.1
 Template => vmware_hypervisor
 Description => VMware ESXi 5 Deployment
 UUID => d29A59f849662DlZ5g4tk
 Image UUID => 29XxYGoid8kr6KVmyFp00O

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.

root@puppet:~# razor policy add -p vmware_hypervisor -l VMware_ESXi_5.1 -m d29A59f849662DlZ5g4tk -t cpus_2,memsize_3GiB -e -x 10
Policy created
 UUID => 4fvRHmRkLc94Huuh45i60e
 Line Number => 4
 Label => VMware_ESXi_5.1
 Enabled => true
 Template => vmware_hypervisor
 Description => Policy for deploying a VMware hypervisor.
 Tags => [cpus_2, memsize_3GiB]
 Model Label => install_esxi5.1
 Broker Target => none
 Currently Bound => 0
 Maximum Bound => 10
 Bound Counter => 0

Let’s look at the policies we have:

root@puppet:~# razor policy
# Enabled Label Tags Model Label #/Max Counter UUID
4 true VMware_ESXi_5.1 [cpus_2,memsize_3GiB] install_esxi5.1 0/10 0 4fvRHmRkLc94Huuh45i60e

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.

VMware ESXi 5.1 up and running

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.

Enjoy, and have fun playing with the newest release of VMware ESXi!

About Jonas Rosland

Open Source Community Manager at VMware
This entry was posted in Automation, How to, Installation, News, Razor, VMware, vSphere5 and tagged . Bookmark the permalink.

4 Responses to Install VMware ESXi 5.1 automatically using Razor

  1. mouradb says:

    On the test Shortly 🙂

  2. Ike says:

    Hi, thanks again for another brilliant guide.
    Trying now to deploy ESXi VM in home lab, but getting PXE-E32: TFTP open timeout. Funny, it worked ok the other day. What’s missing?

    • Jonas Rosland says:

      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.

      And thanks for the feedback, much appreciated!

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 )

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