VMware VS4-ENT-PL-A Setup Guide - Page 176
Test and Repair Rule Compliance
![]() |
View all VMware VS4-ENT-PL-A manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 176 highlights
vSphere Installation and Setup Procedure 1 Run the Connect-VIServer PowerCLI cmdlet to connect to the vCenter Server system that Auto Deploy is registered with. Connect-VIServer 192.XXX.X.XX 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 datacenter object that you retrieve with the Get-Folder, Get-Cluster, or Get-Datacenter cmdlet. 3 Add the rule to the rule set. Add-DeployRule testrule3 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 Upgrade existing hosts to be added to the specified vCenter Server location by performing test and repair compliance operations on those hosts. See "Test and Repair Rule Compliance," on page 176. n Turn on unprovisioned hosts to add them to the specified vCenter Server location. Test and Repair Rule Compliance 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. This task assumes 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. Prerequisites n Install vSphere PowerCLI and all prerequisite software. n If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See "Using Auto Deploy Cmdlets," on page 170. Procedure 1 Use PowerCLI to 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 or pattern you want to change. By default, PowerCLI uses the old name for the copy and hides the old rule. 176 VMware, Inc.
![](/manual_guide/products/vmware-vs4entpla-setup-guide-9cc0699/176.png)