As part of the VCAP6 – DCV we are going to perform Objective 1.1 below are the tasks
- Configure and Manage Auto Deploy configurations
- Determine use case for Stateless vs Stateful installs
- Create / Modify rules and rule sets
- Create and associate Host Profiles for an Auto Deploy reference host
For the complete VCAP – DCV Checklist visit Checklist
Stateless Caching and Stateful Installs
Stateless solution is best suitable if there is a functioning Auto Deploy infrastructure. Stateless will continue to boot from the Auto Deploy server and get its configurations from a predefined host profile. In case of an Auto Deploy server or the VCenter server become un available the Host will use it’s local cache to boot up. In such cases Host may not connect to the VCenter automatically instead of we need to manually add the host to the VCenter Cluster.
Stateful Install – Auto Deploy will install the ESXi image on the host’s local disk in reference to the host profile rules. Once the imaging is complete the subsequent booting will be from the local disk. It is just like deploying the ESXi Using a media.
Boot configuration best practices for both stateless and stateful install
In Stateless method always configure the host to boot from Network and then to boot from the local disk. Because in case of network connectivity failure host will continue to work by booting from the Local cache.
In Stateful install method configure the host to first boot from a local disk and then to boot from a network. Once the Auto Deploy is completed then the subsequent boots will happen from the local disk. If the local disk fails then it can boot from network and look for an available Auto Deploy instance over the network.
Both the methods supports a Local Disk, Remote Disk and a USB drive for caching and installations.
Here is a diagram explaining the workflow of both Stateless and Stateful installation.
Host Profile configuration for System Image Caching.
Requirements to configure the Auto Deploy
- SolarWinds TFTP
- DHCP Server role
- Power CLI
- ESXi Offline Bundle (Download)
-
Host profile has to be created. (Create a reference profile of existing host and make necessary changes on it)
-
First Auto Deploy Service
Home>Administratration>System Configuration>Services>Auto Deploy
Select Auto Deploy and click on Actions dropdown. Then click on “Edit Startup Type” and select “Automatic”
After that click on Action dropdown again and Start the service.
- Once the installation is complete, right click on the VCenter root and select the Settings.
-
Under the settings select the “Auto Deploy” (You will see something like below)
-
Now Download the TFTP boot Zip file then extract and save it under your SolarWinds installation root directory. (C:\TFTP-Root)
Now we need to configure the DHCP (I will assume that you have already installed the DHCP role and you have an active scope)
-
Configure the server options as below.
Option 66 should be the TFTP server name
Option 67 should be the boot file name which is mentioned in the Auto Deploy Settings page (See Above screenshot)
- So before we further go ahead with the configurations I have created a Virtual Machine to perform the Auto Deploy. You can very well use a physical host if you wish to.
- So if everything is configure well when you boot the VM you will see a screen as below. If will not go further as it won’t see the ESXi installer.
Also make sure you download and copy the ESXi Offline Bundle in a directory before starting with the Power CLI.
-
Now launch the Power CLI and execute the command as below to add the Esxi offline bundle.
- Add-EsxSoftwareDepot C:\ESXiOffline\ESXi600-201602001.zip
Below command will list the image profiles associated with the ESXi bundle.
-
Get-EsxImageProfile | select Name
Below command will clone the standard profile and create a new profile called RenlabsProfile
- New-EsxImageProfile -CloneProfile ESXi-6.0.0-20160204001-standard -Name RenlabsProfile -Vendor Renlabs
- Add-EsxSoftwareDepot C:\ESXiOffline\ESXi600-201602001.zip
If you wish to add any additional vibs you can add it now using below commands.
Add-EsxSoftwarePackage -ImageProfile RenlabsProfile -SoftwarePackage VibPackageName.zip
To confirm whether the package is added or not execute below command to list the entire package.
Get-EsxSoftwarePackage
Now you can bundle the package and export it.
Export-EsxImageProfile -ImageProfile “RenlabsProfile” -ExportToBundle -FilePath “C:\ESXiOffline\RenlabsProfile.zip” -NoSignatureCheck
Now you need to connect to the VCenter server to proceed further.
Connect-VIServer 192.168.3.11
Now execute below command to deploy the rule. This has a condition based on the pattern rule. There are multiple pattern rules can be configured for example Cluster name,
New-DeployRule -Name ADeploy -Item “RenlabsProfile” -Pattern “ipv4=192.168.3.50-192.168.3.100”
Once the process is complete you will see something similar as below.
Get-Cluster
New-DeployRule -Name ClusterRule -Item “AutoDeploy” -Pattern “ipv4=192.168.3.50-192.168.3.100”
Now I have created another custom host profile named RenHostProfile (The host profile can be customized according to your needs, However I have n’t customized it here during the lab)
New-DeployRule -Name HostProfile -Item “RenHostProfile” -Pattern “ipv4=192.168.3.50-192.168.3.100”
Finally activate all the deploy profiles as below.
Now create a VM for deploying the VMHost with atleast 4 GB of memory. Memory requirement is a must otherwise you will see the host stops its response at “user loaded successfully” stage. Now let’s begin the deployment by starting up the VM allocated for the AutoDeploy.
Once the host deployment is completed you will see it as below. Deployed host will be moved under the cluster name “AutoDeploy” We will have to do few customization on the host profile to adjust few settings.
If you check the host profile compliance you might see warning. So in-order to fix this you need to first “Reset Host Customizations” Then the host profile customization can be applied. (Right-click the ESXi host and select vCenter Actions > Host Profiles > Reset Host Customizations.)