Performing an Auto Deploy stateful install
An Auto Deployed ESXi server, will always have to PXE-boot, engage the Auto Deploy server or the vCenter database (if it has the information Image Profile and Host Profile information). This is because the ESXi Image is not stored on the machine but is loaded directly into the server's volatile memory. So every reboot requires the server to go through the PXE boot procedure to load an ESXi Image into its memory. Starting with vSphere 5.1 you can use Auto Deploy to install the ESXi Image onto the local disk of the chosen server. This process if referred to as a stateful install.
How to do it…
The following procedure will help you prepare a host for a stateful install.
- Extract a Host Profile from a reference host and edit the settings.
- Expand Advanced Configuration Settings and then check the System Image Cache Configuration checkbox.
- On the right-pane, use the System Image Cache Profile Settings drop-down menu to select Enable stateful installs on the host.
- Configure an Auto Deploy rule for the intended hosts to use the Host Profile you created.
- At the BIOS of a machine on which you intend to perform stateful installs, make sure the boot order is configured in a way so that the server attempts to boot from the local hard drive first and should fall back to network boot if that fails.
- Boot the machine. Once the server is booted, it will be automatically placed in Maintenance Mode.
- Navigate to the Actions menu for the server, then to All vCenter Actions | Host Profiles | Remediate.
- It will prompt you for host customization. Supply the needed information and click on Next to review the remediation tasks and then click on Finish to begin remediation.
- Reboot the server to load from the local hard disk.
How it works…
With stateful install configured correctly, when you boot a server for the first time, it attempts to boot from the hard drive. Since there is no image on the local disk, it does a network boot and loads the ESXi Image from the Auto Deploy server. The rule configured at the Auto Deploy server will attach the Host Profile to the ESX Server. The ESXi server deployed will be automatically put in maintenance mode.
Now, you will have to manually remediate the hosts, to apply the changes made to the Host Profile. Remediation will save the ESXi Image from the memory to the local hard disk of the ESXi machine. Keep in mind that, even though remediation dumps the image to the local hard drive, the server is still running an image loaded from the memory. The server will have to be rebooted so that a boot from the local hard disk succeeds.