Archive for March 2013

Provision/Reprovision ESXi Hosts using AutoDeploy

index

Provisioning and Reprovisioning

Provisioning a host that has never been provisioned with Auto Deploy (first boot) differs from subsequent boot processes. You must prepare the host, define the image using the Image Builder PowerCLI, and fulfill all other prerequisites before you can provision the host.

vSphere Auto Deploy supports multiple reprovisioning options. You can perform a simple reboot or reprovision with a different image or a different host profile.

Provisioning for the first time

Capture2

Subsequent boot of an AutoDeployed ESXi Host

depot

Reprovisoning

vSphere Auto Deploy supports multiple reprovisioning options. You can perform a simple reboot or reprovision with a different image or a different host profile.

The following reprovisioning operations are available.

  • Simple reboot.
  • Reboot of hosts for which the user answered questions during the boot operation.
  • Reprovision with a different image profile.
  • Reprovision with a different host profile.

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

  • Install VMware PowerCLI and all prerequisite software.
  • If you encounter problems running PowerCLI cmdlets, consider changing the execution policy.

Procedure changing the host profile used in the rule

  • Check which Auto Deploy rules are currently available. The system returns the rules and the associated items and patterns
  • Get-DeployRule
  • Make a change to one of the available rules, for example, you might change the image profile and the name of the rule. You cannot edit a rule already added to a rule set. Instead, you copy the rule and replace the item you want to change.
  • Copy-DeployRule -DeployRule testruleimageprofile -ReplaceItem DACVESX002_Host_Profile
  • Verify that the host that you want to test rule set compliance for is accessible.
    Get-VMHost -Name 10.1.1.100
  • Test the rule set compliance for that host and bind the return value to a variable for later use.
  • $tr = Test-DeployRuleSetCompliance 10.1.1.100
  • 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.
  • Remediate the host to use the revised rule set the next time you boot the host.
  • Repair-DeployRuleSetCompliance $tr

deployrulescompliance

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.

Please see Pages 81-85 of the vSphere Installation and Setup Guide