Configuring vSphere 7 Auto Deploy
Whilst continuing to prepare for my VMware Certified Advanced Professional Deploy Exam, I have been configuring vSphere Auto Deploy. As with my blog post on vCenter Profiles, I am covering Auto Deploy as its not something I have ever used in any great depth. As always, I used the official VMware documentation to guide me.
Lets get started!
In my lab I am using vCenter 7.0 Update 3c and using nested hosts for the Auto Deploy hosts. I am also using a RHEL server for the TFTP requirement along with DHCP provided by my layer 3 switch.
Depending on whether you are using BIOS or UEFI you will need to set the appropriate DHCP options; 66 & 67.
I am using EFI, therefore using UEFI DHCP Boot File Name : snponly64.efi.vmw-hardwired as the value for DHCP option 067.
Here are the two DHCP options I have set:
066 : 10.200.15.22 067 : snponly64.efi.vmw-hardwired
In the vSphere Client Select the Auto Deploy menu:
If you haven’t setup Auto Deploy previously, click Enable Auto Deploy and Image Builder.
You now need to download the required files, including the boot files mentioned earlier, that you will need to host on your TFTP server by selecting the Download TFTP Zip File link:
Copy the downloaded file to your TFTP server using something like WinSCP and extract the ZIP file to the TFTPRoot directory you configured as part of the TFTP server installation/setup.
Your directory should then look something like this:
Now using PowerShell 5.1 (PowerShell 7 is not supported by the VMware.ImageBuilder module), connect to the vCenter Server and run the following commands to set up the software depots:
Connect-VIServer <vcsa-fqdn> -Credential $creds
You can check you have added the depot successfully by running the following:
Now to create the Deploy Rules. I will be using the latest image; ESXi-7.0U3c-19193900-standard, deploying to my ‘virtual-cluster’ and providing it with a host profile I already had. I have also provided an IP address range for the hosts I want to include. You can also just use the ‘-AllHosts’ parameter if you don’t want to restrict.
New-DeployRule -Name "Lab Auto Deploy Rule" -Item "virtual-cluster", "ESXi-7.0U3c-19193900-standard", "Virtual Cluster Hosts" -Pattern "ipv4=10.200.40.10-10.200.40.20"
My host profile contains a few basic settings such as the root password, NTP settings & NIC configurations. There are plenty of host configuration options that can be set in this profile, configure the settings you need for your environment or lab.
You will be able to see the rules in the vSphere Client once complete.
If you want to be able to manually add rules in the vSphere Client, you will need to manually add the software depot using the same URL used earlier.
You will then be able to manually create Deploy Rules.
Now back to it…
You will see the Deploy Rule is currently inactive:
Running the following activates the rule:
Add-DeployRule -DeployRule "Lab Auto Deploy Rule"
You can now see the status is Active in the UI.
If using the vSphere Client, you can use the ‘Activate/Deactivate Rules’ button instead if you didn’t want to use PowerShell.
Now before we start deploying hosts, we need to create some! In this case they will be nested hosts with minimum configurations. We will also need some DHCP reservations and appropriate DNS records.
Once in place, we can go ahead an boot the hosts.
Now heading back to the vSphere UI, you will find your newly deployed host(s)!
From a troubleshooting perspective, you will be wanting to take a look in syslog.log on the host. This helped me identify my issues when I hadn’t applied a firewall rule correctly!
As always, thanks for reading!
If you like my content, consider following me on Twitter so you don’t miss out!Follow @vStephanMcTighehttps://platform.twitter.com/widgets.js