Auto Deploying ESXi

1. Create a software depot

Download ESXi image from VMware website. This is zip file and available only for those who have purchased software. ISO file wouldn’t help you in creating software depot. Download zip file and extract it to suitable folder of your choice.


I have extracted the file to C:\vSphere5.0\ImageBuilder\201111001 as shown below


Now create software depot using power cli CMDLET’s











Rules can be created in various ways. Below you can find various examples of the rules and their explanations.


New-DeployRule –Name “AssignImageRule” –Item “ESXi-5.0.0-381646- standard” –Pattern “ipv4=”

Above CMDLET creates deployrule  “AssignImageRule”, assigns a profile “ESXi-5.0.0-381646-standard” to all ESXi host which boots in subnet


Add-DeployRule AssignImageRule

Above CMDLET moves the rule ”AssignImageRule” into active rule set


New-DeployRule –Name “AssignClusterRule” –Item “DC1-CLUS1” –Pattern “ipv4=”

Above cmdlet creates a new rule “AssignClusterRule”, which moves the host in the subnet – into DC1-CLUS1 cluster. Activate this rule by using

Add-DeployRule “AssignClusterRule”


New-DeployRule –Name “AssignHostProfileRule” –Item “ADS-Host- Profile-1” –Pattern “ipv4=”

Above cmdlet creates a new rule ”AssignHostProfileRule”, which assigns host profile “ADS-Host-Profile-1” to all hosts which boots from subnet. Activate this rule by using

Add-DeployRule “AssignHostProfileRule”

As seen above we have created three rules, these rules have been activated.To check which rules are active use

Get-DeployRuleSet command

When the host is PXE’ed, first rule “AssignImageRule” will assign image to all host in 10.91.243.x subnet, then second rule “AssignClusterRule” will add these hosts to DC1-CLUS1 cluster and finally third rule “AssignHostProfileRule” will apply the host profile “ADS-Host- Profile”-to all these hosts.­­

Create DHCP reservation for ESXi hosts

Open DHCP Console, right click the “Reservations” and select “New Reservations”


Enter “Reservation Name”

Enter “IP Address”. This IP is offered by DHCP server every time based on “Mac Address” which is to be entered next.

Enter “Description” and press “Add”


Create DNS Record

Now create a DNS record. Please note when ESXi host is added to vCenter (using Auto Deploy mechanism), it does a reverse lookup check. If reverse lookup is not resolved, it adds the host using IP address.

1. Open DNS Console

2. Browse to your dns name/domain name. e.g. (in my case)

3. Right click on white space and select new Host (A) ….




Power On ESXi host







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