You are on page 1of 106

VMware

vSphere

5.0
Evaluation Guide
VolumeOne
T E CH NI C AL WHI T E PAP E R
V 1 . 1 / U P DAT E D AUGUS T 1 1 2 01 1
VMware vSphere 5.0 Evaluation Guide
Volume One
T E C H NI C AL WH I T E PAP E R / 2
Table of Contents
About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Hardware Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Networking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Software and Licensing Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
VMware vSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Guest Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Evaluation Guide Environment Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Server Conguration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Logical Network Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Storage Setup................................................................10
Virtual Machine Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
VMware vSphere 5.0 Evaluation Guide, Volume One Worksheet . . . . . . . . . . . . . . . .11
vSphere Evaluation Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
High Availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Enabling HA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Connect to Virtual Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Go to Cluster Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Edit Cluster Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Wait for Task to Complete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Verifying VMware HA Enablement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
HA Status Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Virtual Machine Protection State. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Host Protection State. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
VMware HA Advanced Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Admission Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Virtual Machine Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Virtual Machine Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Storage Heartbeats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Validating VMware HA Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Host Failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
VMware vSphere 5.0 Evaluation Guide
Volume One
T E C H NI C AL WH I T E PAP E R / 3
Host Isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Disabling VMware HA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Connect to a Virtual Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Go to the Cluster Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Edit Cluster Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Wait for Task to Complete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Getting Familiar with the New Command-Line Interface. . . . . . . . . . . . . . . . . . . . . . . . . . 46
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
The New esxcli Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
esxcli Command-Line Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Remote esxcli Command Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Enabling Access to the ESXi Shell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Enabling the ESXi Shell from the DCUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Enabling the ESXi Shell from the vSphere Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Enabling SSH Access to the ESXi Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Enabling SSH from the DCUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Enabling the SSH from the vSphere Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
vSphere Client Notication When the ESXi Shell and SSH Are Enabled. . . . . . . . .53
Installing the vCLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Installing the vCLI on Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Installing the vCLI on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Installing the vCLI with the vMA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Sample esxcli Commands Run Locally from the ESXi Shell . . . . . . . . . . . . . . . . . . . 54
Sample esxcli Commands Run Remotely from the vCLI . . . . . . . . . . . . . . . . . . . . . . .56
Formatting esxcli Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
The localcli Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Bringing It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
vSphere PowerCLI by Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Install vSphere PowerCLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
Getting Started with vSphere PowerCLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
Connecting to a vSphere Host or vCenter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
Using vSphere PowerCLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
vSphere PowerCLI Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Evaluating the ESXi Firewall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
VMware vSphere 5.0 Evaluation Guide
Volume One
T E C H NI C AL WH I T E PAP E R / 4
Evaluation Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Stopping SSH Service to Prevent Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Testing Access with SSH Service Stopped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
Creating Firewall Rules to Block SSH Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86
Testing SSH Firewall Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Image Builder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Image Builder Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Preparation Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Install vSphere PowerCLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Download the ESXi Ofine Bundle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Extract the ESXi Ofine Bundle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Start an Image Builder vSphere PowerCLI Session. . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Import the ESXi Ofine Bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Display Software Depots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Display VIBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Display Image Proles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Create a New Image Prole. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96
Create a New Image Prole by Manually Selecting Individual VIBs . . . . . . . . . . . . .96
Create a New Image Prole by Cloning an Existing Image Prole. . . . . . . . . . . . . . 98
Removing VIBs from an Image Prole. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Compare Image Proles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Export Image Prole. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Export As an Ofine Bundle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Export As a Bootable ISO Image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Product Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Using Storage Performance Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Monitoring Performance Statistics of a Datastore. . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Help and Support During the Evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
VMware Contact Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Providing Feedback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
T E C H NI C AL WH I T E PAP E R / 5
VMware vSphere 5.0 Evaluation Guide
Volume One
About This Guide
ThepurposeoftheVMware vSphere 5.0 Evaluation Guide, Volume One,istosupportaself-guided,hands-on
evaluationofVMwarevSphere5.0(vSphere)featuresusablebyallVMwarevSpherecustomers.The
companionguide,theVMware vSphere 5.0 Evaluation Guide, Volume Two,isintendedtohighlightvSphere5.0
featuresprimarilytargetedatlarger,morecomplexdeploymentenvironments.
Intended Audience
ThisguideisintendedtocoverevaluationcasesthataresuitableforITprofessionalswhofulllthefollowing
requirements:
TheyunderstandthebasicsofservervirtualizationandwanttoevaluatethefeaturesinvSphereinasmall-
scaledeployment.
TheyhaveanexistingVMwarevirtualizationenvironmentandwanttoevaluatefeaturesinvSpherethatenable
greaterconsolidationwhilemaintainingservicelevels.
System Requirements
Toensurethebestexperiencewhenusingthisguide,theuserwillneedtocongurehardwareandsoftwareas
detailedinthefollowingsection.
HardwareRequirements
Thisguidemakesthefollowingassumptionsaboutyourexistingphysicalinfrastructure:
Servers
YoumusthaveatleastthreededicatedserverscapableofrunningVMwareESXi5.0toprovideresourcesfor
thisevaluation.
1

Storage
Youmusthavesharedstoragewithenoughspaceavailabletoallowthecreationofthree100GBdedicated
datastores.SharedstoragecanbeSANorNAS.ThisdocumentassumesSAN-basedstorage.
Networking
Youmusthaveatleastthreevirtualnetworksconguredtoseparatevirtualmachine,vMotion,andvSphere
management.Thesenetworkscanbesetuponasinglevirtualswitchwithmultipleportgroups,oracross
multiplevirtualswitches.Forthepurposeofthisevaluationguide,thecongurationincludesasinglevSphere
standardswitchwiththreeportgroups.
1. These servers must be on the VMware vSphere 5.0 Hardware Compatibility List (HCL).
T E C H NI C AL WH I T E PAP E R / 6
VMware vSphere 5.0 Evaluation Guide
Volume One
Formoredetailedrequirements,seethefollowingtable.
HARDWARE MI NI MUM WHAT S USED I N THI S
GUI DE
ESXi ThreeESXi/ESXservers
CPUTwoprocessorsof2GHz
Memory6GB
Network2x1GBnetwork
adaptor
ThreeESXiservers(CiscoUCS
1.3.1)
CPUTwoquad-coreNehalem
processorsof2.6GHz
Memory48GB
Network4x10GBnetwork
adaptor
Storage Onedatastore(100GB) Threedatastores(FibreChannel
100GBeach)
Network OneVLANforcarryingvirtual
machinetrafc;oneVLANfor
carryingmanagementtrafc
SeparateVLANsforESXi
management,vMotion,and
virtualmachinetrafc
SoftwareandLicensingRequirements
Thisguidemakesthefollowingassumptionsaboutyourexistingsoftwareinfrastructure:
VMwarevSphere
ThisvolumeoftheVMware vSphere 5.0 Evaluation GuiderequiresvSphere5.0andlicensingforEssentialsPlus.
IftheuserintendstoalsocompletetheexercisesinVolumeTwooftheVMware vSphere 5.0 Evaluation Guide,a
licenseforEnterprisePluswillberequired.ThevSphere5.0evaluationlicenseavailablefromtheVMware
evaluationportalprovidesEnterprisePlusfunctionalityfor60daysandisthebestchoiceforperformingthe
vSphere5.0evaluations.
GuestOperatingSystems
ThisvolumeoftheVMware vSphere 5.0 Evaluation Guidedoesnotplaceanyspecicrequirementsonguest
operatingsystems,otherthanensuringthatyoucandeployrunningvirtualmachines.Theuserisfreetodeploy
anyVMware-supportedoperatingsystem(OS)inthevirtualmachines.TheVMware vSphere 5.0 Evaluation
Guide, Volume Two,willrequireveorsixvirtualmachinesrunningWindows2003orWindows2008.
T E C H NI C AL WH I T E PAP E R / 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Evaluation Guide Environment Setup
TheVMwareTechnicalMarketinglabwasbuiltusingacombinationofCiscoUCSserverhardwareandEMC
CLARiiONCX-4FibreChannel(FC)storage.Theenvironmentconsistedofeightidenticalfour-nodepods,with
mostpodsconguredasathree-nodeESXiclusterandafourthnodeformanagement.Inmanycases,
additionalresourceshavebeenconguredintheTechnicalMarketingtest-bedcongurationtosupportother
evaluationprojects,andarepresentinthediagrams.Theusercancongureonlywhatiscalledforinthe
followingsectionandcansafelyignoreadditionalresourcesinscreenshotsandtopologydiagrams.The
followingpictureshowstheTechnicalMarketingtestrack.
EMC CLARiiON CX4-120
Flare version 4.30.000.5.509
15x 600GB 15k SCSI
5x 200GB SSD
10x open slots
Cisco UCS 1.3.1(p)
32x Dual Quad-Core Nahalem Proccessors
48GB Memory
Dual port Palo cards
1x 146GB Local HDD
Congure with:
4x 10GB network adaptors
2x 4/8GB HBAs
Slot 1 of each chassis reserved for core management

T E C H NI C AL WH I T E PAP E R / 8
VMware vSphere 5.0 Evaluation Guide
Volume One
ServerConguration
TheVMware vSphere 5.0 Evaluation Guidecallsforthreemodernserver-classsystemswithadequateprocessors
andmemorytohost68minimallyconguredvirtualmachinesusedfortesting.Theserversusedforthis
evaluationdonotneedtobeoverlypowerful,justreliableandonthevSphere5.0HCL.
Eachservermusthaveatleast2x1GBor2x10GBnetworkadaptorandproperconnectiontosharedstorage.
Thefollowingdiagramsummarizestheevaluationguidetest-bedconfguration.
3x 100GB FC LUNs, volume
shared across hosts in pod
(used in Evaluation Guide steps)
Linux vCenter Appliance
(VM can reside in cluster or on
external management cluster)
3x ESXi 5.0 hosts
LogicalNetworkSetup
TheVMwarevSphere5.0EvaluationGuide,Volume1,usesaverysimplenetworkcongurationconsistingofthree
logicalnetworks.TherstisforvSpheremanagementtrafc,includingvSphereHighAvailability(VMwareHA).
ThesecondisforVMwarevSpherevMotionandthethirdisforvirtualmachinetrafc.Eachlogicalnetworkis
conguredasaportgrouponastandardswitch,withacorrespondingVLANconguredtoprovidephysical
isolationofthenetworktrafc.

T E C H NI C AL WH I T E PAP E R / 9
VMware vSphere 5.0 Evaluation Guide
Volume One
TM-POD<xx>ESX<xx>
vmnic0
vSwitch0
VMK0: Management network
VLAN 2912
Production02
VLAN 3001 (VM)
vMotion
VLAN 3002 (TBD)
Not used in Evaluation Guide
vmnic1
vmnic2
vmnic3
Port groups
Name/VLAN
OnthevSphereside,thenetworkcongurationlookslikethefollowing:
T E C H NI C AL WH I T E PAP E R / 1 0
VMware vSphere 5.0 Evaluation Guide
Volume One
StorageSetup
TheVMware vSphere 5.0 Evaluation Guide, Volume One,usesastoragecongurationconsistingofthree100GB
FCLUNspresentedtoeachhost,enablingcreationofthreedatastores.
VirtualMachineSetup
TheVMware vSphere 5.0 Evaluators Guide, Volume One,usesatotalofsixtosevenvirtualmachinesfortesting.
ThesecanbeLinuxorWindowsvirtualmachines.Itisuptotheusertocongurevirtualmachinesthatcanbe
broughtuptoarunningstatefortesting.ThefollowingdiagramshowsVM_01throughVM_07conguredinthe
TechnicalMarketingtestlab:

