Installation guide
Test and Repair Rule Compliance
When you add a rule to the Auto Deploy rule set or make changes to one or more rules, unprovisioned hosts
that you boot are automatically provisioned according to the new rules. For all other hosts, Auto Deploy applies
the new rules only when you test their rule compliance and perform remediation.
This task assumes that your infrastructure includes one or more ESXi hosts provisioned with Auto Deploy,
and that the host on which you installed VMware PowerCLI can access those ESXi hosts.
Prerequisites
n
Install VMware PowerCLI and all prerequisite software.
n
If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See the
information about using Auto Deploy Cmdlets in the vSphere Installation and Setup documentation.
Procedure
1 Check which Auto Deploy rules are currently available.
Get-DeployRule
The system returns the rules and the associated items and patterns.
2 Make a change to one of the available rules, for example, you might change the image profile and the name
of the rule.
Copy-DeployRule -DeployRule testrule -ReplaceItem MyNewProfile
You cannot edit a rule already added to a rule set. Instead, you copy the rule and replace the item you
want to change.
3 Verify that the host that you want to test rule set compliance for is accessible.
Get-VMHost -Name MyEsxi42
4 Test the rule set compliance for that host and bind the return value to a variable for later use.
$tr = Test-DeployRuleSetCompliance MyEsxi42
5 Examine the differences between what is in the rule set and what the host is currently using.
$tr.itemlist
The system returns a table of current and expected items.
CurrentItem ExpectedItem
----------- ------------
My Profile 25 MyProfileUpdate
6 Remediate the host to use the revised rule set the next time you boot the host.
Repair-DeployRuleSetCompliance $tr
What to do next
If the rule you changed specified the inventory location, the change takes effect immediately. For all other
changes, boot your host to have Auto Deploy apply the new rule and to achieve compliance between the rule
set and the host.
Upgrading Hosts by Using esxcli Commands
Using the vSphere CLI, you can upgrade and patch ESXi 5.0 hosts.
You cannot use esxcli commands to upgrade version 4.x ESX or ESXi hosts to ESXi 5.0. To upgrade version
4.x ESX or ESXi hosts to ESXi 5.0, use vSphere Update Manager, or perform an interactive or scripted upgrade.
vSphere Upgrade
126 VMware, Inc.