Getting started with vSphere Auto Deploy requires that you learn how vSphere Auto Deploy works, install the vSphere Auto Deploy server, install PowerCLI, write PowerCLI rules that provision hosts, and power on your hosts to be booted with the image profile you specify. You can customize of the image profile, host profile, and vCenter Server location.
See Set Up vSphere Auto Deploy and Provision Hosts with vSphere PowerCLI for a step-by-step exercise that helps you set up your first vSphere Auto Deploy environment.
To provision the hosts in your environment with vSphere Auto Deploy successfully, you can follow these steps.
- Deploy vCenter Server.
The vSphere Auto Deploy server is included.
- Configure the vSphere Auto Deploy service startup type.
- Install PowerCLI, which includes vSphere Auto Deploy and vSphere ESXi Image Builder cmdlets.
See Install vSphere ESXi Image Builder and Prerequisite Software, Using vSphere Auto Deploy Cmdlets, and Using VMware.Image Builder Cmdlets.
- Find the image profile that includes the VIBs that you want to deploy to your hosts.
- Usually, you add the depots containing the required software to your PowerCLI session, and then select an image profile from one of those depots.
- To create a custom image profile, use vSphere ESXi Image Builder cmdlets to clone an existing image profile and add the custom VIBs to the clone. Add the custom image profile to the PowerCLI session.
You must use vSphere ESXi Image Builder for customization only if you have to add or remove VIBs. In most cases, you can add the depot where VMware hosts the image profiles to your PowerCLI session as a URL.
- Start a PowerCLI session and connect to the vCenter Server system that vSphere Auto Deploy is registered with.
- Use the New-DeployRule PowerCLI cmdlet to write a rule that assigns the image profile to one host, to multiple hosts specified by a pattern, or to all hosts.
New-DeployRule -Name "testrule" -Item image-profile -AllHosts
See Assign an Image Profile to Hosts.
Note: vSphere Auto Deploy is optimized for provisioning hosts that have a fixed MAC address to IP address mapping in DHCP (sometimes called DHCP reservations). If you want to use static IP addresses, you must set up the host profile to prompt for host customization. For more information, see the vSphere Host Profiles documentation. - Power on the hosts that you want to provision.
- Set up the host you provisioned as a reference host for your host profile.
You can specify the reference host syslog settings, firewall settings, storage, networking, and so on.
- Set up the host you provisioned as a reference host for your host profile.
You can specify the reference host syslog settings, firewall settings, storage, networking, and so on. See Setting Up a vSphere Auto Deploy Reference Host.
- Create and export a host profile for the reference host.
See the Host Profiles documentation.
- To provision multiple hosts with the host profile, use the Copy-DeployRule cmdlet to edit the previously created rule.
You can revise the rule to assign not only an image profile but also a host profile, a vCenter Server location, and a custom script bundle.
Copy-DeployRule -DeployRule "testrule" -ReplaceItem my_host_profile_from_reference_host,my_target_cluster -ReplacePattern "ipv4=192.XXX.1.10-192.XXX.1.20"
Where my_host_profile_from_reference_host is the name of the reference host profile, and my_target_cluster is the name of the target cluster.
- Perform the test and repair compliance operations to remediate the hosts.
- Verify that the hosts you provisioned meet the following requirements.
- Each host is connected to the vCenter Server system.
- The hosts are not in maintenance mode.
- The hosts have no compliance failures.
- Each host with a host profile that requires user input has up-to-date host customization information.
Remediate host associations and compliance problems and reboot hosts until all hosts meet the requirements.
Read for an introduction to the boot process, differences between first and subsequent boots, and an overview of using host customization.