T E C H NI C AL WH I T E PAP E R / 1 1
VMware vSphere 5.0 Evaluation Guide
Volume One
VMwarevSphere5.0EvaluationGuide,VolumeOneWorksheet
Youcanusethefollowingworksheettoorganizeyourevaluationprocess.
HARDWARE CHECKLI ST:
AllhardwarehasbeenvalidatedagainsttheVMware
vSphere 5.0 Hardware Compatibility List (HCL).
Eachserverhas2x1GBor2x10GBnetworkcards
connectedtoacommonswitch(thiswillbecongured
asanetworkadaptorteam).
EachserverhastherequiredHBA/networkadaptorto
accesssharedstorage.
SOFTWARE CHECKLI ST:
VMwarevSphere/VMwareESXiinstallationmediais
available.
VMwarevCenterServerapplianceisdownloaded.
VMwarevSphereClientisinstalled.
ESXihost1hostname.
ESXihost2hostname.
ESXihost3hostname.
Subnet,netmaskanddefaultgatewayformanagement
network.
Subnet,netmaskanddefaultgatewayforvirtual
machinenetwork.
Subnet,netmaskanddefaultgatewayforvMotion
network.
STORAGE CHECKLI ST:
Allserverscanseeatleastthreecommon100GBLUNs
(orNFSexports).
Datastore1name.
Datastore2name.
Datastore3name.
T E C H NI C AL WH I T E PAP E R / 1 2
VMware vSphere 5.0 Evaluation Guide
Volume One
vSphere Evaluation Tasks
HighAvailability
Introduction
Ensuringtheavailabilityofvirtualmachineswithinanenvironmentisofparamountconcerntoadministrators.
VMwareHAalleviatestheseconcernsbyprovidingprotectionfromfailureswithinthefollowingthreekeylayers:
The infrastructure layer
Atthislayer,VMwareHAmonitorsthehealthofthevirtualmachineandwillattempttorestartthevirtual
machinewhenafailure,suchasthelossofaphysicalhost,occurs.ThisprotectionisindependentoftheOS
usedwithinthevirtualmachine.
The OS layer
ThroughtheuseofVMwareToolsinstalledwithintheOS,VMwareHAcanmonitortheOSforproperoperation.
ThisprotectsagainstsuchfailuresasanunresponsiveOS.
The application layer
Withsomecustomizationorwithathird-partytool,anadministratorcanalsomonitortheapplicationrunning
withintheOSforproperoperation.Intheeventofafailureoftheapplication,HAcanbetriggeredtorestart
thevirtualmachinehostingtheapplication.
Inthissection,youwilllearnhowtoenable,congure,andtesttheoperationofHAtoprovidebasichigh
availabilityservicesforyourvirtualmachinesattheinfrastructurelayer.
Prerequisites
Beforecontinuing,itisimportantthattheenvironmentbeconguredproperly.RefertotheSystem
Requirementssectionofthisdocumentandverifythattheenvironmentyouareusingisconguredas
documented.Specicareasofinterestincludethefollowing:
Ensurethatyouhaveaworkingmanagementnetworkwithallhostsintheenvironment.
Verifythatallofthevirtualmachinesareonline.
Haveatleastonevirtualmachinerunningoneachhost.
ValidatethatyouhaveaccesstoVMwarevCenterutilizingthevSphereClient.
EnablingHA
EnablingHAisastraightforwardprocessthatsimplyentailseditingthepropertiesforthecluster.Thefollowing
stepswillguideyouthroughthisprocess.
T E C H NI C AL WH I T E PAP E R / 1 3
VMware vSphere 5.0 Evaluation Guide
Volume One
ConnecttoVirtualServer
Figure 1.ConnectingtoVirtualServer
UsingthevSphereClient,connecttoyourvirtualserverinstance.
T E C H NI C AL WH I T E PAP E R / 1 4
VMware vSphere 5.0 Evaluation Guide
Volume One
GotoClusterSummary
Figure 2.ClusterSummary
Onceconnectedtoyourvirtualserverinstance,selectyourclusterbyclickingonitsnameontheleft-hand
panel.SelecttheSummarytabtobringuptheclustersummaryscreen.
T E C H NI C AL WH I T E PAP E R / 1 5
VMware vSphere 5.0 Evaluation Guide
Volume One
EditClusterSettings
Figure 3. EditingClusterSettings
Intheclustersummaryscreen,selecttheEditSettingsoption.Thiswillbringupawizardthatyoucanuseto
modifythesettingsofthecluster.ClickthecheckboxnexttoTurnOnvSphereHAandselectOK.Thiswillclose
thewizardandthesystemwillinitializeVMwareHA.
Figure 4.InitializingVMwareHA
T E C H NI C AL WH I T E PAP E R / 1 6
VMware vSphere 5.0 Evaluation Guide
Volume One
UndertheRecentTaskspaneofthevSphereClient,youcanobservetheprogressoftheinitializationofHAon
thesystemswithinthecluster.Youllnoticethatthecongurationtasksoccurinparallelamongallthehosts
withinthecluster.
WaitforTasktoComplete
Figure 5.TasksShowingCompletedStatus
WaituntilallthetasksshowaCompletedstatus.Thisshouldonlytakeaminute.Atthispoint,VMwareHAis
nowprovidingprotectionforthevirtualmachinesthatarepoweredon.
VerifyingVMwareHAEnablement
Atthispoint,WMwareHAshouldbeenabledwithinyourcluster.Thissectionwilldemonstrateseveralmethods
youcanusetoverifythatHAisenabled.
HAStatusScreen
Figure 6.CongurationofHA
AfterenablingHA,youwillnoticethatasectionforHAisnowshownundertheclustersummaryscreen.Thiswill
showyougeneralinformationaboutthecongurationofHA.ThereisalsoanoptionforClusterStatushere.
ClickthistobringuptheHAClusterStatusscreen.
T E C H NI C AL WH I T E PAP E R / 1 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 7.VMwareHAClusterStatusScreen
Underthisscreen,youwillnoticethreetabs.ThereisonetabeachforHosts,VMs,andHeartbeatDatastores.
OntheHoststab,youwillseethesystemthatisactingastheMasternode.Youwillalsoseethenumberofhosts
thatarecurrentlyconnectedtothisMaster.Thenumbershownshouldequalthenumberofhoststhatare
containedwithinyoucluster,minusonefortheMaster.
T E C H NI C AL WH I T E PAP E R / 1 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 8.SummaryofVirtualMachineProtectionStates
UndertheVMstab,asummaryofthevirtualmachineprotectionstatesisdisplayed.Thevirtualmachinesthat
werepoweredonwhenVMwareHAwasenabledareintheProtectedstate.
T E C H NI C AL WH I T E PAP E R / 1 9
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 9. HeartbeatDatastoresInformation
ClickingtheHeartbeatDatastorestabwilldisplayinformationaboutthedatastoresthatwereselectedas
heartbeatdatastores.Heartbeatdatastoresallowasecondarymeansofcommunicationbetweenthehostsin
caseofalossofthemanagementnetwork.Byselectingaparticulardatastore,youwilldisplayalistofallthe
hoststhatareusingtheselecteddatastoreasaheartbeatdatastore.
ClickOKtoexittheclusterstatusscreen.
T E C H NI C AL WH I T E PAP E R / 2 0
VMware vSphere 5.0 Evaluation Guide
Volume One
VirtualMachineProtectionState
Figure 10. ViewingtheCurrentVMwareHAProtectionState
AnothermethodyoucanusetoseetheprotectionstateofthevirtualmachineswouldbetoselecttheVirtual
Machinestabforacluster.Right-clickingthetitlebarenablesyoutoselectthevSphereHAProtectioneld.
Oncetheeldisselected,youwillseeacolumnthatdisplaysthecurrentVMwareHAprotectionstateforevery
virtualmachinewithinthecluster.
Figure 11.HAProtectionStateforanIndividualVirtualMachine
YoucanalsoidentifytheHAprotectionstateforanindividualvirtualmachinebyselectingthevirtualmachine
onthenavigationtreeandthenclickingtheSummarytab.
T E C H NI C AL WH I T E PAP E R / 2 1
VMware vSphere 5.0 Evaluation Guide
Volume One
HostProtectionState

Figure 12.ViewingtheVMwareHAStatefortheHost
TheVMwareHAstatecanbeidentiedforanindividualhostbyselectingthedesiredhostfromthenavigation
treeandselectingtheSummarytab.HereyouwillseetheVMwareHAstateforthehostaswellastherolethat
thisnodeplayswithinthecluster.Intheprecedingexample,thehostisthemasternodeforthecluster.
T E C H NI C AL WH I T E PAP E R / 2 2
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 13.DisplayingtheHAStateforAllHostsWithinaCluster
TodisplaytheVMwareHAstateforallofthehostswithinacluster,selecttheclusterfromthenavigationtree
andthenclicktheHoststab.Right-clickthetitlebarandensurethatthevSphereHAStatecolumnisenabled.
VMwareHAAdvancedOptions
VMwareHAprovidesauserwiththeabilitytochangevariousoptionsbasedontheirindividualneeds.This
sectionprovidesanoverviewofthemostcommonlyusedoptions.

Figure 14.EditingSettings
ClickEditSettings.
T E C H NI C AL WH I T E PAP E R / 2 3
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 15.ClusterSettingsWizard
Thisbringsupthewizardthatallowsyoutoedittheclustersettings.OnceVMwareHAisenabled,additional
settingsaredisplayedallowingforthecongurationofVMwareHA.
T E C H NI C AL WH I T E PAP E R / 2 4
VMware vSphere 5.0 Evaluation Guide
Volume One
AdmissionControl

Figure 16.HostMonitoringStatusandAdmissionControlAttributes
Intheclustersettingsdialogbox,selectvSphereHAfromthenavigationtreeontheleft.Thisallowsyoutoedit
theHostMonitoringStatusandAdmissionControlattributes.
HostmonitoringenablesVMwareHAtotakeactionifahostfailstosendheartbeatsoverthemanagement
network.Duringmaintenanceoperationsonthemanagementnetwork,itispossiblethatthehostswillnotbe
abletosendheartbeats.Whenthisoccurs,youshouldunselectthisoptiontopreventVMwareHAfrombelieving
thehostsareisolated.
Admissioncontrolisusedtoensurethatadequateresourceswithintheclusterareavailabletofacilitatefailoverif
needed.Italsoservestoensurethatthevirtualmachinereservationsarerespected.Threeoptionsareavailable
tospecifythedesiredadmissioncontrolpolicy.Theseincludethefollowing:
Host failures
Thisoptionattemptstoreserveenoughcapacitywithintheclustertoprovideforthefailureofanyhostwithin
thecluster.
Percentage
Aswiththehostfailuresoption,thisalsoattemptstoreserveenoughcapacitywithinthecluster.However,this
optionallowsyoutospecifyapercentageofCPUandmemorythatyouwantreserved.
T E C H NI C AL WH I T E PAP E R / 2 5
VMware vSphere 5.0 Evaluation Guide
Volume One
Failover hosts
Alternately,youcanspecifyparticularhostswithintheclusterthatwillbeusedasapreferredtargethostto
startanyvirtualmachinesthatwereprotectedonafailedhost.Intheeventofafailure,vSphereHAwillrst
attempttorestarttheprotectedVMsonthesehostsbeforetryingothers.Additionally,vSphereHAprevents
VMsfrombeingmovedtothesehosts,orpoweredonbytheuserorvSphereDistributedResourceScheduler
(DRS)onthesehosts.
VirtualMachineOptions
Figure 17.DeningtheBehaviorofVirtualMachinesforVMwareHA
SelectVirtualMachineOptionsfromtheleft-handnavigationpane.Here,youcandenethebehaviorofvirtual
machinesforVMwareHA.ThetwosettingsyoucaneditaretheVMrestartpriorityandtheHostIsolationresponse.
T E C H NI C AL WH I T E PAP E R / 2 6
VMware vSphere 5.0 Evaluation Guide
Volume One
TheVMrestartpriorityenablesyoutospecifytheorderthatvirtualmachineswillbestartedintheeventofa
failure.Incaseswheretheremightnotbeenoughresourcesavailablewithintheclustertoaccommodatethe
restartofaseriesofvirtualmachines,thissettingallowsalevelofprioritization,allowingthemostimportant
virtualmachinestoberestartedrst.Noticethatthiscanbesetonapervirtualmachinebasisaswell.
Figure 18. HostIsolationResponse
HostIsolationResponsespeciesthebehaviorthatHAwilltakeintheeventthatahostisdeterminedtobe
isolated.Hostisolationoccurswhenahostlosestheabilitytocommunicatethroughthemanagementnetwork
totheotherhostswithintheenvironmentandisunabletopingitsconguredisolationaddressesthisisthe
defaultgateway.Inthisevent,thehostisstillfunctioning,althoughitisnotabletocommunicate.Thedefault
settingforthisisLeavepoweredon.
T E C H NI C AL WH I T E PAP E R / 2 7
VMware vSphere 5.0 Evaluation Guide
Volume One
VirtualMachineMonitoring

