With stateless caching, you can cache the image of an ESXi host. With stateful installs, you can install hosts over the network.
The vSphere Auto Deploy stateless caching feature lets you cache the host's image. The vSphere Auto Deploy stateful installs feature lets you install hosts over the network. After the initial network boot, these hosts boot like other ESXi hosts. The stateless caching solution is primarily intended for situations when several hosts boot simultaneously. The locally cached image helps prevent a bottleneck that results if several hundreds of hosts connect to the vSphere Auto Deploy server simultaneously. After the boot operation is complete, hosts connect to vSphere Auto Deploy to complete the setup.
The stateful installs feature lets you provision hosts with the image profile over the network without having to set up the PXE boot infrastructure.
Introduction to Stateless Caching and Stateful Installs
You can use the System Cache Configuration host profile to provision hosts with vSphere Auto Deploy stateless caching and stateful installs.
Examples of Stateless Caching and Stateful Installs
- Hosts provisioned with vSphere Auto Deploy cache the image (stateless caching)
- Set up and apply a host profile for stateless caching. You can cache the image on a local disk, a remote disk, or a USB drive. Continue provisioning this host with vSphere Auto Deploy. If the vSphere Auto Deploy server becomes unavailable, for example because hundreds of hosts attempt to access it simultaneously, the host boots from the cache. The host attempts to reach the vSphere Auto Deploy server after the boot operation to complete configuration.
- Hosts provisioned with vSphere Auto Deploy become stateful hosts
- Set up and apply a host profile for stateful installs. When you provision a host with vSphere Auto Deploy, the image is installed on the local disk, a remote disk, or a USB drive. For subsequent boots, you boot from the disk. The host no longer uses vSphere Auto Deploy.
Preparation
To successfully use stateless caching or stateful installs, decide how to configure the system and set the boot order.
Requirement or Decision | Description |
---|---|
Decide on VMFS partition overwrite | When you install ESXi by using the interactive installer, you are prompted whether you want to overwrite an existing VMFS datastore. The System Cache Configuration host profile provides an option to overwrite existing VMFS partitions. The option is not available if you set up the host profile to use a USB drive. |
Decide whether you need a highly available environment | If you use vSphere Auto Deploy with stateless caching, you can set up a highly available vSphere Auto Deploy environment to guarantee that virtual machines are migrated on newly provisioned hosts and that the environment supports vNetwork Distributed Switch even if the vCenter Server system becomes temporarily unavailable. |
Set the boot order | The boot order you specify for your hosts depends on the feature you want to use.
|
Stateless Caching and Loss of Connectivity
If the ESXi hosts that run your virtual machines lose connectivity to the vSphere Auto Deploy server, the vCenter Server system, or both, some limitations apply the next time you reboot the host.
- If vCenter Server is available but the vSphere Auto Deploy server is unavailable, hosts do not connect to the vCenter Server system automatically. You can manually connect the hosts to the vCenter Server, or wait until the vSphere Auto Deploy server is available again.
- If both vCenter Server and vSphere Auto Deploy are unavailable, you can connect to each ESXi host by using the VMware Host Client, and add virtual machines to each host.
- If vCenter Server is not available, vSphere DRS does not work. The vSphere Auto Deploy server cannot add hosts to the vCenter Server. You can connect to each ESXi host by using the VMware Host Client, and add virtual machines to each host.
- If you make changes to your setup while connectivity is lost, the changes are lost when the connection to the vSphere Auto Deploy server is restored.
Understanding Stateless Caching and Stateful Installs
When you want to use vSphere Auto Deploy with stateless caching or stateful installs, you must set up a host profile, apply the host profile, and set the boot order.
When you apply a host profile that enables caching to a host, vSphere Auto Deploy partitions the specified disk. What happens next depends on how you set up the host profile and how you set the boot order on the host.
- vSphere Auto Deploy caches the image when you apply the host profile if Enable stateless caching on the host is selected in the System Cache Configuration host profile. No reboot is required. When you later reboot, the host continues to use the vSphere Auto Deploy infrastructure to retrieve its image. If the vSphere Auto Deploy server is not available, the host uses the cached image.
- vSphere Auto Deploy installs the image if Enable stateful installs on the host is selected in the System Cache Configuration host profile. When you reboot, the host initially boots using vSphere Auto Deploy to complete the installation. A reboot is then issued automatically, after which the host boots from disk, similar to a host that was provisioned with the installer. vSphere Auto Deploy no longer provisions the host.
You can apply the host profile from the vSphere Client, or write a vSphere Auto Deploy rule in a PowerCLI session that applies the host profile.
Using the vSphere Client to Set Up vSphere Auto Deploy for Stateless Caching or Stateful Installs
You can create a host profile on a reference host and apply that host profile to additional hosts or to a vCenter Server folder or cluster. The following workflow results.
- You provision a host with vSphere Auto Deploy and edit that host's System Image Cache Configuration host profile.
- You place one or more target hosts in maintenance mode, apply the host profile to each host, and instruct the host to exit maintenance mode.
- What happens next depends on the host profile you selected.
- If the host profile enabled stateless caching, the image is cached to disk. No reboot is required.
- If the host profile enabled stateful installs, the image is installed. When you reboot, the host uses the installed image.
Using PowerCLI to Set Up vSphere Auto Deploy for Stateless Caching or Stateful Installs
- You provision a reference host with vSphere Auto Deploy and create a host profile to enable a form of caching.
- You write a rule that provisions additional hosts with vSphere Auto Deploy and that applies the host profile of the reference host to those hosts.
- vSphere Auto Deploy provisions each host with the image profile or by using the script bundle associated with the rule. The exact effect of applying the host profile depends on the host profile you selected.
- For stateful installs, vSphere Auto Deploy proceeds as follows:
- During first boot, vSphere Auto Deploy installs the image on the host.
- During subsequent boots, the host boots from disk. The hosts do not need a connection to the vSphere Auto Deploy server.
- For stateless caching, vSphere Auto Deploy proceeds as follows:
- During first boot, vSphere Auto Deploy provisions the host and caches the image.
- During subsequent boots, vSphere Auto Deploy provisions the host. If vSphere Auto Deploy is unavailable, the host boots from the cached image, however, setup can only be completed when the host can reach the vSphere Auto Deploy server.
- For stateful installs, vSphere Auto Deploy proceeds as follows: