vSphere Autodeploy
Cian O’Mahony
Technical Support Engineer – VMware Global Support Services – Cork, Ireland
© 2009 VMware Inc. All rights reserved
Agenda








2
Overview
Components
Image Creation
Architecture and Scalability
Initial Setup
Design for Resiliency
Troubleshooting
Upcoming Features
A Quick Comparison
Without Auto Deploy…
With Auto Deploy…
Host image tied to physical server
Host image decoupled from server
•
•
•
•
•
•
Each host needs full install and config
Not easy to recover host
Redundant boot disks/dedicated LUN
Run on any server w/ matching hardware
Config stored in Host Profile
No boot disk
A lot of time/effort building hosts
Agile deployment model
•
•
•
•
•
•
Deploying hosts is repetitive and tedious
Heavy reliance on scripting
Need to update for each new release
Deploy many hosts quickly and efficiently
No pre/post install scripts
No need to update with each release
Configuration drift between hosts
Host State Guaranteed
•
•
•
•
3
Config drift always a concern
Compromises HA/DR
Manging drift consumes admin resources
•
Single boot image shared across hosts
Every reboot provides consistent image
Eliminate need to detect/correct drift
Components
© 2009 VMware Inc. All rights reserved
Auto Deploy Components
Component
Sub-Components
Notes
PXE Boot
Infrastructure
• DHCP Server
• TFTP Server
•
•
•
Setup independently
gPXE file from vCenter
Can use Auto Deploy
Appliance
Auto Deploy Server
• Rules Engine
• PowerCLI Snap-in
• Web Server
•
•
Build/Manage Rules
Match server to Image
and Host Profile
Deploy server
Image Builder
• Image Profiles,
• PowerCLI Snap-in
•
Combine ESXi image
with 3rd party VIBs to
create custom Image
Profiles
vCenter Server
• Stores Rules
• Host Profiles
• Answer Files
•
•
Provides store for rules
Host configs saved in
Host Profiles
Custom Host settings
saved in Answer Files
5
•
•
6
Image Creation
© 2009 VMware Inc. All rights reserved
Image Creation
Vendor, VMware
Offline Bundles
Create
Image
Copy
Emit VIBs
ISO
Profile
Base ESXi
Image Profile
9
Custom
Image
Image Creation
Vendor, VMware
Offline Bundles
Local Online Depot
(set up by
Autodeploy)
Fetch &
Cache VIBs
Autodeploy Server
ESXi Image
Profile
Create Image
Copy VIBs
Profile
Deploy
VIBs
Boot
Request
ESXi Host
10
Architecture and Scalability
© 2009 VMware Inc. All rights reserved
Boot Sequence
12
Architecture and Scalability
TFTP
DHCP
Host
13
Architecture and Scalability
AutoDeploy
TFTP
DHCP
PXE
14
Architecture and Scalability
TFTP
DHCP
PXE
Autodeploy
Web Proxy
Reference: http://blogs.vmware.com/vsphere/2012/01/using-reverse-web-proxy-with-auto-deploy.html
15
Architecture and Scalability
Edit the configuration file (/etc/httpd/conf/httpd.conf)
making the following changes:
Set the "Listen" and ServerName" options:
Listen 80
ServerName <server>.<company>.<domain>:80
Uncommented the "ProxyRequests" entry:
ProxyRequests on
16
Architecture and Scalability
Added the following lines to the end of the file:
# This section defines the location where the web proxy will cache the content
CacheRoot /var/cache/AutoDeploy/
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
CacheDefaultExpire 3600
CacheMaxFileSize 500000000
# this section defines the directories on the Auto Deploy server that the web
proxy will cache
SSLProxyEngine on
ProxyPass /vmw/cache https://vmware_autodeploy:6501/vmw/cache
ProxyPassReverse /vmw/cache https://vmware_autodelpoy:6501/vmw/cache
ProxyPass /vmw/rbd https://vmware_autodeploy:6501/vmw/rbd
ProxyPassReverse /vmw/rbd https://vmware_autodeploy:6501/vmw/rbd
17
Architecture and Scalability
Save the changes to the /etc/httpd/conf/httpd.conf file, and verify the apache
configuration by running:
# /usr/sbin/httpd -t -f /etc/httpd/conf/httpd.conf
(command returns "Syntax OK" if the configuration is good)
Finally, start the web server:
# service httpd start
# service httpd status
18
Architecture and Scalabilty
Cache
Option 66
TFTP
1
Cache
Autodeploy
Webproxy
TFTP
2
Option 66
DHCP
Webproxy
Option 66
20
TFTP
3
21
Initial Setup
© 2009 VMware Inc. All rights reserved
Initial Setup
Use vCenter Server Appliance as a Syslog Server to capture ESXi
host logs directly to vCenter Server
Use vCenter Server Appliance to receive ESXi core dumps from
failed ESXi hosts using NetDump (ESXi Dump Collector Service)
23
Initial Setup
24
Initial Setup
25
Initial Setup
Just boot an ESXi host???
26
Initial Setup
Get-ExecutionPolicy It should return the following
If it does not return “Unrestricted” then we can set the execution
policy to be “Unrestricted” with the following command.
Let now check what PowerShell Snap-ins are loaded. We do this with
the Get-PSSnapin cmdlet ( command ) At the command prompt type
the following: Get-PSSnapin
27
Initial Setup
The last 3 PSSnap-ins are of interest to us.
VMware.VimAutomation.License - This Windows Powershell snap-in
contains cmdlets for managing License components.
VMware.DeployAutomation - Cmdlets for Rule-Based-Deployment
VMware.ImageBuilder - This Windows PowerShell snap-in contains
VMware ESXi Image Builder cmdlets used to generate custom images .
28
Initial Setup
29
Initial Setup
You
We will
will now
see this
define
list acontinue
rule in which
as it uploads
ESXi 5.0 the
hosts
remaining
will be assigned
drivers
to the
Auto Deploy
an Image
Profile.cache.
New-DeployRule -Name “ForAllHosts” -Item $ip[1] -AllHosts
30
Initial Setup
We
We can
nowsee
need
thetorule
addname
the rule
“ForAllHosts”
to a working
and
ruleSet.
the Image
We use
Profile
the
following
command.
-deployRule
ForAllHosts
that
was used.
To seeAdd-DeployRule
what rules have been
created, we
can use the
following command:
Get-DeployRule
To list the rules in a ruleset Get-DeployRuleSet
31
Initial Setup
Using an Answer File, administrators can configure host-specific settings
to be used in conjunction with the common settings in the Host Profile,
avoiding the need to type in any host-specific parameters.
This feature enables the use of Host Profiles to fully configure a host
during an automated deployment.
Host Profiles now has support for a greatly expanded set of
configurations, including:
Network Settings
iSCSI
FCoE
Native Multipathing
32
Initial Setup
33
Design for Resiliency
© 2009 VMware Inc. All rights reserved
35
vSphere High Availability
vSphere Fault Tolerance
36
37
Troubleshooting
© 2009 VMware Inc. All rights reserved
Troubleshooting Auto Deploy – Services
 The Auto Deploy Service