Figure 19.VirtualMachineMonitoring
SelectingVMMonitoringfromtheleft-handnavigationpaneenablesyoutochangesettingsrelatedtothe
monitoringoftheOSorapplicationrunningwithinavirtualmachine.Inordertousethisfeature,youmusthave
VMwareToolsinstalledwithinthevirtualmachine.
T E C H NI C AL WH I T E PAP E R / 2 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 20.SelectingCustomOptionforVMMonitoring
ByselectingtheCustomoption,youcanexertanelevelofcontroloverthevariousparametersinvolved.You
canspecifythesesettingsonapervirtualmachinebasis.
T E C H NI C AL WH I T E PAP E R / 2 9
VMware vSphere 5.0 Evaluation Guide
Volume One
StorageHeartbeats
Figure 21.DatastoreHeartbeatingWindow
Storageheartbeatsprovideasecondarycommunicationpathintheeventofafailureofthemanagement
network.Thisisadvantageous,becauseitprovidesanotherlevelofredundancyandallowsforthedetermination
offailurebetweenanetworkandahostfailure.Bydefault,twodatastoreswillbechosenbasedonthe
connectivitytheyhavetootherhostsandthetypeofstorage.Thisattemptstoprovideprotectionagainstarray
failuresandallowsforthehighestnumberofhoststoutilizetheheartbeatdatastore.Thedatastoresutilizedcan
bemanuallyspeciedifdesired.
ValidatingVMwareHAOperation
InordertoseeVMwareHAinaction,weneedtoinjectfaultsintotheenvironment.Thissectionwilldemonstrate
thewaysinwhichtodothisforthemostcommonfailurecases,sothatyoucanvalidatetheoperationof
VMwareHAandcantestwaystorecoverfromafailure.
HostFailure
Themostcommonfailurecaseinvolvesthefailureofaphysicalhost.Thiscanbeforavarietyofreasons,suchas
alossofpowertothehostoramotherboardfailure.
T E C H NI C AL WH I T E PAP E R / 3 0
VMware vSphere 5.0 Evaluation Guide
Volume One
Whenthiseventoccurs,VMwareHAwillidentifythefailureofthehostandwillattempttorestarttheprotected
virtualmachinesonafunctionalhost.

Figure 22.CheckingVirtualMachines
First,usethevSphereClienttoexaminethevirtualmachineshostedwithinthecluster.Inthisexample,weare
goingtocausethesystemtm-pod1-esx01.tmsb.localtofail.Youneedtocheckthevirtualmachinesinyour
environmentandensurethatatleastoneisonlineonthehostthatyouaregoingtofail.

Figure 23.RemovingPowerfromaHost
T E C H NI C AL WH I T E PAP E R / 3 1
VMware vSphere 5.0 Evaluation Guide
Volume One
Next,removethepowerfromoneofyourhosts.Bylookingatthehostswithinthecluster,youwillseethat
VMwareHAwilldetectthefailureofthehostandgenerateanalert.

Figure 24.FailureDetectionbyVMwareHA
Byexaminingtheevents,youwillseemessagessimilartotheonesdemonstratedintheprecedinggure
validatingthatVMwareHAhasdetectedthefailure.
Figure 25.VirtualMachineViewofaClusterAfterRestartAttempt
Afterafailureofahosthasbeendetected,HAwillattempttorestartthevirtualmachinesthatwererunningon
thefailedhostonotheravailablehostswithinthecluster.Gobacktothevirtualmachineviewofyourclusterand
noticethatthevirtualmachinesthatwerepreviouslyonthefailedhostarenowonlineonotherhosts.
T E C H NI C AL WH I T E PAP E R / 3 2
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 26.ViewingLogMessagesAfterRestartAttempt
YoucanalsoexaminetheeventsforahosttoseethelogmessagesdenotingthatVMwareHAhasattemptedto
restartthevirtualmachine.
T E C H NI C AL WH I T E PAP E R / 3 3
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 27.SummaryofaFailedHost
ByselectingtheSummarytabforthefailedhost,youwillnoticethattheissueisdisplayedinmultipleplaces.
TherstislocatedatthetopofthescreenandsecondlocationisthevSphereHAState.
Atthispoint,youwillreapplypowertothefailedhostandallowittoboot.Onceitcompletesthisprocess,you
willseethatitrejoinstheclusterandcontinuestofunctionasbefore.
T E C H NI C AL WH I T E PAP E R / 3 4
VMware vSphere 5.0 Evaluation Guide
Volume One
HostIsolation
Hostisolationoccurswhenahostlosestheabilitytocommunicatetootherhostswithintheclusterthroughthe
managementnetwork,andalsolosestheabilitytopingthedefaultisolationaddress.Thefollowingwill
demonstratehowtocreatethissituationandinducethedefaultactionsthatwillbetakenbyVMwareHA.

Figure 28.IdentifyingaHosttoBeIsolated
First,youwanttoidentifyahostthatwillbeisolated.Forthisexample,hosttm-pod01-esx03.tmsb.localhas
beenchosen.Youcanverifythatitiscurrentlyactingasaslavewithinthecluster.
Figure 29.IdentifyingVirtualMachinesontm-pod01-esx03.tmsb.local
Nowidentifythevirtualmachinesthatarecurrentlyonlineonthishost.Thesearethevirtualmachinesthatwill
beafectedbytheisolationresponseperformedafterthefaultisinserted.
T E C H NI C AL WH I T E PAP E R / 3 5
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 30.ObtainingConsoleAccesstotheTargetHost
Toinsertafaultwithintheenvironment,youneedtoobtainconsoleaccesstothetargethost.Thiswillallowyou
tocontinuetoaccessthehostafterthefaulthasbeeninserted,allowingyoutorecovergracefullyafterwards.It
isimportanttonotethatthisprocedurerequirestwonetworksoneforconsoleaccessandanotherforthose
afectedbythetest.RefertotheSystemRequirementssectionformoreinformationonthenetwork
congurationused.
T E C H NI C AL WH I T E PAP E R / 3 6
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 31.AuthenticatingtotheHost
Attheconsole,hitF2toaccesstheconsolemenu.Youwillneedtoauthenticatetothehostrstbeforeitwill
allowaccesstotheconsolemenu.
Figure 32.SelectingTroubleshootingOptions
Onceyoureloggedin,selecttheTroubleshootingOptionsmenuitem.
T E C H NI C AL WH I T E PAP E R / 3 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 33. EnablingESXiShell
Fromhere,selecttheEnableESXiShelloptiontoenabletheESXiShell.Thisshellwillenableyoutoremovethe
networkconnectionstothehost.

Figure 34.vSphereClientWarningMessage
Onceyoudothis,youwillnoticethatthevSphereClientdisplaysawarningmessage.
Figure 35.AccessingtheESXiShell
AttheESXiconsoleforthehost,hitAlt-F1toaccesstheESXiShell.Logintotheshellusingtheusernameand
passwordspeciedforthehost.
T E C H NI C AL WH I T E PAP E R / 3 8
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 36.Usingtheesxcfg-vswitchCommand
Inordertodisruptthenetworkconnectiontothehost,youcanusetheesxcfg-vswitchcommand.Usingesxcfg-
vswitchl,obtainalistoftheuplinksthatarepresentonthehost.Inthisexample,therearetwovmnic0and
vmnic1thatcanbeidentiedonvSwitch0.
Usethecommandesxcfg-vswitchU<uplink><switch>,whereuplinkisanidentieduplinkandswitchisthe
nameoftheswitchtheuplinkisconnectedto,inordertoremovetheuplinksfromthevirtualswitch.Ensurethat
youdothisforalloftheuplinkspreviouslyidentied.Oncecompleted,verifythatalloftheuplinkshavebeen
removedbyusingtheesxcfg-vswitchlcommandagain.
T E C H NI C AL WH I T E PAP E R / 3 9
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 37.IdentifyingHostIsolation
UsingthevSphereClient,selectthehostfromtheleft-handnavigationpaneandselecttheSummarytab.The
hostwillbeidentiedasbeingisolatedbothatthetopofthescreenandinthevSphereHAStatenotication.
T E C H NI C AL WH I T E PAP E R / 4 0
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 38.LogMessagesAboutHostIsolation
MovingtotheTasks&Eventstab,youwillalsoseethelogmessagesthatweregeneratedwhenVMwareHA
detectedthehostisolation.
Figure 39. ObservingtheVirtualMachinesontheIsolatedHost
ExaminetheoutputoftheVirtualMachinestabofthecluster.Observethatthevirtualmachinesonthe
isolatedhostarenowshowningray.Youllalsoobservethatthevirtualmachinesdidnotgetrestartedon
anotherhost.ThisisduetothefactthatthedefaultsettingfortheisolationresponseisLeavePoweredOn.
Withthisasthesettingfortheisolationresponse,thevirtualmachineswillcontinuetorunontheisolated
host.Inthisscenario,settingtheisolationresponsetoShutdownwouldcausethevirtualmachinesto
gracefullyshutdown,thenrestart.
T E C H NI C AL WH I T E PAP E R / 4 1
VMware vSphere 5.0 Evaluation Guide
Volume One
Ifyouwouldliketoseetheefectsofthevariousisolationresponsesettingsinthissituation,simplychangethe
isolationresponsetothedesiredsettingandperformthistestagain.
Figure 40. RestoringUplinksfortheHostwiththeesxcfg-vswitchlCommand
Torestorenormaloperation,utilizetheESXiShelltoexecutetheesxcfg-vswitch-lcommandforeachofthe
uplinksthatwerepreviouslyremoved.Usetheesxcfg-vswitchlcommandtoverifythattheuplinkshave
beenrestored.
LogoutoftheESXiShellbytypingexitattheprompt.UseAlt-F1toreturntotheconsolescreen.

T E C H NI C AL WH I T E PAP E R / 4 2
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 41. ExaminingEventsfortheHost
Onceyourestoretheuplinksforthehost,youcanutilizethevSphereClienttoexaminetheeventsforthehost.
Thiswillshowyouthatcommunicationwiththeotherhostsintheclusterhasbeenre-established.
Evenafteryouhavere-establishedthenetworkconnections,youllnoticethatthehoststilldisplaysawarning.
ThiswarningisduetothefactthattheESXiShellisstillenabled.
Figure 42. DisablingESXiShellAccess
Usingtheconsole,selectDisableESXiShellundertheTroubleshootingModeOptionsscreentodisableESXi
Shellaccess.
T E C H NI C AL WH I T E PAP E R / 4 3
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 43.VerifyingThatHostisOperatingNormally
UsethevSphereClienttoshowallofthehostswithintheclusterandverifythatthepreviouslyisolatedhostis
nowoperatingnormallyandhasreconnectedtothecluster.
DisablingVMwareHA
AswiththeenablingofHA,disablingHAisasimple,straightforwardprocess.Thissectionwillwalkyouthrough
therequiredstepsbeforecontinuingontothenexttopic.
ConnecttoaVirtualServer

Figure 44. ConnectingtoaVirtualServerInstance


UsingthevSphereClient,connecttoyourvirtualserverinstance.
T E C H NI C AL WH I T E PAP E R / 4 4
VMware vSphere 5.0 Evaluation Guide
Volume One
GototheClusterSummary
Figure 45.ClusterSummaryScreen
Onceconnectedtoyourvirtualserverinstance,selectyourclusterbyclickingitsnameontheleft-handpanel.
SelecttheSummarytabtobringuptheclustersummaryscreen.
T E C H NI C AL WH I T E PAP E R / 4 5
VMware vSphere 5.0 Evaluation Guide
Volume One
EditClusterSettings

Figure 46.ClusterSettingsWizard
Intheclustersummaryscreen,selecttheEditSettingsoption.Thiswillbringupawizardthatyoucanuseto
modifythesettingsofthecluster.ClickthecheckboxnexttoTurnOnvSphereHAtodeselectitandselectOK.
ThiswillclosethewizardandthesystemwillunconfgureVMwareHA.
Figure 47.ViewingtheProgressoftheUncongureTaskofVMwareHA
UndertheRecentTaskspaneofthevSphereClient,youcanobservetheprogressoftheunconguretaskofHA
onthesystemswithinthecluster.
T E C H NI C AL WH I T E PAP E R / 4 6
VMware vSphere 5.0 Evaluation Guide
Volume One
WaitforTasktoComplete

