Understanding vSphere Auto Deploy Stateless Caching and Stateful Installs
search cancel

Understanding vSphere Auto Deploy Stateless Caching and Stateful Installs

book

Article ID: 340188

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article provides an overview of these new features for VMware vSphere 5.1 Auto Deploy:
  • Auto Deploy stateless caching
  • Auto Deploy stateful installs

Notes:
  • 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.
  • If an ESXi hosts has booted using stateless caching, it is recommended to resolve the issue(s) that led to the stateless caching boot, and reboot from Autodeploy as quickly as possible. This does not apply to stateful installs..


Environment

VMware vSphere ESXi 5.1
VMware vCenter Server 5.1.x

Resolution

vSphere 5.1 introduces these new features for Auto Deploy:
  • 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.
The System Cache Configuration host profile supports stateless caching and stateful installs.
  • Stateless caching is a good solution when you use the Auto Deploy infrastructure, but will 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 hostsSet 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.

To successfully use stateless caching or stateful installs, decide how to set up the system and set the boot order.

Preparing for Stateless Caching or Stateful Installs

Requirement or Decision
Description
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:
  • To set up Auto Deploy with stateless caching, configure your host to first attempt to boot from the network, and to then attempt to boot from disk. If Auto Deploy is not available, the host boots using the cache.
  • To set up Auto Deploy for stateful installs on hosts that do not currently have a bootable disk, configure your hosts to first attempt to boot from disk, and to then attempt to boot from the network.

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 Connectivity

If 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 installs

When 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.
Note: You can apply the host profile from a vSphere Client or from a vSphere Web Client, or write an Auto Deploy PowerCLI rule that applies the host profile.

Workflows that set up hosts for stateless caching or stateful installs

Note: Each workflow supports stateless caching and stateful installs.
Workflow
Stateless caching
Stateful install
Apply host profile from vSphere Client or vSphere Web ClientApply 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:
  1. You provision a host with Auto Deploy and edit that host's System Image Cache Configuration host profile.
  2. 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.
  3. What happens next depends on the host profile you selected.
    • If the host profile selected is enabled stateless caching, the image is cached to disk. No reboot is required.
    • If the host profile selected is enabled stateful installs, the image is installed. When you reboot, the host uses the installed image.

  4. A reboot is required so the changes can take effect.
Applying the System Cache Configuration with PowerCLI

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:
  1. You provision a reference with Auto Deploy and create a host profile to enable a form of caching.
  2. You write a rule that provisions additional hosts with Auto Deploy and that applies the host profile of the reference host to those hosts.
  3. 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.
  4. 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.


Additional Information

For more information on setting up your system to provision hosts with Auto Deploy, and configure the hosts to use stateless caching, see Set Up Stateless Hosts to Use Auto Deploy with Caching in the vSphere Installation and Setup Guide for vSphere 5.1.
For more information on setting up hosts provisioned with Auto Deploy to cache the image to disk and to use the cached image on subsequent boots, see Enable Stateful Installs for Hosts Provisioned with Auto Deploy in the vSphere Installation and Setup Guide for vSphere 5.1.
Troubleshooting vSphere Auto Deploy
Understanding vSphere Auto Deploy
ステートフルインストールの Auto Deploy ホストがローカル USB または SD カードから起動しない
Tagging the Stateless Caching Disk using Autodeploy displays an inaccurate Is Local: value
vSphere Auto Deploy のステートレス キャッシュおよびステートフル インストールについて
Understanding the vSphere Autodeploy Stateless/Stateful Caching Disk selection process with the remote parameter selection in Host Profiles