When you add a rule to the Auto Deploy rule set or make changes to one or more rules, hosts are not updated automatically. Auto Deploy applies the new rules only when you test their rule compliance and perform remediation.
Before you begin
Install vSphere PowerCLI and all prerequisite software.
Verify that your infrastructure includes one or more ESXi hosts provisioned with Auto Deploy, and that the host on which you installed vSphere PowerCLI can access those ESXi hosts.
- Use vSphere PowerCLI to check which Auto Deploy rules are currently available.
The system returns the rules and the associated items and patterns.
- Make a change to one of the available rules.
For example, you can 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 or pattern you want to change.
- Verify that you can access the host for which you want to test rule set compliance.
Get-VMHost -Name MyEsxi42
- Run the cmdlet that tests rule set compliance for the host, and bind the return value to a variable for later use.
$tr = Test-DeployRuleSetCompliance MyEsxi42
- Examine the differences between the contents of the rule set and configuration of the host.
The system returns a table of current and expected items.
CurrentItem ExpectedItem ----------- ------------ My Profile 25 MyProfileUpdate
- Remediate the host to use the revised rule set the next time you boot the host.
What to do next
If the rule you changed specified the inventory location, the change takes effect when you repair compliance. 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.