Figure 48.UncongureTasksCompleted
WaituntilalltheunconguretasksshowaCompletedstatus.
Getting Familiar with the New Command-Line
Interface
Introduction
vSpheresupportsseveralcommand-lineinterfacesformanagingyourvirtualinfrastructure,includingthe
VMwarevSphereCommand-LineInterface(vCLI),asetofESXiShellcommands,andVMwarevSphere
PowerCLI.YoucanchoosetheCLIsetbestsuitedtoyourneeds.Thefollowingtableprovidesasummaryof
thecommand-linetoolsavailableinvSphere5.0.
COMMANDS STATE I N 5. 0 AVAI LABI LI TY
esxclicommands NewinvSphere5.0 AvailablefromtheESXiShellandthevCLI
Usedforlocalandremoteadministration
UsedtomanagemostaspectsofvSphere
vicfg-commands Minorchangesin
vSphere5.0
AvailablefromthevCLIonly
Usedforremoteadministrationonly
Augmentstheesxclicommandstomanage
aspectsnotyetcoveredbyesxcli
Othercommands
(vmware-cmd,vifs)
Minorchangesin
vSphere5.0
AvailablefromthevCLIonly
Usedforremoteadministrationonly
AdditionalPerlcommandsusedtomanage
aspectsnotcoveredwithesxcliorvicfg-
vSpherePowerCLI Minorchangesandupdates
invSphere5.0
vSpherePowerCLI
Usedforremoteadministrationonly
UsedtoadministerESXihostsfromWindows
systems
Table 1. SummaryofvSphere5.0Command-LineTools
ThissectionoftheVMware vSphere 5.0 Evaluation Guide, Volume One,coversthenewesxclicommand-line
interface.TheesxclicommandallowsyoutomanagemanyaspectsofanESXihost.Youcanrunesxcli
commandsremotelyfromthevCLIorlocallyfromtheESXiShell.
NOTE:TheESXiShellisintendedforadvancedusers,becauseevenminormistakesintheshellcanresultin
seriousproblems.UsersshouldusethevCLIforroutineCLIadministrationandonlyfallbackontheESXiShell
whennecessary.ItisrecommendedthatuseoftheESXiShellbelimitedtosituationswhenyouareworking
underthedirectionoftheVMwareTechnicalSupportstaf.
T E C H NI C AL WH I T E PAP E R / 47
VMware vSphere 5.0 Evaluation Guide
Volume One
TheNewesxcliCommand
Forthersttime,thenewesxclicommandisuniedforbothlocalandremotecommand-lineadministration.In
addition,theesxclicommandhasbeenenhancedtoperformmanytaskspreviouslyonlyperformedwiththe
vicfg-commands.However,itdoesnotyetperformallthetasks.Whenperformingcongurationtasksfrom
thecommandline,theesxclicommandisthepreferredcommand.Onlyfallbacktothevicfg-andothervCLI
commandswhenthereisnoesxclicommandavailable.Movingforward,allthevCLIcommandsarescheduledto
bereplacedbyesxclicommands.
NOTE:InvSphere5.0,theesxclicommanddoesnotyetprovideafullsetofcommandcapabilities.Continueto
usetheesxclicommandinconjunctionwiththevicfg-andothervCLIcommands(thatis,vmware-cmd,
vmkfstools,andvifs).TheesxclicommandinvSphere5.0isnotbackwardcompatiblewithearlierversionsof
thecommand,becauseitintroducesanewsyntaxthatisdiferentfromearliervSpherereleases.
esxcliCommand-LineSyntax
Theesxclicommandismadeupofahierarchyofnamespaces.Ateachlevelofthehierarchythereareadditional
namespacesandcommands.Thisprovidesforauser-friendlyCLIinterfacethatallowsfortheeasydiscoveryof
thecommandsyntax.
Figure 49.esxcliNamespaceHierarchy
TheprecedinggureprovidesagraphicillustrationofthecommandtoquerytheESXirewall.Theuserinvokes
theesxcli commandwiththenetworknamespace,thefrewallsub-namespace,andthegetcommand.
Thefollowingisanexampleofthiscommand:
Figure 50. esxclinetworkrewallgetCommand
T E C H NI C AL WH I T E PAP E R / 4 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Atanytime,youcanusethe--helpoptiontodiscoverinformationabouttheavailablenamespacesand
commandsrelativetoyourcurrentnamespace.Inthefollowingexample,the--helpparameterisusedtoget
moreinformationabouttheavailablenamespacesandcommandsunderthenetworknamespace:
Figure 51.Usingthe--helpParametertoGetInformationAboutNamespacesandCommands
Everyesxclicommandiscomprisedoftheesxclicommandfollowed,ifneeded,byoneormoreoptions,
followedbyoneormorenamespaces,followedbythecommandtobeexecutedalongwithanycommand
options.Thefollowingscreenshotshowstheesxcliusagescreen:
Figure 52.esxclihelpExample
T E C H NI C AL WH I T E PAP E R / 4 9
VMware vSphere 5.0 Evaluation Guide
Volume One
Althoughtheesxclicommandisuniedforbothlocalandremoteadministration,thesyntaxdoesvaryslightly,
dependinguponifyouarerunningcommandslocallyfromtheESXiShellorremotelythroughthevCLI.
WhenrunningesxclicommandslocallyfromtheESXiShell,thetargethostisalwaysthelocalhostonwhich
thecommandisrun.Inaddition,thelogincredentialsarealwaysassumedtobethoseofthelogged-inuser.
Whenrunningtheesxclicommandsremotely,youmustspecifythetargetESXihost(orVMwarevCenter
Server),alongwiththeusercredentialsusedtoexecutethecommand.
RemoteesxcliCommandAuthentication
Whenrunningesxclicommandsremotely,youmustspecifyatargetESXihostorvCenterserverandprovidethe
usercredentialsforthecommand.Thefollowingaremethodsavailabletoperformuserauthentication:
Usingcommand-lineoptions
Usingasessionfle
Usingenvironmentvariables
Usingaconfgurationfle
UsingMicrosoftWindows--passthroughauth
UsingVMwarevSphereManagementAssistant(vMA)vi-fastpass
DetailsforeachmethodaredocumentedintheGetting Started with vSphere Command-Line Interfacesguide.
Thefollowingexamplesillustratethediferentsyntaxrequiredwhenrunningtheesxcli hardware
platform get commandfromthelocalESXiShell,comparedtorunningitremotelyfromthevCLI.Youmust
addthe--server and--useroptionswhenrunningthecommandremotely,inadditiontobeingpromptedto
enterthepassword.
Figure 53. SampleesxcliCommandRunfromESXiShell
Figure 54.SampleesxcliCommandRunRemotelyfromvMA

T E C H NI C AL WH I T E PAP E R / 5 0
VMware vSphere 5.0 Evaluation Guide
Volume One
EnablingAccesstotheESXiShell
Beforeyoucanrunesxclicommandsonthehost,youmustenabletheESXiShell.Completethestepsinthis
sectiontoenabletheESXiShelloneachESXihost.
EnablingtheESXiShellfromtheDCUI
PerformthefollowingstepsinordertoenabletheESXiShellwhileloggedintotheDCUI:
LogintotheESXihostDCUI.
SelectTroubleshootingModeOptions.
SelectEnableESXiShellandpressreturn.
PressAlt-F1toaccesstheESXiShell.
Figure 55. EnableESXiShellfromDCUI
EnablingtheESXiShellfromthevSphereClient
PerformthefollowingstepstoenabletheESXiShellwhileloggedintothevSphereClient:
LogintothevSphereClient.
SelecttheESXihostandchooseConfguration->SecurityProfle.
FromtheServicessection,selectProperties.
SelecttheESXiShelloptionandchooseOptions.
SelectStarttostarttheESXiShell,enablinglocalaccesstotheESXiShell.
T E C H NI C AL WH I T E PAP E R / 5 1
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 56.EnableESXiShellfromvSphereClient
EnablingSSHAccesstotheESXiShell
InadditiontorunningcommandsdirectlyfromtheESXiconsole,youcanalsoenableSSHservicestoallow
remoteaccesstotheESXiShell.ThefollowingsectionshowshowtoenableSSHaccesstotheESXiShell.
EnablingSSHfromtheDCUI
PerformthefollowingstepstoenabletheESXiShellfromtheDCUI:
LogintotheESXihostDCUI.
SelectTroubleshootingOptions.
SelectEnableESXiShellandpressreturn.
PressAlt-F1toaccesstheESXiShell.
T E C H NI C AL WH I T E PAP E R / 5 2
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 57.EnableSSHfromDCUI
EnablingtheSSHfromthevSphereClient
PerformthefollowingstepstoenabletheESXiShellfromthevSphereClient:
LogintothevSphereClient.
SelecttheESXihostandchooseConfguration->SecurityProfle.
FromtheServicessection,selectProperties.
SelecttheSSHoptionandchooseOptions.
SelectStarttostartSSHonthehost.
Figure 58.EnableSSHfromvSphereClient
T E C H NI C AL WH I T E PAP E R / 5 3
VMware vSphere 5.0 Evaluation Guide
Volume One
vSphereClientNoticationWhentheESXiShellandSSHAreEnabled
AnytimetheESXiShellorSSHisenabledonahost,thevSphereClientwillshowawarningonthehost
summarypageservingasaremindertodisabletheaccesswhenitisnolongerneeded.
Figure 59. NoticationThattheESXiShellHasBeenEnabled
InstallingthevCLI
ThevCLIisavailableonMicrosoftWindows,Linux,andwiththevMAvirtualappliance.
InstallingthevCLIonWindows
ThevCLIinstallationpackageforWindowsincludestheActivePerlruntimeenvironment,alongwiththerequired
Perlmodulesandlibraries.ThevCLIissupportedonthefollowingWindowsplatforms:
MicrosoftWindowsVistaEnterpriseSP132-bitand64-bit
MicrosoftWindows200864-bit
MicrosoftWindows732-bitand64-bit
ToinstallthevCLIonWindows,downloadthevCLIinstallerpackageforWindowsonasupportedWindows
serverandlaunchtheinstaller.RefertoChapter2oftheGetting Started with vSphere Command-Line Interfaces
guideforinformationonhowtoinstallthevCLIonaWindowsserver.
InstallingthevCLIonLinux
ThevCLIinstallationpackageforLinuxincludesthevCLIscriptsandtheVMwarevSphere5.0SDKforPerl.In
canbeinstalledontheRedHatEnterpriseLinux5.5server,SUSELinuxEnterprise10and11servers,andthe
Ubunto10.04server.DownloadthevCLIpackageforyourLinuxdistributionandruntheinstallationscript.Refer
toChapter2oftheGetting Started with vSphere Command-Line Interfacesguideforinformationonhowto
installthevCLIonaLinuxserver.
InstallingthevCLIwiththevMA
ThevMAincludesaLinuxenvironment,thevCLI,andotherprepackagedsoftware.ToinstallthevCLIwiththe
vMA,simplydeploythevMAandlogintotheconsoletoconguretheappliance.RefertoChapter2ofthe
Getting Started with vSphere Command-Line Interfaces guideforinformationonhowtoinstallandcongure
thevMA.
T E C H NI C AL WH I T E PAP E R / 5 4
VMware vSphere 5.0 Evaluation Guide
Volume One
SampleesxcliCommandsRunLocallyfromtheESXiShell
ThefollowingexamplesshowesxclicommandsexecutedfromthelocalESXiShell.Becausetheyarebeingrun
fromtheESXiShell,itisnotnecessarytoprovidetheserverinformationorusercredentialswiththecommand.
Usetheesxcli system hostname set --host tm-pod01-esx01 --domain tmsb.local
commandtosetthehostnameanddomainnameoftheESXihost.Thenusetheesxcli system hostname
get commandtodisplaythehostnameanddomainnameandverifythechange.