• Service needs to be set to Automatic and Started
 Auto Deploy also needs to have an available DHCP server,
configured to your environments specification.
 A TFTP server also needs to be installed and configured to enable
PXE boot.
• TFTP server needs to hold the
Boot file
39
Troubleshooting - TFTP
TFTP service stopped?
Firewall? Check TFTP port is open (default 69)
40
Troubleshooting - DHCP
Server NIC connected?
DHCP service stopped?
Incorrect scope / reservations?
Firewall? Check rules / disable
41
Troubleshooting Guides
Documentation: "Troubleshooting Auto Deploy":
http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.install.doc_50/GUID4915B724-500E-4FB3-BAC2-0EA46CFBD7EE.html
KB: "Understanding vSphere Auto Deploy":
http://kb.vmware.com/kb/2005131
KB: "Troubleshooting Auto Deploy" (includes ports & log locations):
http://kb.vmware.com/kb/2000988
42
Upcoming Features
© 2009 VMware Inc. All rights reserved
System Image Caching – Introduction
 New Features in vSphere 5.1
• Stateless Caching – host boots from Auto Deploy, but will fall back to the
cached image in event DHCP/TFTP/Auto Deploy server is not available
• Stateful Install – Host does initial boot from Auto Deploy Server which installs
an ESXi image on the local disk. All subsequent boot are from the ESXi
image saved on local disk
 Support for Local, Remote and USB Disks
 Auto Deploy behaviour configured through Host Profile
44
Auto Deploy - Stateless Caching
 Enable Stateless Caching through Host Profile
45
Questions?
53