Autodeploy is a great tool that is integrated with VMWare vCenter and is available for your use if you have the proper licensing levels. There are a few ways to utilize Autodeploy, and this guide will focus on using the “stateful” (Install to disk) deployment method.
I’ve put together the steps needed to deploy this service in a UEFI based PXE-boot environment. The initial boot configuration steps are specifically written to work with Dell Servers and the IDRAC tool CLI. The boot order commands below will place your SD’s cards at the beginning of the boot sequence.
I should note that this method requires no modification of the customer environment (Including DHCP options), and is completely portable (no installs).
Update the boot order on your hosts to allow PXE booting to take second place. (SSH to IDRAC IP of each host to enter console commands below)
#Update boot order racadm set bios.biosbootsettings.UefiBootSeq UefiBootSeq=Disk.SDInternal.1-1,NIC.PxeDevice.1-1,Unknown.Unknown.3-1,AHCI.SATAEmbedded.L-1 #Setup commit job and reboot now racadm jobqueue create BIOS.Setup.1-1 –r pwrcycle –s TIME_NOW –e TIME_NA
Enable AutoDeploy Services on vCenter
- In the web interface navigate to Home > Administration > System Configuration > Nodes > vCenter Server > Related Objects and start “Auto Deploy”
Download and run Tiny PXE server
- Copy TFTP Files from vCenter to TFTP Server file root
- Set boot file name below depending on type of device (UEFI vs Bios mode)
For Legacy hosts (Bios Mode PXE Booting) "undionly.kpxe.vmw-hardwired" For UEFI hosts - "snponly64.efi.vmw-hardwired"
This PXE server is fairly unique in the sense that it offers a “DCHP Proxy” option. This allows you to temporarily deploy this server and intercept DHCP requests, adding on only the options you need (Option 66 and 67). There’s great detail on this functionality here
Upload ESXI image to software depot in vCenter (use vendor image zip file)
add-esxsoftwaredepot "C:\temp\VMware-VMvisor-Installer-6.5.0.update01-5969303.x86_64-DellEMC_Customized-A00.zip"
Create minimal host profile.
This host profile can come from an existing host, or a new host you deploy with a blank profile.
$host = Get-VMHost 10.1.1.1 New-VMHostProfile -Name HostProfile -ReferenceHost $host
- Set “stateful install to usb” option in your host profile that was previously created. This is This can be found under “Advanced Configuration Settings > System Image Cache Configuration” in the vCenter Web Interface.
- Set Root Password (otherwise no password is set). This is found under “Security Configuration > Administrator Password” in the vCenter Web Interface.
Set deploy rules in Autodeploy to match hosts and apply host profile previously created
-
$profile = Get-ESXImageProfile -Name "HostProfile" New-DeployRule -Name "testrule" -Item $profile -AllHosts
Enable new AutoDeploy Rule
get-deployrule | add-deployrule
If client environment contains WDS (Windows Deployment Services) – Set PXE Delay to allow for DHCP options override from our temporary PXE server
Hosts will show up in vCenter when the deployment process is complete.
A complete script combining the commands above will be posted here when completed.
great blog post!
Do you know if this works with temporary assigned IP addresses (without forward and reverse DNS entries) where after firstboot the IP address gets changed to a fixed address by the Host Profile?