Figure 60.SetESXiHostNameandDomainNamefromtheESXiShell
Usetheesxcli system syslog confg getcommandtodisplaytheESXihostsyslogconguration,
asfollows:
Figure 61.DisplayHostSyslogSettingsfromtheESXiShell
Usetheesxcli storage core device list commandtolistallthestoragedevicesontheESXihost,
asfollows:
T E C H NI C AL WH I T E PAP E R / 5 5
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 62. DisplayStorageDevicesfromtheESXiShell
Usetheesxcli network ip interface ipv4 getcommandtolistalltheconguredIPv4addresseson
theESXihost,asfollows:
Figure 63.DisplayConguredIPsfromtheESXiShell
T E C H NI C AL WH I T E PAP E R / 5 6
VMware vSphere 5.0 Evaluation Guide
Volume One
SampleesxcliCommandsRunRemotelyfromthevCLI
ThefollowingexamplesshowmethodsforusingesxclifromthevCLI.Fortheseexamples,wewillusethevMA.
Becausethesecommandsarebeingrunremotely,itisnecessarytoprovidethe--server and--username
credentialsaspartoftheesxclicommand.
Usetheesxcli --server tm-pod01-esx01 hardware memory get commandtodisplaytheamount
ofmemoryontheESXihosts.Hereweprovidethe--serveroption,butletitpromptfortheusernameand
password,asfollows:
Figure 64. esxclihardwarememorygetCommandfromvMA
Usetheesxcli --server tm-pod01-esx01 --user root storage core adapter list
commandtolisttheavailablestorageadaptersonyourhost.Hereweprovidethe--server and--user
options,butletitpromptforthepassword,asfollows:
Figure 65.esxclistoragecoreadapterlistCommandfromvMA
Inthisexample,weusethevMAvi-fastpassauthentication,makingitpossibletorunesxclicommandswithout
providingtheserver,username,orpasswordoptionsonthecommandline.
StartbysettingupthevMAfastpassaccess,asfollows:
Figure 66. SettingupvMAFastPass

T E C H NI C AL WH I T E PAP E R / 5 7
VMware vSphere 5.0 Evaluation Guide
Volume One
WiththefastpasstargetsettoourESXihost,wecannowrunthecommandswithoutspecifyingtheoptionsfor
theESXihost,username,orpassword.Inthefollowingexample,weusetheesxcli system coredump
partition listcommandtoshowtheconguredcoredumppartition:
Figure 67.DisplaycoredumppartitionlistfromvMA
Inthefollowingexample,wewillconnecttothevCenterServerratherthanconnectingdirectlytotheESXihost.
WewillsettheESXiShelltimeoutvalueto300seconds.
Figure 68.SetESXiShellTimeOut
WecanverifythechangebydisplayingthenewvalueoftheESXiShellTimeout,asfollows:
Figure 69. DisplayESXiShellTimeOut
T E C H NI C AL WH I T E PAP E R / 5 8
VMware vSphere 5.0 Evaluation Guide
Volume One
FormattingesxcliOutput
Itiscommontousetheoutputoftheesxclicommandasinputtoanotherprogramorforinclusioninareport.To
facilitatethis,theesxclicommandenablesyoutoformatandlterthecommandoutputinoneofthreeformats:
comma-separatedvalues(CSV),key-valuepair,orXML.Inaddition,youcanspecifywhicheldstoincludeinthe
output.
Inthefollowingexample,weneedtogenerateareportshowingalltheconguredinterfacesonahostalong
withthevSwitchandportgrouptowhichtheyareassigned.Westartbyrunningtheesxclinetwork ip
interface listcommand,asfollows:
Figure 70.esxclinetworkipinterfacelistCommandfromtheESXiShell
Theoutputgivesustheinformationweneed,butitisveryverbose,requiringtheusertousethescrollbartosee
thedataforalltheinterfaces.Becauseweneedonlyasummaryshowingtheinterfacename,vSwitch,andport
group,wecanreneourcommandusingthe--formatterand--format-paramoptions,asfollows:
T E C H NI C AL WH I T E PAP E R / 5 9
VMware vSphere 5.0 Evaluation Guide
Volume One


Figure 71.esxcliCommandwithformatterOptionfromtheESXiShell
Nowwehaveashortlistgivingusjusttheinformationweneed.
ThelocalcliCommand
TheesxclicommandtalkstotheESXihoststhroughthehostdservice.Inrarecircumstances,whenthe
hostdservicemightnotberesponding,thelocalclicommandcanbeused.Thelocalclicommandis
equivalenttoesxcliwiththeexceptionthatitbypasseshostd.Thelocalclicommandisonlyintendedfor
situationswhenhostdisunavailableandcannotberestarted.Afteryourunthelocalclicommand,you
mustrestarthostd.Runesxclicommandsaftertherestart.
NOTE:Usethelocalcli commandonlyunderthedirectionofVMwaretechnicalsupport,becauseimproper
usecanresultinaninconsistentsystemstateandpotentialfailureoftheESXihost.
Thefollowingexampleshowstheuseofthelocalclicommandtodisplayallnetworkadaptorsonahost:
Figure 72.localcliCommandExample
T E C H NI C AL WH I T E PAP E R / 6 0
VMware vSphere 5.0 Evaluation Guide
Volume One
BringingItAllTogether
ThefollowingexampleshowshowtogeneratealistoftheVMFSlesystemsonanESXihostthathavenotbeen
upgradedtoVMFS-5.Inthisexample,wewilldemonstratethesyntaxdiscoveryfeatureofesxcli.
Startbylookingatthenamespacesavailableunderthestoragenamespacebyrunningtheesxcli storage
--help command,asfollows:
Figure 73.esxcliNamespacesUnderStoragefromESXiShell
Weseeherethatthereisaflesystem namespace.Next,welooktoseewhatnamespacesandcommands
areavailableundertheesxcli storage flesystem namespacebyrunningtheesxcli storage
flesystem --helpcommand,asfollows:
Figure 74.esxcliNamespacesUnderStorageFilesystemfromESXiShell
Weseethatthereisalistcommandundertheflesystemnamespacethatwilllistallthevolumesonthe
hostalongwiththeVMFSinformation.Wenowrunthenalcommand,esxcli storage flesystem
list,asfollows:
T E C H NI C AL WH I T E PAP E R / 6 1
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 75.esxclistoragelesystemlistCommandfromESXiShell
Thiscommandgivesuswhatweneed.However,thereisalotofextrainformationintheoutput,makingithard
toextrapolatetheVMFSversioninformationneededforourreport.Wecanusethe--formatteroptionwith
the--format-paramltertoshowonlytheinformationweneed,asfollows:

Figure 76.esxclistoragelesystemlistwithFormattingCommandfromESXiShell
WenowhavealistshowingallthelesystemsontheESXihost,alongwiththecorrespondingVMFSversions.
FromthiswecaneasilyidentifythoselesystemsthathavenotbeenupgradedtoVMFS-5.
T E C H NI C AL WH I T E PAP E R / 6 2
VMware vSphere 5.0 Evaluation Guide
Volume One
vSpherePowerCLIbyExample
Introduction
vSpherePowerCLIisasnap-in(add-on)toMicrosoftWindowsPowerShell,acommand-linescripting
environmentdesignedforWindows.Itleveragesthe.NETobjectmodel,andwasdesignedasanadministrative
languagewithsystemadministratorsinmind,becauseitprovidesadministratorswitheasy-to-learn
managementandautomationcapabilities.vSpherePowerCLIaddsover200cmdlets(commands)tonative
PowerShellcommands,enablingthemanagementofthevSphereenvironment.
Prerequisites
vSpherePowerCLIistypicallyinstalledonavSphereadministratorsMicrosoftWindowsbaseddesktopsystem.
InordertosupporttheinstallationofvSpherePowerCLItoadesktopsystem,thefollowingprerequisitesoftware
packagesmustbepresent:
Windows.NETFramework3.5
WindowsPowerShell(V2recommended)
WindowsPowerShellV2isintegratedwithWindows7andWindows2008R2.Previousoperatingsystems,such
asWindowsXP,WindowsVista,Windows2008(notR2),andWindows2003,arecompatiblewithWindows
PowerShell.ThismustberstdownloadedandinstalledfromthefollowingWebsite:http://support.microsoft.
com/kb/968929
InstallvSpherePowerCLI
Aftercheckingthatallprerequisitesareinstalled,youmustsettheexecutionpolicyofPowerShelltoenableitto
runscripts.Bydefault,PowerShellisinstalledinsecuremode,whichwilldisabletherunningofscriptswithin
PowerShell.Tochangetheexecutionpolicy,startaPowerShellsessionwithadministratorprivileges,asfollows:
Figure 77.StartingPowerShellSession
T E C H NI C AL WH I T E PAP E R / 6 3
VMware vSphere 5.0 Evaluation Guide
Volume One
FromtheWindowsstartmenu,typePowerShell.OncethePowerShellprogramisdisplayedonthestartmenu,
right-clickWindowsPowerShellandselectRunasadministrator.
APowerShellpromptwillbestarted,asfollows:

Figure 78.SettingExecutionPolicy
ItisrecommendedthatyoureadmoreaboutPowerShellsdiferentexecutionpoliciestondoutmore
informationaboutthese,andensurethatyouchangethistothecorrectsettingforyourorganization.Enter
get-helpabout_Execution_PoliciesatthePowerShellprompt.
Inthisguide,wewillchangetheexecutionpolicytoRemoteSigned.
FromthePowerShellprompt,enterSet-ExecutionPolicyRemoteSigned.
Figure 79.InformationAboutExecutionPolicies
Youwillthenreceiveinformationaboutexecutionpoliciesandapromptaskingyoutoconrmyouraction
beforechangingtheexecutionpolicy.EnterYatthepromptandpressEnter.
YouwillthenbereturnedtothePowerShellpromptwiththechangebeingcompleted.TypeExitandpress
EntertoleavethePowerShellprompt.
YouarenowreadytoinstallvSpherePowerCLI.
T E C H NI C AL WH I T E PAP E R / 6 4
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 80.vSpherePowerCLIDownloadScreen
DownloadthevSpherePowerCLIsoftwaretoyourworkstationfromthefollowingURL:http://vmware.com/go/
PowerCLI
Oncethesoftwarehasbeendownloaded,starttheinstallationbydouble-clickingthevSpherePowerCLI.exele.
Figure 81. NoticationofVMwareVIXInstallation
Theinstallerwillrstnotifyyouthatanadditionalcomponent,VMwareVIX,willbeinstalledaspartofthe
vSpherePowerCLIinstallation.ClickOK.
T E C H NI C AL WH I T E PAP E R / 6 5
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 82.RecommendationtoSetExecutionPolicyCorrectly
Ifyouhavenotyetsetyourexecutionpolicycorrectly,aninformationboxwillappearadvisingyouthatthiswill
needtobesettoRemoteSignedbeforevSpherePowerCLIwillexecutecorrectly.ClicktheContinuebutton.
Iftheexecutionpolicyissetcorrectlythisboxwillnotappear.
Thiswillbringyoutothefollowingwelcomescreen:
Figure 83. WelcomeScreen
Thewelcomescreenwillnowbeshown,welcomingyoutotheinstallwizardforvSpherePowerCLI.ClickNext
tocontinue.
ThiswillbringyoutothefollowingVMwarePatentsscreen:
T E C H NI C AL WH I T E PAP E R / 6 6
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 84.VMwarePatentsScreen
ClickNexttocontinue.ThiswillbringyoutothefollowingLicense Agreement screen:

