Understanding vSphere Auto Deploy Stateless Caching and Stateful Installs (2032881)
- Auto Deploy stateless caching
- Auto Deploy stateful installs
- For more information, see the vSphere Installation and Setup Guide. This guide contains definitive information. If there is a discrepancy between the guide and the article, assume the guide is correct.
- VMware does not support HA failovers when a host has booted from the stateless caching disk. It is recommended to resolve the issues that led to the stateless caching boot and reboot from Autodeploy as quickly as possible. This does not apply to stateful caching.
- Auto Deploy Stateless Caching – This feature allows you to cache the host's image locally and continue to provision the host with Auto Deploy
- Auto Deploy Stateful Installs – This feature allows you to install hosts over the network without setting up a complete PXE boot infrastructure. After the initial network boot, these hosts boot like other hosts on which ESXi has been installed.
- Stateless caching ins a good solution when you use the Auto Deploy infrastructure, but you require a safeguard in case the Auto Deploy server is unavailable. Hosts provisioned with stateless caching host profile settings continue to be provisioned with Auto Deploy.
- Stateful installs support network installation through Auto Deploy. After the initial installation, hosts that are provisioned with stateful install host profile settings will boot from disk.
The System Cache Configuration host profile supports these use cases:
|Hosts provisioned with 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 or a USB drive. Continue provisioning this host with Auto Deploy. If the Auto Deploy server becomes unavailable, the host boots from the cached image.|
|Hosts provisioned with Auto Deploy become stateful hosts||Set up and apply a host profile for stateful installs. When you provision a host with Auto Deploy, the image is installed on the local disk or a USB drive. For subsequent boots, you boot from disk. The host no longer uses Auto Deploy.|
Preparing for Stateless Caching or Stateful Installs
|Requirement or Decision
|Decide on VMFS (virtual machine file system) partition overwrite
||When you install ESXi with the interactive installer, you are prompted whether you want to overwrite an existing VMFS datastore. The System Cache Configuration host profile allows you to overwrite existing VMFS partitions by selecting a checkbox.|
The checkbox 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 Auto Deploy with stateless caching, you can set up a highly available 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 becomes temporarily available.|
|Set the boot order
||The boot order you specify for your hosts depends on the feature you want to use:
Note: If you currently have a bootable image on the disk, configure the hosts for one-time PXE boot and provision the host with Auto Deploy to use a host profile that specifies stateful installs.
Stateless Caching and Loss of ConnectivityIf the ESXi hosts that run your virtual machines lose connectivity to the Auto Deploy server, the vCenter Server system, or both, some limitations apply when you reboot:
- If vCenter Server is available but the Auto Deploy server is unavailable, hosts do not connect to the vCenter Server automatically. You can manually connect the hosts to the vCenter Server, or wait until the Auto Deploy server is available again.
- If both vCenter Server and vSphere Auto Deploy do not work, you can connect to each ESXi host by using the vSphere Client, and assign virtual machines to each host.
- If vCenter Server is not available, vSphere DRS does not work. The Auto Deploy server cannot add hosts to the vCenter Server system. You can connect to each ESXi host by using the vSphere Client, and assign virtual machines to each host.
- If you make changes to your setup while connectivity is lost, you lose these changes when the Auto Deploy server is restored after the outage.
Setting up hosts for stateless caching or stateful installsWhen you want to use 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, 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.
- With the Enable stateless caching on the host host profile, Auto Deploy caches the image when you apply the host profile. No reboot is required. When you later reboot, the host continues to use the Auto Deploy infrastructure to retrieve its image. If the Auto Deploy server is not available, the host uses the cached image.
- With the Enable stateful installs on the host host profile, Auto Deploy installs the image. When you reboot the host, the host boots from disk, just like a host that was provisioned with the installer. Auto Deploy no longer provisions the host.
Workflows that set up hosts for stateless caching or stateful installs
|Apply host profile from vSphere Client or vSphere Web Client||Apply the host profile either to individual hosts or to all hosts in a folder or cluster. No reboot required.
||Apply the host profile either to individual hosts or to all hosts in a folder or cluster. Reboot is required.|
|Write and apply PowerCLI rule
||Set up a reference host with a host profile that has the caching setup you want. Write a PowerCLI rule that provisions the host by using Auto Deploy and that applies a host profile that is set up for stateless caching. Reboot is required.||Set up a reference host with a host profile that has the caching setup you want. Write a PowerCLI rule that provisions the host by using Auto Deploy and applies a host profile that is set up for stateful installs. Reboot is required.|
Applying the System Cache Configuration Host Profile from the vSphere Client or the vSphere Web Client
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:
- You provision a host with 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.
- A reboot is required so the changes can take effect.
You can create a host profile for a reference host and write an Auto Deploy PowerCLI rule that applies that host profile to other target hosts:
- You provision a reference with Auto Deploy and create a host profile to enable a form of caching.
- You write a rule that provisions additional hosts with Auto Deploy and that applies the host profile of the reference host to those hosts.
- Auto Deploy provisions each host with the new image profile. The exact effect of applying the host profile depends on the host profile you selected and on whether the host was previously provisioned with Auto Deploy.
- First Boot and Subsequent Boots Comparison.
First Boot Subsequent Boots For stateful installs, Auto Deploy installs the image. For stateful installs, the host boots from disk. For stateless caching, Auto Deploy provisions the host and caches the image. For stateless caching, Auto Deploy provisions the host.
- If Auto Deploy provisioned the host before but stateless caching was not set up before, Auto Deploy caches the image.
- If Auto Deploy provisioned the host before and cached the image, Auto Deploy provisions the host using the information in the rules.
- If Auto Deploy is unavailable, the host boots from the cached image.