TechRant
Installing ESXi Using vSphere Auto Deploy – Section 7
Jan 26, 2014

Using Auto Deploy for Stateless Caching and Stateful Installs – Section 7

 

The Auto Deploy stateless caching feature allows you to cache the host’s image locally on the host or on a network drive and continue to provision the host with Auto Deploy. The Auto Deploy stateful installs 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.

Introduction

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 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.

 

Use Cases

The System Cache Configuration host profile supports the following 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, a remote disk, or a USB drive. Continue provisioning this host with Auto Deploy.  If the Auto Deploy server becomes unavailable, the host boots from the cache.
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, a remote disk, or a USB drive. For subsequent boots, you boot from disk. The host no longer uses Auto Deploy.

 

Preparation

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

 

The table below shows the Preparation for Stateless Caching or Stateful Installs:

Requirement or Decision Description
Decide on VMFS 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 check box. The check box 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 unavailable.
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 next reboot.

 

  • If vCenter Server is available but the Auto Deploy server is unavailable, hosts do not connect to the vCenterServer 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.

 

Understanding Stateless Caching and 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.

 

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.

 

Each workflow supports stateless caching and stateful installs.

 

The table below shows the workflows that set up hosts for stateless caching or stateful installs:

 

Workflow Stateless caching Stateful install
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. The following workflow results:

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 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.

 

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. The following workflow results:

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.

 

The table below shows the 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.  a. If Auto Deploy provisioned the host before but stateless caching was not set up before, Auto Deploy caches the image.  b. If Auto Deploy   provided the host before and cached the image, Auto Deploy provisions the host using the information in the rules.  c. If Auto Deploy is unavailable, the host boots from the cached   image.

 

Prepare for Auto Deploy with Stateless Caching

Before you can start provisioning a host that uses stateless caching with Auto Deploy, you must verify that your environment is set up for Auto Deploy, prepare Auto Deploy PowerCLI rules, and set the host boot order.

 

Prerequisites

 

  • Decide which disk to use for caching and determine whether the caching process will overwrite an existing VMFS partition.
  • In production environments, protect the vCenter Server system and the Auto Deploy server by including them in a highly available environment. Having the vCenter Server in a management cluster guarantees that VDS and virtual machine migration are available. If possible, protect other elements of your infrastructure.

 

Procedure

1. Set up your environment for Auto Deploy and install PowerCLI.

2. Verify that a disk with at least 1GB of free space is available.

 

If the disk is not yet partitioned, partitioning happens when you apply the host profile.

 

3. Set up the host to first attempt a network boot and to boot from disk if network boot fails.

 

See your hardware vendor’s documentation.

 

What to do next

 

Set up a host profile for stateless caching. In most cases, you set up the host profile on a reference host and apply that host profile to other hosts.

 

Configure a Host Profile to Use Stateless Caching

When a host is set up to use stateless caching, the host uses a cached image if the Auto Deploy Server is not available. To use stateless caching, you must configure a host profile. You can apply that host profile to other hosts that you want to set up for stateless caching.

You can configure the host profile on a single host that you want to set up to use caching. You can also create a host profile that uses caching on a reference host and apply that host profile to other hosts.

 

Prerequisites

 

Prepare your host for stateless caching.

 

Procedure

1. In the vSphere Web Client, create a host profile.

2. Select the host profile and click Edit Host Profile.

3. Leave the name and description and click Next.

4. Click Advanced Configuration Settings and click the System Image Cache Configuration folder.

5. Click the System Image Cache Configuration icon.

6. In the System Image Cache Profile Settings drop-down menu, make your selection.

7. If you selected Enable stateless caching on the host, specify information about the disk to use.

8. Click Finish to complete the host profile configuration.

9. Apply the host profile with the vSphere Client, the vSphere Web Client, or the vSphere PowerCLI.

 

Enable Stateful Installs for Hosts Provisioned with Auto Deploy

You can set up hosts provisioned with Auto Deploy to cache the image to disk and to use the cached image on subsequent boots. After the image is cached, the hosts act like hosts on which an image is installed.

 

Prepare Hosts Provisioned with Auto Deploy for Stateful Installs

In some situations, it is useful to provision hosts with Auto Deploy and to perform all subsequent boots from disk. This approach is called Stateful Installs.

 

Prerequisites

 

Decide which disk to use for storing the image, and determine whether the new image will overwrite an existing VMFS partition.

 

Procedure

1. Set up your environment for Auto Deploy and install PowerCLI.

2. Verify that a disk with at least 1GB of free space is available.

If the disk is not partitioned, partitioning happens when you apply the host profile.

3. Set up the host to boot from disk.

See your hardware vendor’s documentation.

 

Configure a Host Profile to Enable Stateful Installs

To set up a host provisioned with Auto Deploy to boot from disk, you must configure a host profile. You can apply that host profile to other hosts that you want to set up for stateful installs.

You can configure the host profile on a single host. You can also create a host profile on a reference host and apply that host profile to other hosts.

 

Prerequisites

 

Make sure that your host is configured for Auto Deploy and that you meet other prerequisites for stateful Installs.

 

Procedure

1. In the vSphere Web Client, create a host profile.

2. With the host profile object displayed, click the Edit host profile settings icon.

3. Leave the name and description and click Next.

4. Click Advanced Configuration Settings and click the System Image Cache Configuration folder.

5. Click the System Image Cache Configuration icon.

6. In the System Image Cache Profile Settings drop-down menu, make your selection.

7. If you select Enable stateful installs on the host, specify information about the disk to use.

8. Click Finish to complete the host profile configuration.

9. Apply the host profile with the vSphere Client, the vSphere Web Client, or the vSphere PowerCLI.

 

Comments:

No comment found.

Leave a new comment

Search

Please enter a keyword.

Recent Posts

Categories

Copyright © 2017 New Horizons Worldwid, Inc. All rights reserved.
Version: 5.7.1.0