Figure 85.LicenseAgreementScreen
Selecttheoption,IacceptthetermsinthelicenseagreementandthenclickNexttocontinue.
ThiswillbringyoutothefollowingDestinationFolderscreen:
T E C H NI C AL WH I T E PAP E R / 6 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 86.DestinationFolderScreen
SelectthedriveyouwouldliketoinstallvSpherePowerCLIontoandthefoldername,orleavethissetasthe
recommendedpathandclickNext.
ThiswillbringyoutothefollowingReadytoInstallscreen:
Figure 87. ReadytoInstallScreen
ClickInstalltobegintheInstallationofPowerCLI.
ThiswillbringyoutotheInstallingVMwarevSpherePowerCLIscreen.
T E C H NI C AL WH I T E PAP E R / 6 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 88. InstallingvSpherePowerCLI
Waitwhiletheinstallationiscompleted.
Figure 89.InstallationFinishScreen
Whentheinstallationissuccessful,thenishscreenwillbedisplayed.Tocompletetheinstallation,clickFinish.
ThevSpherePowerCLIinstallationwillnowbecompleted,andonyourdesktopyouwillnowhavetwoicons,
whichallowyoutolaunchvSpherePowerCLI,a64-bitversionanda32-bitversion.
T E C H NI C AL WH I T E PAP E R / 6 9
VMware vSphere 5.0 Evaluation Guide
Volume One
GettingStartedwithvSpherePowerCLI
OnyourstartmenuintheVMware->VMwarevSpherePowerCLIfolder,youwillnowhaveaccesstothe
followingitems:
vSpherePowerCLI(32-Bit)
vSpherePowerCLI
vSphere PowerCLI Administration Guide
vSphere PowerCLI Cmdlets Reference
vSphere SDK for .NET API Reference
vSphere SDK for .NET Dev Guide
ItishighlyrecommendedthatyoureadthevSphere PowerCLI Administration Guide,becausethiswillprovide
thefundamentalsofbothvSpherePowerCLIandPowerShell,andwillaidinthelearningprocesswhenstarting
outwithvSpherePowerCLI.ThisguidewillshowexamplesofvSpherePowerCLIandPowerShellcode,butwill
notprovideallknowledgetolearntheselanguagesinfull.Forfurtherhelpandsupport,visitthevSphere
PowerCLIcommunitysiteathttp://vmware.com/go/PowerCLI.
ConnectingtoavSphereHostorvCenter
WithvSpherePowerCLI,youhavetheability,aswiththevSphereClient,toconnecttobothvSpherehostsand
vCenterservers.ThisdocumentwillshowhowtomanageavCenterServerandallconnectedentities,butit
shouldbenotedthatthesamecmdletscouldbeusedtomanageasinglevSpherehost.
Figure 90.LaunchingPowerShellSession
T E C H NI C AL WH I T E PAP E R / 7 0
VMware vSphere 5.0 Evaluation Guide
Volume One
Fromthestartmenu,selectVMware->VMwarevSpherePowerCLI->VMwarevSpherePowerCLI.
ThiswilllaunchanewPowerShellsessionandautomaticallyimporttheVMwaresnap-inusedtomanagethe
VMwareenvironment,asfollows:
Figure 91.ConnectingtovCenterServer
UsetheConnect-VIServercmdlettoconnecttoyourvCenterServer.Auserandpasswordparametercanbe
usedwiththiscmdlettospecifytheconnectioncredentials.Ifnouserandpasswordparameterisused,the
cmdletwilltrytologinwithyourcurrentlogged-onWindowscredentials.Ifaconnectioncannotbemadefrom
thecurrentcredentials,youwillbepromptedforausernameandpassword.
T E C H NI C AL WH I T E PAP E R / 7 1
VMware vSphere 5.0 Evaluation Guide
Volume One
Onceconnected,youwillbereturnedtothevSpherePowerCLIprompt.Youarethenreadyforyournextcmdlet
tobeexecuted,asfollows:


Figure 92.CerticateWarning
DuringthisvSpherePowerCLIbyExamplesection,thecerticatewarningcanbeignored.
Onceyouareconnected,theName,PortandUserpropertiesusedtomaketheconnectionwillbereturnedto
showasuccessfulconnection.
UsingvSpherePowerCLI
Figure 93.
T E C H NI C AL WH I T E PAP E R / 7 2
VMware vSphere 5.0 Evaluation Guide
Volume One
ToretrievealistofvirtualmachinesattachedtotheconnectedvCenterserver,typeGet-VM.Thiswillreturnthe
Name,PowerState,NumCPUsandMemory(MB).Theseareallcalledpropertiesofthevirtualmachine.vSphere
PowerCLIreturnsmoreinformationthanwhatisshownonthescreen.Itactuallyreturnsanobjecttothis
vSpherePowerCLIsessioncontainingmoreinformationaboutthevirtualmachine.
Figure 94.
TondoutmoreinformationabouttheobjectbeingreturnedbyvSpherePowerCLI,usetheGet-Member
cmdlettoretrievealistofallproperties,andalsomethodsattachedtothisvirtualmachineobject.
TodothiswewilltaketheGet-VMcmdletandpipeitthroughtheGet-Membercmdlet.Thiswilltakethe
resultsoftheGet-VMcmdletandpushthemasaninputintotheGet-Membercmdlet.
TypeGet-VM|Get-Member
Asyoucanseefromtheprecedingscreenshot,thevirtualmachineobjectcontainsmorepropertiesthanwere
shownfromourinitialGet-VMresults.
T E C H NI C AL WH I T E PAP E R / 7 3
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 95.
Toselectpropertiesthatwewouldliketosee,wecanusetheSelect-Objectcmdlettochoosethepropertiesof
thevirtualmachinewewouldlikereturned.
Type:Get-VM|SelectName,PowerState,VMHost,NumCPU,MemoryMB|Format-Table
Thiswillretrievetheselectedpropertiesandshowtheminatableviewinourconsole.

Figure 96.
ThisinformationcaneasilybeexportedfromvSpherePowerCLIintomanyformatsusingsomeofthecmdlets
builtintothedefaultPowerShellconsole.
T E C H NI C AL WH I T E PAP E R / 74
VMware vSphere 5.0 Evaluation Guide
Volume One
Toexporttheinformationintoacomma-separatedvaluesle,typeGet-VM|Export-CSV-NoTypeInformation
C:\Export\AllVMs.csv
Toexporttheinformationintoahtmlle,typeGet-VM|ConvertTo-Html|Out-FileC:\Export\AllVMs.htm
Toexporttheinformationintoaplaintextle,typeGet-VM|Out-FileC:\Export\AllVMs.txt
Figure 97.
Tocreateanewvirtualmachine,theNew-VMcmdletcanbeused.Thishasmanyparametersthatcanbeusedto
specifytheexactcongurationofthevirtualmachine.Toviewtheseparameters,usetheGet-Helpcmdlet.
Wewillcreateavirtualmachinewiththefollowingconguration:
Name:VM_08
Host:tm-pod01-esx03
Datastore:DatastoreCluster01
CPUs:2
Memory:4GB
Disk:40GB
DiskType:Thin
Network:Production02
FloppyDrive:Yes
CD-Rom:Yes
T E C H NI C AL WH I T E PAP E R / 7 5
VMware vSphere 5.0 Evaluation Guide
Volume One
Todothis,typethefollowing:
New-VM-NameVM_08-ResourcePool(Get-VMHosttm-pod01-esx03*)-Datastore(Get-DatastoreCluster
DatastoreCluster01)-NumCPU2-MemoryMB4096-DiskMB40000-NetworkNameProduction02
-Floppy-CD-DiskStorageFormatThin
Figure 98.
TheNew-VMcmdletcanalsobeusedtocreateanynumberofvirtualmachineswiththesameconguration.
Thefollowingexampleshowshowtocreate10newvirtualmachineswiththesameconguration.Inthe
followingexample,$_referstothecurrentnumberinthepipeline,becausetheyarepassedthroughtothe
New-VMcmdlet:
10..20|Foreach{New-VM-NameVM_$_-ResourcePool(Get-VMHosttm-pod01-esx03*)-Datastore(Get-
DatastoreClusterDatastoreCluster01)-NumCPU2-MemoryMB4096-DiskMB40000-NetworkName
Production02-Floppy-CD-DiskStorageFormatThin}
Figure 99.
T E C H NI C AL WH I T E PAP E R / 7 6
VMware vSphere 5.0 Evaluation Guide
Volume One
FurthervirtualmachineoperationscanbeperformedwithvSpherePowerCLI.Toseethecmdletsthatcanbe
usedwithvirtualmachines,typeGet-ViCommand*VM
Tondmoreinformationononeofthesecmdlets,typeGet-HelpMove-VM-Full
Figure 100.
Tolistallhostsattachedtothecurrentconnection,typeGet-VMHost
Figure 101.
Tolistallvirtualmachinesattachedtoacertainhost,typeGet-VMHosttm-pod01-esx02*|Get-VM
TheprecedingexamplewilltaketheresultoftheGet-VMHostcmdletandpushitthroughasaninputforthe
Get-VMcmdlet,producingalistofvirtualmachinesonthatspecichost.
T E C H NI C AL WH I T E PAP E R / 7 7
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 102.
TheGet-VMHostcmdletcanbeusedinconjunctionwithothercmdletstoretrieveandsetinformationforthathost.
TolisttheNTPserversoneachhostinthevSphereClient,youwouldneedtogotothehostandclustersview,
selectahost,clickthecongurationtabandselectthetimecongurationsettingtoview.Youwouldneedto
repeatthisforeachhost.
TodothisinvSpherePowerCLI,typeGet-VMHost|Get-VMHostNTPServer
Figure 103.
Snapshotinformationgatheringisatime-consumingpartofanyvirtualadministratorsjob.Snapshotsneedto
bemanagedcorrectlyortheycanquicklycauseissueswithinthevirtualinfrastructure.WithinthevSphere
Client,itishardtogetanoverviewofhowmanysnapshotshavebeencreatedandhowmuchspacetheyare
using,whentheywerecreated,andbywhomtheywerecreated.
vSpherePowerCLIincludesmultiplecmdletstoallowyoutoworkwithsnapshots.Toviewallsnapshotsonthe
currentconnection,typeGet-VM|Get-Snapshot
T E C H NI C AL WH I T E PAP E R / 7 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Togainmoreinformationaboutallsnapshots,typeGet-VM|Get-Snapshot|SelectVM,Name,Description,
Created,SizeMB|Format-Table
Inadditiontoreporting,PowerCLIvSpherePowerCLIalsoprovidescmdletsforthemanagementofsnapshots.
Figure 104.
SnapshotsareeasilycreatedinlargenumbersinvSpherePowerCLI.SnapshotsinthevSphereClientmustbe
createdoneatatime.WithvSpherePowerCLI,youcanspecifythecriteriaforyourvirtualmachinesandusethe
New-Snapshotcmdlettocreateasnapshotoneachvirtualmachine.Thefollowingexampleshowshowto
createasnapshotonallvirtualmachineshavingnamesthatstartwithVM:
Get-VMVM*|New-Snapshot-NamePatchTuesday-DescriptionAPatchaddedbeforeapplyingall
MicrosoftPatches
YouwillalsoseefromtheprecedingscreenshotthatanytaskproducedbyvSpherePowerCLIwillberecorded
inthenormalmannerwithinvCenterandattributedtotheuserwhoisconnectedtothisvSpherePowerCLIsession.
Figure 105.
T E C H NI C AL WH I T E PAP E R / 7 9
VMware vSphere 5.0 Evaluation Guide
Volume One
Aswiththecreationofsnapshots,itisveryeasytoremovetheminlargenumberswiththeRemove-Snapshot
cmdlet.ThefollowingexamplewillremoveallsnapshotswithanameofPatchTuesday:
Get-Snapshot-NamePatchTuesday|Remove-Snapshot
Figure 106.
Tolisttheavailablecmdletsforworkingwithsnapshots,typeGet-ViCommand*Snapshot*
Figure 107.
Networkingisalsoakeyareaofyourvirtualinfrastructure.vSpherePowerCLIhastheabilitytoreport,create,
andcongureallaspectsofyournetworkingconguration.
Tolistallvirtualswitchesandtheirinformation,typeGet-VMHost|Get-VirtualSwitch|SelectVMHost,Name,
Nic,NumPortsAvailable
T E C H NI C AL WH I T E PAP E R / 8 0
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 108.
vSpherePowerCLIreportingcanalsobeusedtoensurethatyourvirtualcongurationsarecorrect.Ifaport
groupismissed,orthenameisincorrect,ortheVLANIDhasbeensetincorrectly,thiscancausefundamental
issueswithclustersandthevSphereDistributedResourceScheduler(DRS).
Theprecedingexampleshowshowthecongurationofeachhost,vSwitch,andportgroupcanbechecked.To
performthis,typethefollowing:
Get-VMHost|Get-VirtualSwitch|Get-VirtualPortgroup|Select@{Name=VMHost;Expression={$_.
VirtualSwitch.VMHost}},VirtualSwitchName,Name,VLanId|SortVMHost
Figure 109.
ItiseasytoaddportgroupsinlargenumbersusingvSpherePowerCLI.Thiscanbeachievedoneachhostina
specicclustertoensuretheDRSandHAcompatibilityofthehost.Thefollowingexamplewillcreateanewport
T E C H NI C AL WH I T E PAP E R / 8 1
VMware vSphere 5.0 Evaluation Guide
Volume One
groupcalledCompanyXonvSwitch0foreachhostintheclusterDemoCluster-01:
Get-ClusterDemoCluster-01|Get-VMHost|Get-VirtualSwitch-NamevSwitch0|New-VirtualPortGroup
CompanyX-VLanId200
vSpherePowerCLISummary
Inconclusion,youcanseethatvSpherePowerCLIisarobustcommand-linetoolforautomatingallaspectsof
vSpheremanagement,includinghost,network,storage,virtualmachine,andguestOSmanagement.Itcanbe
usedwithotherPowerShellsnap-insprovidedbyMicrosoftorthird-partycompaniestointegrateVMware
technologieseasilyintootherproductsandreachinsidetheguestOS.
ThedesignofPowerShelland,inherently,vSpherePowerCLI,makesthisscriptinglanguageeasiertolearnthan
manyscriptinglanguagesbeforeit.Complexcongurationsandreportingcanbeachievedwithminimalefort
fromtheadministrator,safeintheknowledgeofarepeatable,error-freesolution.
EvaluatingtheESXiFirewall
Introduction
TheESXi5.0managementinterfaceisprotectedbyaservice-orientedandstatelessrewall,whichyoucan
congureusingthevSphereClientoratthecommandlinewithesxcliinterfaces.Anewrewallengine
eliminatestheuseofiptables,andrulesetsdeneportrulesforeachservice.Forremotehosts,youcanspecify
theIPaddressesorrangeofIPaddressesthatareallowedtoaccesseachservice.
EvaluationOverview
Inthisexercise,youwillconguretheESXirewalltoallowordenySSHservicetothehost.SSHisaservicethat
canbeenabledorstoppedonanESXihost.Aspartofthisexercise,youwillstopandstartSSHservice,andalso
congurerewallrules.ESXirewallcongurationcanbedonethroughthevSphereClientinterfaceand
throughthevCLI.Inthisexampleenvironment,youwillconguretherewallrulesthroughvSphereClientUI.
Prerequisites
Theevaluationenvironmentconsistsofthefollowingcomponents:
1. Three ESXi hosts
2. Virtual machines running on hosts
3. Each virtual machine a software tool installed
a. PuTTY
StoppingSSHServicetoPreventAccess
TheSSHserviceprovidesasecureshelltomanagetheESXihost.Bydefault,thisserviceisenabled.Tostopthis
service,youhavetofollowthesesteps:
1. Select the Home > Inventory > Hosts and Clusters view.
2. Choose the host tm-pod01-esx01.tmsb.local in the left panel, and select Conguration tab on the right.
3. To see the rewall and services setting, select the Security Prole under the software section. Figure 110
shows the current Security Prole of the selected ESXi host. You can see that the SSH service is enabled
and current rewall settings allow access to the SSH server on TCP port 22.
T E C H NI C AL WH I T E PAP E R / 8 2
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 110.
4. The warning sign on the host tm-pod01-esx01.tmsb.local is regarding the SSH service. Figure 111 shows
the summary screen with the warning displayed. Enabling SSH service could be a security risk, so the
platform provides the warning. You have to make sure that rewall rules are congured when SSH
service is enabled.
T E C H NI C AL WH I T E PAP E R / 8 3
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 111.
5. To stop the service, you have to click the Services Properties link as shown in Figure 112.
Figure 112.
T E C H NI C AL WH I T E PAP E R / 8 4
VMware vSphere 5.0 Evaluation Guide
Volume One
6. This will bring up the panel shown in Figure 113. Select SSH and click Options. You can start or stop any
services that are listed in this panel.
Figure 113.

