6.7

Table Of Contents
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
Assign a host already provisioned with vSphere Auto Deploy to the new folder or cluster location by
performing test and repair compliance operation. See Test and Repair Rule Compliance.
n
Power on unprovisioned hosts to add them to the specified vCenter Server location.
Configure a Stateless System by Running a Custom Script
You can use vSphere Auto Deploy to configure one or more hosts by associating custom scripts with a
vSphere Auto Deploy rule.
The scripts run in alphabetical order after the initial ESXi boot workflow of the host.
Prerequisites
n
Verify that the script bundle you want to associate with a vSphere Auto Deploy rule is in .tgz format,
with a maximum size of 10 MB, and written in Python or BusyBox ash scripting language.
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 Run the Add-ScriptBundle cmdlet to add the script bundle that contains the necessary scripts to the
vSphere Auto Deploy inventory.
Add-ScriptBundle c:/temp/MyScriptBundle.tgz
The name of the script bundle without the .tgz extension is the name identifier or object of the script
bundle item. You can update an existing script bundle by using the -Update parameter with the Add-
ScriptBundle cmdlet.
3 (Optional) Run the Get-ScriptBundle cmdlet to verify that the script bundle is added to the vSphere
Auto Deploy inventory.
VMware ESXi Installation and Setup
VMware, Inc. 121