Before you can start using vSphere Auto Deploy, you must prepare your environment in several steps.
You start with server setup and hardware preparation. You must configure the vSphere Auto Deploy service startup type in the vCenter Server system that you plan to use for managing the hosts you provision, and install PowerCLI.
vSphere Auto Deploy Preinstallation Checklist
Before you can start the tasks in this vSphere Auto Deploy scenario, make sure that your environment meets the hardware and software requirements, and that you have the necessary permissions for the components included in the setup.
Required Software and Hardware | Details |
---|---|
vCenter Server | The vSphere Auto Deploy server is part of vCenter Server. You must enable and start the vSphere Auto Deploy service on the vCenter Server system. You can perform many of the setup tasks by logging in to vCenter Server. See Prepare Your System for vSphere Auto Deploy. |
Storage | Storage for ESXi datastores NFS, iSCSI, or Fibre Channel, with servers and storage arrays that are configured so the servers can detect the LUNs.
|
Host information (for four ESXi hosts) | A list of target IP addresses for NFS or iSCSI. A list of target volume information for NFS or iSCSI.
vSphere Auto Deploy does not overwrite existing partitions by default. |
PowerCLI | See Install PowerCLI. |
ESXi software depot | The location of the ESXi software depot on the Downloads page of the VMware website. You use a URL to point to the image profile stored at that location, or you download a ZIP file to work with a local depot. Do not download the ESXi image. |
TFTP server | TFTP installer software such as WinAgents TFTP server. |
DHCP server | The DHCP server is included in the vSphere supported Windows Server versions. |
DNS server | A working DNS server. You must add entries in both Forward (A Record) and Reverse (PTR Record) Zones for each target host. |
You also need information about and administrator privileges to the core servers of the environment, including the ActiveDirectory server, DNS server, DHCP server, NTP server, and so on.
You must have complete control of the broadcast domain of the subnet in which you deploy the setup. Ensure that no other DHCP, DNS, or TFTP server are on this subnet.
Prepare Your System for vSphere Auto Deploy
Before you can PXE boot an ESXi host with vSphere Auto Deploy, you must install prerequisite software and set up the DHCP and TFTP servers that vSphere Auto Deploy interacts with.
Prerequisites
- Verify that the hosts that you plan to provision with vSphere Auto Deploy meet the hardware requirements for ESXi. See ESXi Hardware Requirements.
- Verify that the ESXi hosts have network connectivity to vCenter Server and that all port requirements are met. See vCenter Server Upgrade.
- Verify that you have a TFTP server and a DHCP server in your environment to send files and assign network addresses to the ESXi hosts that Auto Deploy provisions. See Install the TFTP Server and Prepare the DHCP Server for vSphere Auto Deploy Provisioning.
- Verify that the ESXi hosts have network connectivity to DHCP, TFTP, and vSphere Auto Deploy servers.
- If you want to use VLANs in your vSphere Auto Deploy environment, you must set up the end to end networking properly. When the host is PXE booting, the firmware driver must be set up to tag the frames with proper VLAN IDs. You must do this set up manually by making the correct changes in the UEFI/BIOS interface. You must also correctly configure the ESXi port groups with the correct VLAN IDs. Ask your network administrator how VLAN IDs are used in your environment.
- Verify that you have enough storage for the vSphere Auto Deploy repository. The vSphere Auto Deploy server uses the repository to store data it needs, including the rules and rule sets you create and the VIBs and image profiles that you specify in your rules.
Best practice is to allocate 2 GB to have enough room for four image profiles and some extra space. Each image profile requires approximately 400 MB. Determine how much space to reserve for the vSphere Auto Deploy repository by considering how many image profiles you expect to use.
- Obtain administrative privileges to the DHCP server that manages the network segment you want to boot from. You can use a DHCP server already in your environment, or install a DHCP server. For your vSphere Auto Deploy setup, replace the gpxelinux.0 filename with snponly64.efi.vmw-hardwired for UEFI or undionly.kpxe.vmw-hardwired for BIOS. For more information on DHCP configurations, see Sample DHCP Configurations.
- Secure your network as for any other PXE-based deployment method. vSphere Auto Deploy transfers data over SSL to prevent casual interference and snooping. However, the authenticity of the client or the vSphere Auto Deploy server is not checked during a PXE boot.
- If you want to manage vSphere Auto Deploy with PowerCLI cmdlets, verify that Microsoft .NET Framework 4.5 or 4.5.x and Windows PowerShell 3.0 or 4.0 are installed on a Windows machine. See the vSphere PowerCLI User's Guide.
- Set up a remote Syslog server. See the vCenter Server and Host Management documentation for Syslog server configuration information. Configure the first host you boot to use the remote Syslog server and apply that host's host profile to all other target hosts. Optionally, install and use VMware vCenter Log Insight, which provides log aggregation and analytics for VMware and non-VMware products, virtual and physical, with near real-time search and analytics of log events.
- Install ESXi Dump Collector, set up your first host so that all core dumps are directed to ESXi Dump Collector, and apply the host profile from that host to all other hosts. See Configure ESXi Dump Collector with ESXCLI.
- If the hosts that you plan to provision with vSphere Auto Deploy are with legacy BIOS, verify that the vSphere Auto Deploy server has an IPv4 address. PXE booting with legacy BIOS firmware is possible only over IPv4. PXE booting with UEFI firmware is possible with either IPv4 or IPv6.
Procedure
Results
When you start an ESXi host that is set up for vSphere Auto Deploy, the host contacts the DHCP server and is directed to the vSphere Auto Deploy server, which provisions the host with the image profile specified in the active rule set.
What to do next
- You can change the default configuration properties of the Auto Deploy Service. For more information, see "Configuring vCenter Server" in the vCenter Server and Host Management documentation.
- You can change the default configuration properties of the Image Builder Service. For more information, see "Configuring vCenter Server" in the vCenter Server and Host Management documentation.
- Define a rule that assigns an image profile and optional host profile, host location, or script bundle to the host. For Managing vSphere Auto Deploy with PowerCLI cmdlets, see the Managing vSphere Auto Deploy with PowerCLI Cmdlets section. For managing vSphere Auto Deploy with the vSphere Client, see the Managing vSphere Auto Deploy with the vSphere Client section.
- (Optional) Configure the first host that you provision as a reference host. Use the storage, networking, and other settings you want for your target hosts to share. Create a host profile for the reference host and write a rule that assigns both the already tested image profile and the host profile to target hosts.
- (Optional) If you want to have vSphere Auto Deploy overwrite existing partitions, set up a reference host to do auto partitioning and apply the host profile of the reference host to other hosts. See Configure a Reference Host for Auto-Partitioning.
- (Optional) If you have to configure host-specific information, set up the host profile of the reference host to prompt for user input. For more information about host customizations, see the vSphere Host Profiles documentation.
Using vSphere Auto Deploy Cmdlets
vSphere Auto Deploy cmdlets are implemented as Microsoft PowerShell cmdlets and included in PowerCLI. Users of vSphere Auto Deploy cmdlets can take advantage of all PowerCLI features.
Experienced PowerShell users can use vSphere Auto Deploy cmdlets just like other PowerShell cmdlets. If you are new to PowerShell and PowerCLI, the following tips might be helpful.
You can type cmdlets, parameters, and parameter values in the PowerCLI shell.
- Get help for any cmdlet by running Get-Help
cmdlet_name
. - Remember that PowerShell is not case sensitive.
- Use tab completion for cmdlet names and parameter names.
- Format any variable and cmdlet output by using Format-List or Format-Table, or their short forms fl or ft. For more information, run the Get-Help Format-List cmdlet.
Passing Parameters by Name
Copy-DeployRule -DeployRule testrule -ReplaceItem MyNewProfile
Most examples in the vCenter Server Installation and Setup documentation pass in parameters by name.
Passing Parameters as Objects
You can pass parameters as objects if you want to perform scripting and automation. Passing in parameters as objects is useful with cmdlets that return multiple objects and with cmdlets that return a single object. Consider the following example.
- Bind the object that encapsulates rule set compliance information for a host to a variable.
$tr = Test-DeployRuleSetCompliance MyEsxi42
- View the itemlist property of the object to see the difference between what is in the rule set and what the host is currently using.
$tr.itemlist
- Remediate the host to use the revised rule set by using the Repair-DeployRuleSetCompliance cmdlet with the variable.
Repair-DeployRuleSetCompliance $tr
The example remediates the host the next time you boot the host.
Set Up Bulk Licensing
You can use the vSphere Client or ESXi Shell to specify individual license keys, or you can set up bulk licensing by using PowerCLI cmdlets. Bulk licensing works for all ESXi hosts, but is especially useful for hosts provisioned with vSphere Auto Deploy.
Assigning license keys through the vSphere Client and assigning licensing by using PowerCLI cmdlets function differently.
- Assign license keys with the vSphere Client
- You can assign license keys to a host when you add the host to the vCenter Server system or when the host is managed by a vCenter Server system.
- Assign license keys with LicenseDataManager PowerCLI
- You can specify a set of license keys to be added to a set of hosts. The license keys are added to the vCenter Server database. Each time a host is added to the vCenter Server system or reconnects to it, the host is assigned a license key. A license key that is assigned through PowerCLI is treated as a default license key. When an unlicensed host is added or reconnected, it is assigned the default license key. If a host is already licensed, it keeps its license key.
The following example assigns licenses to all hosts in a data center. You can also associate licenses with hosts and clusters.
The following example is for advanced PowerCLI users who know how to use PowerShell variables.
Prerequisites
Procedure
Results
All hosts that you assigned to the data center are now licensed automatically.