Figure 114.
7. Because this service was already started, you have an option to stop it by clicking Stop in the panel shown
in Figure 114.
T E C H NI C AL WH I T E PAP E R / 8 5
VMware vSphere 5.0 Evaluation Guide
Volume One
TestingAccesswithSSHServiceStopped
AfterstoppingtheSSHremoteaccessservice,youcantestifanyclientcanconnecttoHost1(tm-pod01-esx01.
tmsb.local)onTCPport22.
Inthisexampleenvironment,youcanusevirtualmachineVM_02runningonHost3(tm-pod01-esx03.tmsb.
local)toestablishaSSHsessionwithHost1.YoucanlaunchthePuTTYtooltoestablishtheSSHsession,as
showninFigure115.
Figure 115.
Theconnectiontimesoutwithanetworkerror,asshowninFigure116.
T E C H NI C AL WH I T E PAP E R / 8 6
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 116.
ThisdemonstratesthatbyshuttingdowntheSSHservice,youcancompletelydenyremoteaccess.Insteadof
blockingallaccessbystoppingaservice,youcanselectivelyrestrictremoteaccessthroughtheESXirewall.
Inthefollowingsection,youwillenabletheSSHservice,andthenuserewallsettingstoprovideselective
remoteaccess.
CreatingFirewallRulestoBlockSSHAccess
BeforecreatingtherewallrulestoblockSSHaccess,youhavetorstenabletheSSHserviceasfollows:
1. Click the Services Properties link, as shown in Figure 112.
2. Select SSH service in the Service Properties panel, as shown in Figure 117. You can see that the SSH service
is stopped. To enable the service, click Options.
T E C H NI C AL WH I T E PAP E R / 8 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 117.
Figure 118.
3. Click Start in the SSH Options panel, as shown in Figure 118. This will start the SSH service again. You can
now congure the rewall rules for this service.
4. Click rewall Properties to access the rewall setup panel. Figure 119 shows the rewall Properties.
T E C H NI C AL WH I T E PAP E R / 8 8
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 119.
Figure 120.
T E C H NI C AL WH I T E PAP E R / 8 9
VMware vSphere 5.0 Evaluation Guide
Volume One
5. After clicking the rewall Properties link, you will see the Firewall Properties panel, as shown in Figure 120.
Select the SSH Server under the Secure Shell category, and click Firewall.
6. In this example environment, you have to enable the SSH remote access only from virtual machine VM_02
with IP address 10.91.35.55. SSH connections from all other IP addresses are denied. You can also give a
range of IP addresses or subnet class in the Only allow connections... eld shown in Figure 121.
Figure 121.
AfterconguringtherewallruletoallowremoteaccessforonlyvirtualmachineVM_02,youcantestthis
rewallsettingbyestablishingPuTTYsessionsfromdiferentvirtualmachines.
TestingSSHFirewallRules
Inthisexampleenvironment,youwilltrytoestablishSSHsessionsfromthefollowingtwovirtualmachinesthat
arerunningfromHost3(tm-pod01-esx03.tmsb.local):
1. VM_02 : With IP address 10.91.35.55
2. VM_04 : With IP address 10.91.35.67
First,youcantrycreatingaSSHsessionusingthePuTTYtoolonVM_02.ThisvirtualmachineIPaddressis
oneoftheallowedIPaddressesintherewallconguration.Therefore,youcanexpecttheSSHconnectionto
beestablished.
T E C H NI C AL WH I T E PAP E R / 9 0
VMware vSphere 5.0 Evaluation Guide
Volume One

Figure 122.
Figure123showstheloginscreenofHost1.Youcanlogintothehostwithrootcredentials.
Figure 123.
T E C H NI C AL WH I T E PAP E R / 9 1
VMware vSphere 5.0 Evaluation Guide
Volume One
WhenyourepeatthestepofestablishingtheSSHconnectionfromVM_04(10.91.35.67),youwillgetthe
Networkerror:ConnectiontimedoutmessageasshowninFigure124.ThisisbecausetheESXirewallblocks
accessonTCPport22fromanyIPaddressotherthan10.91.35.55.
Figure 124.
ImageBuilder
Introduction
Inthissection,youwilllearnhowtousevSphere5.0ImageBuildertocreateandmaintaincustomESXiimages
usedtodeployhostsinyourvSphere5.0environment.ApastchallengewithESXihasbeenthestaticnatureof
thevSphereinstallationimage.AscustomersadoptnewhardwareandasvendorsreleaseupdatestoCIM
providersandsoftwaredrivers,itwasdifculttoincorporatetheseupdatesintotheESXiinstallation.Image
BuilderenablesuserstoupdateandmaintaintheirESXiimagesinordertokeepupwiththelatestsoftware
driversandupdates.
ESXI
VIBs
Image
Builder
Generate new image
Driver
VIBs
OEM VIBs
Depots
Image
Prole
ISO image
Windows host with PowerCLI
and Image Builder snap-in
PXE-bootable
image
Figure 125. ImageBuilderOverview
ImageBuildercanbeusedinconjunctionwithVWmarevSphereAutoDeploytodynamicallyprovisionhostsin
adisklessenvironment.
T E C H NI C AL WH I T E PAP E R / 9 2
VMware vSphere 5.0 Evaluation Guide
Volume One
ImageBuilderPrerequisites
ThefollowingcomponentsarerequiredtousevSphere5.0ImageBuilder:
WindowsVMwith2GBoffreediskspace(usedtohostvSpherePowerCLIandstoreImageBuildersoftwaredepots)
vSpherePowerCLI5.0
ESXiOfineBundle
vCenterServer5.0
PreparationTasks
CompletethefollowingstepspriortobeginningyourevaluationofImageBuilder5.0:
InstallvSpherePowerCLI
DownloadandinstallvSphere5.0PowerCLIfromwww.vmware.com.Thedownloadleisaself-extracting
executablele.Simplydouble-clickonthe.exeletoinvokethevSpherePowerCLIinstallerandfollowthe
prompts.RefertothevSphere PowerCLI Users GuideandthevSpherePowerCLIbyExamplesectionofthis
guideformoreinformationoninstallingvSpherePowerCLI.
DownloadtheESXiOfineBundle
DownloadtheESXiOfineBundleZIPflefromwww.vmware.com.TheofinebundleisshippedinaZIPformat.
DownloadtheleonthesameserverwherevSpherePowerCLIwasinstalled.
ExtracttheESXiOfineBundle
CreatetheC:\ImageBuilderdirectoryandextractthecontentsoftheofinebundleintothisdirectory.
StartanImageBuildervSpherePowerCLISession
ThefollowingstepsshowhowtostartavSpherePowerCLIsessionandhowtoconnecttoavCenterServer.
StartvSpherePowerCLIbyeitherdouble-clickingthevSpherePowerCLIicononthedesktoporselecting:
Start -> Program -> VMware vSphere PowerCLI -> VMware vSphere PowerCLI
FromthevSpherePowerCLIprompt,runtheConnect-VIServercmdlettoconnectyourvSpherePowerCLI
sessiontovCenterServer:
PowerCLI C:\> Connect-VIServer <vCenter IP address>
Figure 126. Connect-VIServer
T E C H NI C AL WH I T E PAP E R / 9 3
VMware vSphere 5.0 Evaluation Guide
Volume One
Dependingonyourlogincredentials,youmightbepromptedtoenterthevCenterusernameandpassword,
asfollows:

