Tuesday, October 15, 2013

Understanding vSphere 5.5 Auto Deploy

vSphere Auto Deploy can provision hundreds of physical hosts with ESXi software. You can specify the
image to deploy and the hosts to provision with the image. Optionally, you can specify host profiles to
apply to the hosts, and a vCenter Server location (folder or cluster) for each host.

Introduction to Auto Deploy
When you start a physical host that is set up for Auto Deploy, Auto Deploy uses a PXE boot infrastructure
in conjunction with vSphere host profiles to provision and customize that host. No state is stored on the host
itself, instead, the Auto Deploy server manages state information for each host.

State Information for ESXi Hosts
Auto Deploy stores the information for the ESXi hosts to be provisioned in different locations. Information
about the location of image profiles and host profiles is initially specified in the rules that map machines to
image profiles and host profiles.


Auto Deploy server 
Serves images and host profiles to ESXi hosts. The Auto Deploy server is at
the heart of the Auto Deploy infrastructure.

Auto Deploy rules engine
Tells the Auto Deploy server which image profile and which host profile to
serve to which host. Administrators use the Auto Deploy PowerCLI to define
the rules that assign image profiles and host profiles to hosts.

Image profiles
Define the set of VIBs to boot ESXi hosts with
VMware and VMware partners make image profiles and VIBs available
in public depots. Use the Image Builder PowerCLI to examine the depot
and the Auto Deploy rules engine to specify which image profile to
assign to which host.
VMware customers can create a custom image profile based on the
public image profiles and VIBs in the depot and apply that image profile
to the host.

Host profiles
Define machine-specific configuration such as networking or storage setup.
Administrators create host profiles by using the host profile UI. You can
create a host profile for a reference host and apply that host profile to other
hosts in your environment for a consistent configuration.

Host customization
Stores information that the user provides when host profiles are applied to
the host. Host customization might contain an IP address or other
information that the user supplied for that host.

Rules and Rule Sets
You specify the behavior of the Auto Deploy server by using a set of rules written in Power CLI. The Auto
Deploy rules engine checks the rule set for matching host patterns to decide which items (image profile, host
profile, or vCenter Server location) to provision each host with.
The rules engine maps software and configuration settings to hosts based on the attributes of the host. For
example, you can deploy image profiles or host profiles to two clusters of hosts by writing two rules, each
matching on the network address of one cluster.
For hosts that have not yet been added to a vCenter Server system, the Auto Deploy server checks with the
rules engine before serving image profiles, host profiles, and inventory location information to hosts. For
hosts that are managed by a vCenter Server system, the image profile, host profile, and inventory location
that vCenter Server has stored in the host object is used. If you make changes to rules, you can use Auto
Deploy PowerCLI cmdlets to test and repair rule compliance. When you repair rule compliance for a host,
that host's image profile and host profile assignments are updated.
The rules engine includes rules and rule sets.

Rules 
Rules can assign image profiles and host profiles to a set of hosts, or specify
the location (folder or cluster) of a host on the target vCenter Server system.
A rule can identify target hosts by boot MAC address, SMBIOS information,
BIOS UUID, Vendor, Model, or fixed DHCP IP address. In most cases, rules
apply to multiple hosts. You create rules by using Auto Deploy PowerCLI
cmdlets. After you create a rule, you must add it to a rule set. Only two rule
sets, the active rule set and the working rule set, are supported. A rule can
belong to both sets, the default, or only to the working rule set. After you
add a rule to a rule set, you can no longer change the rule. Instead, you copy
the rule and replace items or patterns in the copy. By default, Auto Deploy
uses the name of the rule for the copy and hides the original rule.

Active Rule Set 
When a newly started host contacts the Auto Deploy server with a request
for an image profile, the Auto Deploy server checks the active rule set for
matching rules. The image profile, host profile, and vCenter Server inventory
location that are mapped by matching rules are then used to boot the host. If
more than one item of the same type is mapped by the rules, the Auto
Deploy server uses the item that is first in the rule set.

Working Rule Set 
The working rule set allows you to test changes to rules before making the
changes active. For example, you can use Auto Deploy PowerCLI cmdlets for
testing compliance with the working rule set. The test verifies that hosts
managed by a vCenter Server system are following the rules in the working
rule set. By default, cmdlets add the rule to the working rule set and activate
the rules. Use the NoActivate parameter to add a rule only to the working
rule set.
Active Rule Set When a newly started host contacts the Auto Deploy server with a request
for an image profile, the Auto Deploy server checks the active rule set for
matching rules. The image profile, host profile, and vCenter Server inventory
location that are mapped by matching rules are then used to boot the host. If
more than one item of the same type is mapped by the rules, the Auto
Deploy server uses the item that is first in the rule set.
Working Rule Set The working rule set allows you to test changes to rules before making the
changes active. For example, you can use Auto Deploy PowerCLI cmdlets for
testing compliance with the working rule set. The test verifies that hosts
managed by a vCenter Server system are following the rules in the working
rule set. By default, cmdlets add the rule to the working rule set and activate
the rules. Use the NoActivate parameter to add a rule only to the working
rule set.

Auto Deploy Boot Process
When you boot a host that you want to provision or reprovision with vSphere Auto Deploy, the Auto
Deploy infrastructure supplies the image profile and, optionally, a host profile and a vCenter Server location
for that host.
The boot process is different for hosts that have not yet been provisioned with Auto Deploy (first boot) and
for hosts that have been provisioned with Auto Deploy and added to a vCenter Server system (subsequent
boot).

First Boot Overview
When a host that has not yet been provisioned with vSphere Auto Deploy boots (first boot), the host
interacts with several Auto Deploy components.
1 When the administrator turns on a host, the host starts a PXE boot sequence.
The DHCP Server assigns an IP address to the host and instructs the host to contact the TFTP server.
2 The host contacts the TFTP server and downloads the iPXE file (executable boot loader) and an iPXE
configuration file.
3 iPXE starts executing.
The configuration file instructs the host to make a HTTP boot request to the Auto Deploy server. The
HTTP request includes hardware and network information.
4 In response, the Auto Deploy server performs these tasks:
a Queries the rules engine for information about the host.
b Streams the components specified in the image profile, the optional host profile, and optional
vCenter Server location information.
5 The host boots using the image profile.
If the Auto Deploy server provided a host profile, the host profile is applied to the host.
6 Auto Deploy adds the host to the vCenter Server system that Auto Deploy is registered with.
a If a rule specifies a target folder or cluster on the vCenter Server system, the host is placed in that
folder or cluster. The target folder must be under a data center.
b If no rule exists that specifies a vCenter Server inventory location, Auto Deploy adds the host to the
first datacenter displayed in the vSphere Web Client UI.
7 (Optional) If the host profile requires the user to specify certain information, such as a static IP address,
the host is placed in maintenance mode when the host is added to the vCenter Server system.
You must reapply the host profile and update the host customization to have the host exit maintenance
mode. When you update the host customization, answer any questions when prompted.
8 If the host is part of a DRS cluster, virtual machines from other hosts might be migrated to the host after
the host has successfully been added to the vCenter Server system.

No comments:

Post a Comment