6.7

Table Of Contents
5 Add the rule to the rule set.
Add-DeployRule testrule2
By default, the working rule set becomes the active rule set, and any changes to the rule set become
active when you add a rule. If you use the NoActivate parameter, the working rule set does not
become the active rule set.
What to do next
n
Assign a host already provisioned with vSphere Auto Deploy to the new host profile by performing
compliance test and repair operations on those hosts. For more information, see Test and Repair
Rule Compliance.
n
Power on unprovisioned hosts to provision them with the host profile.
Write a Rule and Assign a Host to a Folder or Cluster
vSphere Auto Deploy can assign a host to a folder or cluster. When the host boots, vSphere Auto Deploy
adds it to the specified location on the vCenter Server. Hosts assigned to a cluster inherit the cluster's
host profile.
Prerequisites
n
Prepare Your System for vSphere Auto Deploy
n
Verify that the folder you select is in a data center or in a cluster. You cannot assign the host to a
standalone top-level folder.
Procedure
1 In a PowerCLI session, run the Connect-VIServer cmdlet to connect to the vCenter Server system
that vSphere Auto Deploy is registered with.
Connect-VIServer ipv4_or_ipv6_address
The cmdlet might return a server certificate warning. In a production environment, make sure no
server certificate warnings result. In a development environment, you can ignore the warning.
2 Define a rule in which hosts with certain attributes, for example a range of IP addresses, are assigned
to a folder or a cluster.
New-DeployRule -Name testrule3 -Item "my folder" -Pattern "vendor=Acme,Zven", "ipv4=192.XXX.
1.10-192.XXX.1.20"
This example passes in the folder by name. You can instead pass in a folder, cluster, or data center
object that you retrieve with the Get-Folder, Get-Cluster, or Get-Datacenter cmdlet.
VMware ESXi Installation and Setup
VMware, Inc. 120