Figure 127.Connect-VIServerLoginPrompt
vSpherePowerCLIwillshowthevCenterServername/IPandtheportanduser.DuringtheImageBuilder
evaluation,thecerticateerrorcanbeignored.
Figure 128.Connect-VIServerResults
T E C H NI C AL WH I T E PAP E R / 9 4
VMware vSphere 5.0 Evaluation Guide
Volume One
ImporttheESXiOfineBundle
ThissectionshowshowtoimportanESXisoftwaredepotusingtheESXiofinedepotstagedintheC:\
ImageBuilderdirectoryduringthepreparationtasks.
PowerCLI C:\> Add-EsxSoftwareDepot C:\ImageBuilder
Figure 129.AddSoftwareDepot
ThesoftwaredepotisacollectionofvSpherepackagesusedtocreateandmaintainESXiimages.Thefollowing
stepsshowhowtoviewinformationaboutthesoftwaredepotsaddedtoyourvSpherePowerCLIsession.
DisplaySoftwareDepots
SoftwaredepotsareaddedusingtheAdd-ESXSoftwareDepotcmdletandremovedusingtheRemove-
SoftwareDepot cmdlet.Usethe$DefaultSoftwareDepotsvariabletoviewthelistofsoftwaredepots
availableinyourcurrentvSpherePowerCLIsession.
Toviewavailablesoftwaredepots,typethefollowing:
PowerCLI C:\> $DefautSoftwareDepots
Figure 130.DisplaySoftwareDepot
T E C H NI C AL WH I T E PAP E R / 9 5
VMware vSphere 5.0 Evaluation Guide
Volume One
DisplayVIBs
AvSphereInstallationBundle(VIB)isapackagingformatusedinvSphere.VMwareanditspartnerspackage
solutions,drivers,CIMprovidersandapplicationsasVIBs.VIBsarethengroupedtogethertocreateESXiimage
proles.ToviewtheavailableVIBsfromthesoftwaredepotsaddedtoyourvSpherePowerCLIsession,usethe
Get-EsxSoftwarePackagecmdlet.
PowerCLI C:\> Get-EsxSoftwarePackage
Figure 131. Get-EsxSoftwarePackage
DisplayImageProles
AnimageproleisacompilationofVIBsthatmakeupanESXiimagethatcanbeusedtoinstallanESXihost.At
aminimum,animageproleiscomprisedofabaseESXiVIBandabootablekernelmoduleVIB,butcanalso
includeadditionalVIBsfromthepoolofavailablesoftwaredepots.Tolisttheconguredimageproles,usethe
Get-EsxImageProflecmdlet.
PowerCLI C:\> Get-EsxImageProfle
Figure 132.Get-EsxImageProle
TolisttheVIBsthatcompriseanimageprole,usetheGet-EsxImageProflecmdletandexpandthe
propertiesoftheVibListproperty.
PowerCLI C:\> Get-EsxImageProfle MyProfle | Select ExpandProperty VibList
T E C H NI C AL WH I T E PAP E R / 9 6
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 133.Get-EsxImageProleVibList
CreateaNewImageProle
ThefollowingstepsshowhowtocreateacustomimageproleeitherbymanuallyselectingtheindividualVIB
componentsorbycloninganexistingimageprole.
Eachimageprolemustmeetthefollowingrequirements:
Theimageproflemusthaveauniquename.
TheimageproflemustcontainatleastonebaseESXiVIBandonebootablekernelmodule.
TheacceptancelevelforeachVIBmustmatchtheacceptanceleveldefnedfortheprofle.
AVIBcanonlyexistonceinanimageprofle.
AllVIBdependenciesmustbemet.
CreateaNewImageProlebyManuallySelectingIndividualVIBs
CreateanewimageprolenamedMyNewProflethatcontainstheESXibaseimage.
PowerCLI C:\> New-EsxImageProfle NewProfle MyNewProfle vendor VMware
SoftwarePackage esx-base
Figure 134.New-EsxImageProle
T E C H NI C AL WH I T E PAP E R / 9 7
VMware vSphere 5.0 Evaluation Guide
Volume One
Next,addtheVIBesx-tboottoMyNewProfleasfollows:
PowerCLI C:\> Add-EsxSoftwarePackage -ImageProfle MyNewProfle SoftwarePackage
esx-tboot
Figure 135.Add-EsxSoftwarePackageesx-tboot
Next,addtheVIBnet-e1000etoMyNewProfleasfollows:
PowerCLI C:\> Add-EsxSoftwarePackage -ImageProfle MyNewProfle SoftwarePackage
net-e1000e
Figure 136.Add-EsxSoftwarePackagenet-e1000e
Next,displaytheavailableimageprolesandconrmthatthenewimageproleMyNewProflehas
beencreated:
Figure 137.Get-EsxImageProlewithMyNewProle
Next,displaythelistofVIBsintheimageprolestoconrmthatonlytheVIBsidentiedareincluded:
Figure 138. Get-EsxImageProleMyNewProleVibList
T E C H NI C AL WH I T E PAP E R / 9 8
VMware vSphere 5.0 Evaluation Guide
Volume One
CreateaNewImageProlebyCloninganExistingImageProle
CreateanewESXiimagenamedMyClonedProflebycloningtheESXi-5.0.0-381646-standard
Imageincludedwiththeofinebundle.
PowerCLI C:\> New-EsxImageProfle CloneProfle ESXi-5.0.0-381646-standard Name
MyClonedProfle
Figure 139.New-EsxImageProle-CloneProle
Displaythelistofavailableimageprolesconrmingthatthenewprolewascreated:
PowerCLI C:\> Get-EsxImageProfle
Figure 140.Get-EsxImageProlewithMyClonedProle
RemovingVIBsfromanImageProle
TheclonedimageproleMyCloneProfleincludestheVMwareToolspackage.Wecanmakethesizeofthis
imageprolesmallerbyremovingtheVMwareToolspackage.
PowerCLI C:\> Remove-EsxSoftwarePackage ImageProfle MyClonedProfle
SoftwarePackage tools-light
Figure 141.Remove-EsxSoftwarePackage
T E C H NI C AL WH I T E PAP E R / 9 9
VMware vSphere 5.0 Evaluation Guide
Volume One
CompareImageProles
Thissectionshowshowtocompareimageprolestohelpidentifyandtrackdiferencesbetweencustom
imageproles.
Intheprevioussection,wecreatedacloneofthedefaultimageprolecalledMyCloneProfle.Wethen
removedtheVMwareToolspackagefromthecustomimage.WecannowusetheCompare-
EsxImageProflecmdlettocomparethetwoimagesandverifythechangesthatweremade.
PowerCLI C:\> Compare-EsxImageProfle ReferenceProfle Esxi-5.0.0-381646-no-tools
CompareProfle MyClonedProfle
Figure 142. Compare-EsxImageProle
Intheprecedingexample,wecanseethatthepackageVMware _ locker _ tools-
light _ 5.0.0.0-0.0.381646doesnotexistinthereferenceprole(-ReferenceProle)butdoesexistinthe
comparisonprole(-ComparisonProle).
ExportImageProle
ThefollowingstepsshowhowtoexportimageproflesasanofinebundleorasabootableISOimage.
ExportAsanOfineBundle
EachtimeyouexityourvSpherePowerCLIsession,allsoftwaredepotsandcustomimageprolesarelost.To
saveyourcustomimageproles,inordertocontinuetoworkwiththembetweenvSpherePowerCLIsessions,
youmustsavethemtodiskbyexportingtoanofinebundle.Withanofinebundle,eachtimeyoustartanew
vSpherePowerCLIsession,youcancontinuetoworkwithyourcustomimageproflesbyimportingtheofine
bundleasanewsoftwaredepotusingtheAdd-EsxSoftwareDepotcmdlet.
Toexportanimageprofleasanofinebundle,usetheExport-EsxImageProfle cmdletwiththe
-ExportToBundleoption.
PowerCLI C:\> Export-EsxImageProfle ImageProfle MyNewProfle ExportToBundle
FilePath C:\ImageBuilder\MyNewProfle
Figure 143. Export-EsxImageProle-ExportToBundle
T E C H NI C AL WH I T E PAP E R / 1 0 0
VMware vSphere 5.0 Evaluation Guide
Volume One
ExportAsaBootableISOImage
InordertouseacustomimageproletoinstallESXihosts,youmustexporttheimageproleasabootableISO.
UsetheExport-EsxImageProflecmdletwiththe-ExportToIsooption.
PowerCLI C:\> Export-EsxImageProfle ImageProfle MyNewProfle ExportToIso
FilePath C:\ImageBuilder\MyNewProfle.iso
Figure 144. Export-EsxImageProle-ExportToIso
UseWindowsExplorertoviewtheZIPand.isofles.
Figure 145. ShowImageProleExports
ProductDocumentation
Fordetailedinformationregardinginstallation,conguration,administration,andusageofvSphereImage
BuilderorothervSpherefeatures,refertotheonlinedocumentation:http://www.vmware.com/support/pubs/
vs_pubs.html.
T E C H NI C AL WH I T E PAP E R / 1 01
VMware vSphere 5.0 Evaluation Guide
Volume One
UsingStoragePerformanceStatistics
Introduction
vSphere5.0introducesseveralnewperformanceviews.Theseviewsallowforaquickoverviewofthecurrent
healthofyourdatastores.Therearetwodiferenttypesofviews:performanceandspace.
ThisnextsectionwilldisplayhoweasydatastoremonitoringiswithvSphere5.0.Therearetwobasicviewsas
partoftheDatastoresandDatastoreClustersview:
MonitoringSpaceUtilizationofaDatastore
1. Go to the Datastores and Datastore Clusters view.

Figure 146.
2. Select a datastore.
Figure 147.
T E C H NI C AL WH I T E PAP E R / 1 02
VMware vSphere 5.0 Evaluation Guide
Volume One
3. Click on the Performance tab. This will show you the current Space Utilization statistics for this particular
datastore by default.

Figure 148.
4. Click on Time Range to change the range from 1 Day to 1 Week. This will show if virtual machines have
grown or have been migrated to other datastores, and any other trends over the last seven days.

Figure 149.
T E C H NI C AL WH I T E PAP E R / 1 03
VMware vSphere 5.0 Evaluation Guide
Volume One
MonitoringPerformanceStatisticsofaDatastore
ThesecondpartofthisexerciseshowstheperformancestatisticsavailableontheDatastoresandDatastore
Clustersview.Theseviewsareshowingthemostrelevantandimportantmetricstomonitor,likeAverage
DeviceLatency8AverageWriteLatencyperVirtualMachineDisk.
1. Go to the Datastores and Datastore Clusters view.
Figure 150.
2. Select a datastore.
Figure 151.
3. Click on the Performance tab and select Performance in the View drop-down list.
T E C H NI C AL WH I T E PAP E R / 1 0 4
VMware vSphere 5.0 Evaluation Guide
Volume One
Figure 152.
4. You have now successfully completed the Using Storage Performance Statistics exercise.
T E C H NI C AL WH I T E PAP E R / 1 0 5
VMware vSphere 5.0 Evaluation Guide
Volume One
Help and Support During the Evaluation
ThisguideprovidesanoverviewofthestepsrequiredtoensureasuccessfulevaluationofVMwarevSphere.Itis
notmeanttobeasubstituteforproductdocumentation.RefertotheonlinevSphereproductdocumentationfor
moredetailedinformation(seethefollowinglinks).YoucanalsoconsulttheonlineVMwareknowledgebaseif
youhaveanyadditionalquestions.Ifyourequirefurtherassistance,contactaVMwaresalesrepresentativeor
channelpartner.
VMwarevSphereandvCenterresources:
Productdocumentation:
http://www.vmware.com/support/pubs/
Onlinesupport:
http://www.vmware.com/support/
Supportoferings:
http://www.vmware.com/support/services
Educationservices:
http://mylearn1.vmware.com/mgrreg/index.cfm
Supportknowledgebase:
http://kb.vmware.com
VMwarevSpherePowerCLIToolkitCommunity:
http://communities.vmware.com/community/developer/windows_toolkit
(ortypeGet-VIToolkitCommunitywithinPowerCLI)
PowerCLIBlogs:
http://blogs.vmware.com/vipowershell
VMwareContactInformation
ForadditionalinformationortopurchaseVMwarevSphere,theVMwareglobalnetworkofsolutionsprovidersis
readytoassist.IfyouwouldliketocontactVMwaredirectly,youcanreachasalesrepresentativeat1-877-
4VMWARE(650-475-5000outsideNorthAmerica)oremailsales@vmware.com.Whenemailing,includethe
state,countryandcompanynamefromwhichyouareinquiring.Youcanalsovisithttp://www.vmware.com/
vmwarestore/.
ProvidingFeedback
Weappreciateyourfeedbackonthematerialincludedinthisguide.Inparticular,wewouldbegratefulforany
guidanceonthefollowingtopics:
Howusefulwastheinformationinthisguide?
Whatotherspecifctopicswouldyouliketoseecovered?
Overall,howwouldyouratethisguide?
Sendyourfeedbacktothefollowingaddress:tmdocfeedback@vmware.com,withVMwarevSphere5.0
EvaluationGuideinthesubjectline.Thankyouforyourhelpinmakingthisguideavaluableresource.
VMware, Inc.3401HillviewAvenuePaloAltoCA94304USATel877-486-9273Fax650-427-5001www.vmware.com
Copyright2011VMware,Inc.Allrightsreserved.ThisproductisprotectedbyU.S.andinternationalcopyrightandintellectualpropertylaws.VMwareproductsarecoveredbyoneormorepatentslistedat
http://www.vmware.com/go/patents.VMwareisaregisteredtrademarkortrademarkofVMware,Inc.intheUnitedStatesand/orotherjurisdictions.Allothermarksandnamesmentionedhereinmaybe
trademarksoftheirrespectivecompanies.ItemNo:VMW-WP-vSPHR-EVAL-GUIDE-VOL1-USLET-101-WEB

You might also like