Professional Documents
Culture Documents
Autodeploy of ESXI PDF
Autodeploy of ESXI PDF
Guide
VMware Auto Deploy Administrators Guide
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com
Copyright 2009, 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and
intellectual property laws. VMware products are covered by one or more patents listed at
http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Contents
AboutThisBook 5
1 IntroductiontoVMwareAutoDeploy 7
AutoDeployComponents 7
AutoDeployArchitecture 8
ProcessOverview 8
AutoDeployPrerequisitesChecklist 10
DiagnosticPartitionsforESXiHosts 11
2 UsingVMwareAutoDeployforESXiDeployment 13
SettingUpthevCenterServerSystem 13
DeployingandConfiguringtheAppliance 13
SettingUptheDHCPServer 15
AutoDeployDHCPServer 15
PreparingtheDHCPServer 15
ResolvingIPAddressIssues 15
ThirdPartyDHCPServer 16
MakingthevCenterServerSystemaTargetServer 16
DeployingtheFirstHostwiththeDefaultBootProfile 17
CustomizingtheFirstHostandCreatingaHostProfile 17
CustomizingHostsUsingPluginsandBootOptions 17
UsingPlugins 18
UsingBootOptions 19
DeployingAdditionalHosts 19
UpdatingtheDefaultBootProfile 19
AddingaNewImagetotheAutoDeployImageRepository 20
CreatingaCustomBootProfile 20
AddingaHosttotheDatabase 21
3 VMwareAutoDeployInterfaces 23
deploycmdCommandReturnValues 23
deploycmdaddhost 23
deploycmdcreateprofile 24
deploycmddeletehost 26
deploycmddeleteprofile 26
deploycmddhcpconfig 26
deploycmdlisthosts 27
deploycmdlistprofiles 27
deploycmdupdatehost 28
deploycmdupdateprofile 28
4 FrequentlyAskedQuestionsandTroubleshooting 31
UsingLogstoResolveProblems 31
FrequentlyAskedQuestions 31
VMware, Inc. 3
VMware Auto Deploy Administrators Guide
4 VMware, Inc.
About This Book
TheVMwareAutoDeployAdministratorsGuideexplainshowtoprepareyourenvironmentfor
VMware Auto Deploy,andhowtouseVMwareAutoDeployforESXideployment.TheVMwareAutoDeploy
AdministratorsGuidealsoincludesareferencetodeploy-cmdmanagementcommandsandtroubleshooting
information.
Intended Audience
ThisbookisforexperiencedsystemadministratorswhoarefamiliarwithvSphereadministrationtasksand
datacenteroperationsandknowhowtousecommandsinscripts.AsolidunderstandingofDHCPisessential.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhavecomments,sendyour
feedbacktodocfeedback@vmware.com.
Related Documentation
ThevSpheredocumentationconsistsofthecombinedVMwarevCenterServerandESX/ESXidocumentation
set.ThedocumentationsetcontainsbackgroundinformationaboutvSphere.
AutoDeployisbuiltontopofthevSphereManagementAssistant(vMA).SeethevSphereManagement
AssistantGuideforadditionalinformationaboutvMAmanagement.Toaccesstheguide,goto
http://www.vmware.com,clickCommunities,andclickDeveloperontheright.ThenchoosevSphere
ManagementAssistantunderAutomationTools.
Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon
priority1issues.Gotohttp://www.vmware.com/support/phone_support.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto
http://www.vmware.com/support/services.
VMware, Inc. 5
VMware Auto Deploy Administrators Guide
6 VMware, Inc.
1
Thechapterincludesthesetopics:
AutoDeployComponentsonpage 7
AutoDeployArchitectureonpage 8
ProcessOverviewonpage 8
AutoDeployPrerequisitesChecklistonpage 10
DiagnosticPartitionsforESXiHostsonpage 11
ESXisystemsbootedthroughAutoDeployhavethesamecapabilitiesasotherESXisystems.However,
becausethesesystemsdependontheAutoDeployapplianceandthevCenterServersystem,somevSphere
featuresmightworkdifferentlythantheyworkwithstatefulESXisystems.SeetheVMwareAutoDeployRelease
Notes.
TheAutoDeployvirtualapplianceisbasedonthevSphereManagementAssistant(vMA).vMAincludes
prepackagedsoftwaresuchasaLinuxdistribution,thevSpherecommandlineinterface(vCLI),andthe
vSphereSDKforPerl.AdministratorscanusethesoftwaretorunscriptsandagentstomanageESX/ESXiand
vCenterServersystems.SeethevSphereManagementAssistantGuide.
Inaddition,AutoDeployincludesthesecomponents:
TheservicesrequiredforperformingthePXEbootandtheautoconfigurationoftheESXisystems(DHCP,
TFTP,NFS,HTTP,andsoon).
Thedeploycmdcommandlineinterfaceforconfigurationandcontrol(seeVMwareAutoDeploy
Interfacesonpage 23).
Thedeploycmddatabase.
Theimagerepository.
AfteranESXisystemhasbooted,thesystemcontactsAutoDeploy.AutoDeploymanagesconfigurationofthe
systembyaddingittothevCenterServerspecifiedinthebootprofileandapplyingthespecifiedhostprofile.
VMware, Inc. 7
VMware Auto Deploy Administrators Guide
Host
profiles DHCP TFTP deploy-cmd database
gPXE.conf local.tgz
Apache
ESXi
ESX/ESXi system
physical servers
TheAutoDeployvirtualappliancerunsonaphysicalserver(ESX/ESXisystem)andincludescomponentsthat
supportAutoDeploy.Thephysicalserversarebootedoverthenetwork.AutoDeployfirstapplies
configurationstoredonAutoDeploythroughabootprofileandthenappliesconfigurationstoredonthe
vCenterServersystem.
TheAutoDeployvirtualapplianceisavSphereManagementAssistant(vMA)virtualmachinewiththe
preinstalledcomponentslistedhere.vMAitselfcomesprepackagedwiththevifpCLIforsettingup
targetservers,thevSphereCommandLineInterface(vSphereCLI)andotherinterfacesandlibrary.See
thevSphereManagementAssistantGuide.
AutoDeployincludesthefollowingserversforcommunicationduringthePXEbootprocess.
DHCPServerAssignsIPaddressestotheESXihoststhePXEbootprocesscreates.Alsoassignsa
TFTPServertoabootinghost.
TFTPServerFirstlevelbootimagethatisdownloadedfromtheTFTPServer.
HTTPServerStandardWebServer,usedtodownloadthefilesthatmakeupESXi(b.z,k.z,andso
on).
Aspartofthebootprocess,AutoDeploydownloadsthefilesthatmakeupESXi(b.z,k.z,andsoon).The
defaultbootprofileincludedinAutoDeployliststhosefiles.
TheAutoDeployimagerepositorycomesprepackagedwithanESXiimage.Youcanaddotherimagesto
therepositoryusingthedeploy-cmdCLI.SeeAddingaNewImagetotheAutoDeployImage
Repositoryonpage 20.
ThedeploycmddatabasestorestheinformationaboutthehoststoPXEbootandaboutavailableboot
profiles.Usethedeploy-cmdCLItoviewormanipulatedatabasecontent.
deploy-cmdscriptsareCGIandCLIscriptsavailableonAutoDeploy.Administratorsusethescriptsto
specifytheESXibootandconfigurationprocess.deploy-cmdscriptsconnecttoboththevCenterServer
system(hostprofiles)andthedeploy-cmddatabase.
Process Overview
Figure 12illustratestheinteractionbetweenAutoDeployandthephysicalhostonwhichyouPXEbootESXi
systems.
8 VMware, Inc.
Chapter 1 Introduction to VMware Auto Deploy
physical host
Give me an IP
VMware
Auto Deploy
DHCP server
IP and TFTP
ESXi assigned
to vCenter
Host profile
applied
AutoDeploysupportsautomaticPXEbootandcustomizationoflargenumbersofESXisystemsonthe
physicalhostsyoudesignate.BeforeyoucanuseAutoDeploy,youmustperformsomesetup,discussedin
UsingVMwareAutoDeployforESXiDeploymentonpage 13.
WhenyouarereadytoPXEbootthephysicalservers,AutoDeployinteractswiththeserversasfollows:
1 Theadministratorturnsonthephysicalserver.
2 WhathappensnextdependsonwhetheryouareusingtheAutoDeployDHCPserveroryourownDHCP
server.
IfyouareusingtheAutoDeployDHCPserver,AutoDeploydirectsthephysicalservertothe
locationfromwhichtodownloadthegPXEfileandthegPXE.confscript.
IfyouareusingadifferentDHCPserver,youmustsetitupsophysicalseversyouwanttobootusing
AutoDeploycontactthevirtualappliancesTFTPserver.AutoDeploysuppliesthedownload
locationsforthegPXEfileandthegPXE.confscript.
SeeSettingUptheDHCPServeronpage 15.
3 ThegPXE.confscriptlooksuptheMACaddressorassettagforeachhostinthedeploycmddatabase.
Thedatabasehasinformationaboutthebootprofileforeachhost.Youcanaddtheinformationtothe
databasebyusingthedeploy-cmdCLI.
4 gPXEusestheinformationinthedatabasetodownloadthefileslistedfromtheimagerepository.
5 ThelastiteminthegPXE.conffileisaURLthatpointstothelocal.tgzscriptlocatedonAutoDeploy.
Thelocal.tgzscriptgeneratesalocal.tgzfilebasedonthehostprofileandthebootprofile.
VMware, Inc. 9
VMware Auto Deploy Administrators Guide
6 TheESXihostnowbootsnormallyusingthefilesdownloadedfromtheimagerepositoryandthe
local.tgzfile.
7 Whenthehosthasfinishedbooting,itcontactsAutoDeploy.AutoDeployperformsthefollowingactions
tocompleteconfiguration:
a AddsthehosttothevCenterServersystemspecifiedinthebootprofile.
b Instructsthehosttoentermaintenancemode.
c Appliesthehostprofilespecifiedinthebootprofile.
d PerformsanyadditionalconfigurationbasedoninformationinthedatabaseandonthevCenter
Serversystem.Aspartoftheconfiguration,AutoDeployregistersvirtualmachinesthatwereonthe
host.Youcanperformadditionalconfigurationusingaplugin.Ifyoucreateaplugin,makesurethe
namestartswithanunderbar(_)character.
e Instructsthehosttoexitmaintenancemode.
8 Attheendoftheprocess,lockdownmode,TSM,andssharedisabledonthefreshlyconfiguredESXihost.
Afterinstallationiscomplete,VMwareToolsisautomaticallyavailableforimagesthatareontheAutoDeploy
applianceandreferencedbyarelativepath.
IfyoucreateabootprofilethatusesaURLtopointtotherepository,youcannotaccessVMwareToolsdirectly.
Forexample,ofthebootprofilewascreatedbyrunningdeploy-cmd createprofile -n test -r
http://localhost/vmw/vSphere/test,youcannotaccessVMwareToolsdirectly,butmustinstallthem
explicitlyfromvmware.com.
ESX/ESXiversion4.1systemtoinstallAutoDeployon.ThesystemmustbeabletoconnecttothevCenter
Serversystemonwhichyouwanttocreateandstorethehostprofiles.
10GBfreespaceand512MBofmemoryarerequiredfortheappliance.
Becausetheappliancerunsa64bitoperatingsystem,theESX/ESXihostonwhichitrunsmustsupport
64bitvirtualmachines.ThehostmusthaveoneofthefollowingCPUs:
ForAMDOpteronCPUs,theprocessormustbeRevEorlater.AMDVhardwarevirtualizationisnot
required.
IntelprocessorswithEM64TsupportwithVTenabled.
Opteron64bitprocessorsearlierthanrevEandIntelprocessorsthathaveEM64TsupportbutnotVT
supportenabled,donotsupporta64bitguestoperatingsystem.
vCenterServersystemversion4.1.
YoucanuseastandalonesystemorasystemmanagedbyavCenterServersystem.
YouneedavCenterServersystemtostorehostprofiles,addESXisystems,andapplythehostprofiles
tothoseESXisystems.ThiscanbeadifferentvCenterServersystemthantheonethatmanagesthe
ESX/ESXihostonwhichAutoDeployruns.
DHCPserversetup.IfnoDHCPserverisrunninginyourenvironment,usethebuiltinDHCPserver.See
AutoDeployDHCPServeronpage 15.IfaDHCPserverisrunninginyourenvironment,see
ThirdPartyDHCPServeronpage 16.
PhysicalmachinesforPXEbooting.
YoumustmakesurethatmachinesmeettheESXihardwarerequirements,specifiedinGettingStarted
withESXi,availableonwww.vmware.cominSupport&Downloads>Resources>Documentation.
YouneedaMACaddressorassettagofeachmachine.
10 VMware, Inc.
Chapter 1 Introduction to VMware Auto Deploy
VMwarerecommendsthatyouformataVMFSpartitiononalocaldiskforstoringlogsandscratch
spaceforeachmachine.
YoualsoneedthefollowinginformationtobeabletorespondtopromptsduringAutoDeployappliancesetup
HostnameforAutoDeploy.
Networkconfigurationinformation:StaticIPaddress,subnetmask,DNSServer,andgateway.
IMPORTANTVMwarerecommendssettingupAutoDeploywithastaticIPaddress.
Passwordfortheviadminuser.NorootuserisdefinedonAutoDeploy.Theviadminuserhasrootuser
privileges.
Youcancreateadiagnosticpartitionbyremovingtheno-auto-partitionlinefromthebootprofilethathost
uses.EachESXihostcreatedwiththatbootprofilehasadiagnosticpartitionandaVMFSpartition.
YoucanalsocreateadiagnosticpartitionusingthevSphereClient.
1 LogintothevSphereClientandselectthehostfromtheInventorypanel.
2 ClicktheConfigurationtabandclickStorageintheHardwarepanel.
3 ClickDatastoresandclickAddStorage.
4 SelectDiagnosticandclickNext.
IfyoudonotseeDiagnosticasanoption,thehostalreadyhasadiagnosticpartition.
Youcanqueryandscanthehostsdiagnosticpartitionbyrunningthevicfg-dumppart -lvCLI
command.
5 Specifythetypeofdiagnosticpartition.
Option Description
PrivateLocal Createsadiagnosticpartitiononalocaldisk.Thepartitionstoresfaultinformationonlyforyour
host.
PrivateSANStorage CreatesthediagnosticpartitiononanonsharedSANLUN.Thispartitionstoresfault
informationonlyforyourhost.
SharedSANStorage CreatesthediagnosticpartitiononasharedSANLUN.Thispartitionisaccessedbymultiple
hostsandcanstorefaultinformationformorethanonehost.
6 ClickNext.
7 SelectthedevicetouseforthediagnosticpartitionandclickNext.
8 ReviewthepartitionconfigurationinformationandclickFinish.
VMware, Inc. 11
VMware Auto Deploy Administrators Guide
12 VMware, Inc.
2
IMPORTANTUsetheAutoDeployPrerequisitesChecklistonpage 10todeterminewhetheryoursystem
setupsupportsAutoDeploy.
Thechapterincludesthefollowingtopics:
SettingUpthevCenterServerSystemonpage 13
DeployingandConfiguringtheApplianceonpage 13
SettingUptheDHCPServeronpage 15
MakingthevCenterServerSystemaTargetServeronpage 16
DeployingtheFirstHostwiththeDefaultBootProfileonpage 17
CustomizingtheFirstHostandCreatingaHostProfileonpage 17
CustomizingHostsUsingPluginsandBootOptionsonpage 17
DeployingAdditionalHostsonpage 19
YoumustsetupthevCenterServersystemtohaveatleastonedatacenter.Ifyoudonotcreateadatacenter,
AutoDeploycreatesoneandnamesitUntitled.
1 LogintoavSphereClientconnectedtovCenterServer4.1system.
2 Intheinventorypane,selecttheESX/ESXihosttowhichyouwanttodeployAutoDeploy.
3 SelectFile>DeployOVFTemplate.
TheDeployOVFTemplatewizardappears.
4 ClickBrowseandselectthelocationoftheOVAfile.
VMware, Inc. 13
VMware Auto Deploy Administrators Guide
5 ClickNextwhenthedownloaddetailsaredisplayed,andacceptthelicenseagreement.
6 Whenprompted,specifyanameandselectalocationandafolder(optional)forthevirtualappliance.
7 Selecttheresourcepoolforthevirtualappliance.
Youcanleavethedefault,whichisthetoplevelrootresourcepool.
8 Ifprompted,selectthedatastoretostorethevirtualapplianceonandclickNext.
9 SelectthenetworkmappingandclickNext.
IMPORTANTMakesureAutoDeployisconnectedtothemanagementnetworkonwhichthevCenter
ServerandESXisystemsthatAutoDeploywillinteractwitharelocated.
10 ReviewtheinformationandclickFinish.
ThewizarddeploystheAutoDeployappliancetothehostthatyouselected.The deployprocesscantake
severalminutes.
NextyouconfigureyourAutoDeployappliance.WhenyoustartAutoDeploythefirsttime,itpromptsyou
forthefollowingconfigurationinformation:
Hostnamefortheappliance.
Networkconfigurationforthevirtualappliance:IPaddress,subnetmask,DNSServer,andgateway.
IMPORTANTVMwarerecommendssettingupAutoDeploywithastaticIPaddress.
Passwordfortheviadminuser.NorootuserexistsonAutoDeploy,buttheviadminuserhasrootuser
privileges.
1 InthevSphereClient,rightclickthevirtualappliance,andclickPowerOn.
2 SelecttheConsoletab.
3 Answerthenetworkconfigurationprompts.
Ifmultiplenetworkadaptersareonthehost,youcanlaterusethevSphereClienttoaddasecondnetwork
adaptertoAutoDeploy.
4 Whenprompted,specifyahostnameforAutoDeploy.
Thenamecanincludealphanumericcharactersandcannotbelongerthan80characters.
YoucanlaterchangetheAutoDeployhostnamebymodifyingthe/etc/sysconfig/networkfile,asyou
wouldforanyLinuxsystem.
5 Whenprompted,specifyapasswordfortheviadminuseronthissystem.Thisuserhasrootprivileges;
norootuserisdefined.
ThepromptusestheLinuxpasswdutility.
Ifyouspecifyapasswordconsideredinsecure,forexample,adictionarywordorawordwithless
thansixcharacters,aBad Passwordmessageisdisplayed.Chooseadifferentpassword.For
informationaboutrequirementsforsecurepasswords,searchtheInternetforLinuxsecure
password.
Youcanusespecialcharactersdirectlyattheprompt.Youdonotneedtoprecedespecialcharacters
withescapecharactersorsurroundwordsthatcontainspecialcharactersinquotes.
YoucanlaterchangethepasswordfortheviadminuserusingtheLinuxpasswdcommand.
AutoDeployisnowconfiguredandpromptsyoutologinasviadmin.Asviadmin,youcanaddserversto
AutoDeployandruncommandsfromtheAutoDeployconsole.
14 VMware, Inc.
Chapter 2 Using VMware Auto Deploy for ESXi Deployment
VMwareToolsisautomaticallyavailableforimagesthatareontheAutoDeployapplianceandreferencedby
arelativepath.
IfyoucreateabootprofilethatusesaURLtopointtotherepository,youcannotaccessVMwareToolsdirectly.
Forexample,ofthebootprofilewascreatedbyrunningdeploy-cmd createprofile -n test -r
http://localhost/vmw/vSphere/test,youcannotaccessVMwareToolsdirectly,butmustinstallthem
explicitlyfromvmware.com.
AutoDeployDHCPServerIfyoudonothaveaDHCPserverinyourenvironment,hostscontactthe
AutoDeployDHCPserverandareautomaticallyaddedtothedeploycmddatabase.SeeAutoDeploy
DHCPServeronpage 15.
ThirdpartyDHCPServerIfaDHCPserverisalreadyrunninginyourenvironment,youmust
configurethatserversoitpointstoAutoDeployforallphysicalhostsyouwanttoPXEboot.What
preciselyyoudodependsontheDHCPserveryouareusing.
1 Rundeploy-cmd dhcpconfigtoturnontheAutoDeploybuiltinDHCPserver.
sudo deploy-cmd dhcpconfig
TheDHCPconfigurationisderivedfromtheappliancesstaticIPaddress.SeeResolvingIPAddress
Issuesonpage 15.
2 Specifytheviadminuserpasswordwhenprompted.NorootuserexistsonAutoDeploy.
3 GetalistofhostscurrentlymanagedbyAutoDeployandinthedeploy-cmddatabase.
deploy-cmd listhosts
Thelistisinitiallyempty.Youcanexplicitlyaddnewhostswiththedeploy-cmd addhostcommandif
youknowthebootNICMACaddress.Otherwise,hostsareaddedautomaticallywhentheycontactthe
DHCPserver.
4 GetalistofbootprofilesmanagedbyAutoDeploy.
deploy-cmd listprofiles
Adefaultprofile,whichbootstheversionofESXiintheappliance,isincluded.Newlydiscoveredhosts
thatwerenotpreviouslyaddedusingdeploy-cmd addhostsareautomaticallyassignedtothedefault
profile.
VMware, Inc. 15
VMware Auto Deploy Administrators Guide
ThedhcpdconfigurationofthehostsisbasedontheappliancesstaticIPaddress.ThebuiltinDHCPserver
handsoutaddressesthatareonthesamenetworksegmentastheappliance.Theserverdividesthenetwork
segmentintofifthsandusesthethirdandfourthsubsegmentsfordynamicaddresses.Forexample,ifthe
appliancesIPaddressis192.168.2.2anditsnetmaskis255.255.255.0,theDHCPrangeis
192.168.2.100192.168.2.200.Thebottomandtoppartsoftherangeareavailableforyouruse.
Ifthisconfigurationcausesproblems,forexample,becauseyouknowtheIPaddressesyouwanttoassignto
thePXEbootedhosts,openthedhcpd.conf.templatefileandchangeit.
Forexample,tobindahostsEthernetMACaddresstoanIPaddress,followthesesteps:
1 Modifythefile/etc/dhcpd.conf.template andaddthebinding,asinthefollowingexample:
host esx1 {
hardware ethernet 00:e0:63:81:f7:d3;
fixed-address 192.168.46.66;
}
2 Runthefollowingcommandtoregeneratetheetc/dhcpd.conffile.
sudo deploy-cmd dhcpconfig
3 Restarttheserver.
2 Specifyundionly.kpxe.vmw-hardwiredastheBoot filenameintheDHCPserversPXE
configuration.
HowyoumakethosechangesdependsontheDHCPserverthatyouareusing.Forexample,ifyouareusing
anISCDHCPserver,youchangethe/etc/dhcpd.conffile.IfyouareusingaMicrosoftDHCPserver,you
makethechangesusingtheGUI.
1 IntheAutoDeployconsole,type:
sudo vifp addserver <vc_name_or_IP>
<vc_name_or_IP>isthevCenterServernameorIPaddress.
2 SpecifythenameandpasswordofauserwithadministratorprivilegesonthevCenterServersystem
whenprompted.
3 (Optional)TosupportexecutionofvSphereCLIcommands,initializethetargetserver.
vifptarget
AfterthevCenterServerisatargetserver,anycommandsyourunagainstthatserverfromAutoDeploy
nolongerrequireauthentication.
YoucanaddmorethanonetargetservertoAutoDeployusingvifp addserver.ToaddESXihoststhatare
managedbydifferentvCenterServersystems,addallvCenterServersystemsastargetservers.SeethevSphere
ManagementAssistantGuide.
16 VMware, Inc.
Chapter 2 Using VMware Auto Deploy for ESXi Deployment
ThefirstPXEbootusesthedefaultprofileandrequiresonlythatyouturnonthephysicalmachineyouwant
toPXEboot.
Theprocessisautomaticandincludesthesesteps:
1 Theadministratorturnsonthesystem.
2 WhenthesystemlooksforanIPaddress,itfindsorisdirectedtotheDHCPserverthatissetuptohandle
deployment.TheDHCPserverperformsthesetasks:
a AssignsanIPaddresstothesystem.
b PointsthemachinetotheTFTPservertodownloadgPXE.TheversionofgPXEstoredonAuto
DeployiscustomizedtoworkintheAutoDeployenvironment.
c PointsthemachinetotheHTTPServertodownloadthegpxe.conffile.Forthefirstmachine,the
DHCPserverpointstoagpxe.conffilethatusesthedefaultbootprofile.
3 Thedefaultgpxe.conffileinstructsthehosttodownloadESXisoftware,whichisstoredintheimage
repositoryontheappliance.
4 TheESXisystembootsnormallyandcontactsAutoDeploy.
5 AutoDeployperformsthefollowingactionstocompleteconfiguration:
a AddsthehosttothevCenterServersystemspecifiedinthebootprofile.
b Instructsthehosttoentermaintenancemode.
c Appliesthehostprofilespecifiedinthebootprofile.
d Instructsthehosttoexitmaintenancemode.
1 OpenavSphereClientandconnecttothevCenterServeryouwanttouseastheprofilehost.
2 SelectHostProfiles.
3 ClickCreateProfileandfollowthewizardsteps(wizardhelpisavailable).
4 SetuparootpasswordfortheESXisystems:
a SelectthehostprofileandchooseEditProfile.
b IntheSecurityconfigurationsection,chooseAdministratorpassword.
c ChooseConfigureafixedadministratorpasswordfromthepulldownmenuandspecifytheroot
passwordfortheESXisystemstobecreatedbyAutoDeploy.
IMPORTANTHostprofilesmustbefullyspecified;theycannotincludesettingsthatprompttheuserfor
information.
VMware, Inc. 17
VMware Auto Deploy Administrators Guide
Using Plugins
ApluginisaPythonmoduleplacedinthefollowingdirectory:
/var/lib/spindoctor/.plugins/deployplugins
Thepluginmodulemustcontainthepluginversionvariable,PLUGIN_VERSION,settotheminimumplugin
interfacethepluginrequires.Thecurrentversionis(1, 0),resultinginthefollowingPythoncode:
PLUGIN_VERSION = (1, 0)
EachplugindefinesavmwHostUpfunctionthatAutoDeploycallsrightafterthehosthascompletedbooting,
butbeforethehostisaddedtothevCenterServersystem.Anyfunctionsyoudefineinsidethatfunctionare
calledaswell.Thefunctionsmuststartwithanunderbar(_)character.
vmwHostUp(pm, si, hostDesc, bootProfile)
Option Description
pm Internaluseonly.
si HostServiceInstanceobject.
hostDesc Hostdescriptionasreturnedbythedatabase.Itcanbetreatedasadictionarywithitems
relevanttohehost.Thecontentsofthedatabasesmatchestheoptionsyoucalladdhostand
updatehostwith.Thefollowinghostdescriptionelementsmightbeuseful.
host IDThenumberthatdeploy-cmdusestouniquelyidentifyahostinitsdatabase.
Youcanusethatnumberwithotherhostrelateddeploy-cmdcommands.
boot macBootMACaddresssetforthishost.
asset tagAssettagsetforthishost.
profile nameBootprofilethehostisusingasspecifiedinacalltodeploy-cmd addhost
anddeploy-cmd updatehost.
bootProfile Bootprofileasreturnedbythedatabase.Containstheinformationyouusedwhencreatingthe
bootprofile,forexample:
nameNameoftheprofile.
vcentervCenterServeraddress.
repoRepositoryaddress.
bootimagesListofbootimages.
hostprofileNameofthehostprofile.
hostfolderNameofthefolderorclustertobethehostslocation.
pluginsListofplugins.
Example 21isaPythoncodefragmentthatillustratesasimpleplugin.
PLUGIN_VERSION = (1, 0)
hostSystem = host.GetHostSystem(si)
aboutInfo = hostSystem.config.product
syslog.syslog(' %s %s %s' % (
aboutInfo.vendor,
aboutInfo.name,
aboutInfo.version))
Youcanaddpluginstobootprofilesusingthe--pluginoptiontodeploy-cmd createprofileand
deploy-cmd updateprofile.WhenAutoDeployprocesseshoststhatusethatbootprofile,itcallstheplugin.
18 VMware, Inc.
Chapter 2 Using VMware Auto Deploy for ESXi Deployment
AutoDeployalsosupportstheno-auto-partitionoption.Bydefaulttheoptionison.Youcanturnthe
optionoffbysettingtheoptiontotheemptystring,asfollows:
deploy-cmd --bootoptions=
Whenno-auto-partitionissettooff,thebootprocessautomaticallyformatsanylocallyattachedandblank
disks.Ifnodiagnosticpartitionexistsonthehost,thebootprocessformatsoneandformatstheremainingpart
ofthediskasaVMFSpartition.
IMPORTANTSASdisksarealwaysconsideredremote,sothebootprocessdoesnotperformautopartitioning
onaSASdisk.
1 Bootthefirsthost,makechanges,andcreateahostprofilethatusesthefirsthostisthereferencehost.
2 Updatethedefaultbootprofileusingdeploy-cmd updateprofile.
WhenAutoDeploybootsotherhosts,theyusetheupdatedprofile,andthereferencehostshostprofileis
appliedtothem.
Forthiscase,youneedonlytoturnonthesystemsyouwanttobootandtheyareconfiguredautomatically.
SeeUpdatingtheDefaultBootProfileonpage 19.
YoucanfurthercustomizethePXEboothoststousedifferentimages,beassignedtodifferentvCenterServer
systems,orincludeothercustominformationbycreatingadditionalbootprofiles.Forthiscase,youproceed
asfollows:
1 Addeachsystemtothedeploycmddatabasebyrunningdeploy-cmd addhost.
2 Specifythebootprofiletousebyusingthe--profileoptiontodeploy-cmd addhost.
Whenyouturnonasystem,itcontactsAutoDeployandisbootedwiththebootprofilethatmatchesits
MACaddressorassettag.
Youcancustomizethehostsasfollows:
Addanondefaultimagetotheimagerepository.SeeAddingaNewImagetotheAutoDeployImage
Repositoryonpage 20.
MakesurethehostprofileyouwanttoapplyisavailableonthevCenterServersystemyouwanttodeploy
to.
Createacustombootprofile.SeeCreatingaCustomBootProfileonpage 20.
Addahosttothedeploycmddatabase.Whenyouaddthehost,youcanspecifyacustomprofile.When
thehostlaterboots,AutoDeploychecksthedeploycmddatabaseandconfiguresthehostbasedonthe
customprofile.
TospecifythevCenterServersystemtoaddhoststo,runthiscommand:
deploy-cmd updateprofile --name=default --vcenter=<vcenter_name>
Tospecifythehostprofilethedefaultbootprofileshouldapplytoeachhost,runthiscommand:
VMware, Inc. 19
VMware Auto Deploy Administrators Guide
Toaddanewimage,youstartwiththeESXiinstallerISOfile.TheISOcontainstheDDimagethatisnormally
writtentodiskbydefault.Youinsteadusevibdditoextractthenecessaryfilesfromtheimageandplacethem
inthe/var/lib/deploy/imagesdirectory.
YoucanusethevibddiCLItomanageavSphereInstallationBundle(VIB).Mostvibddicommandsarefor
internaluseonly.UsersofAutoDeploycanusevibdditoquerywhatisinstalledandtoaddanewimageto
AutoDeploy.
Runvibddiwiththe-qoption.
sudo vibddi -i <VMware-VMvisor-dd> -q
Forexample:
# sudo vibddi -i VMware-VMvisor-big-26drivers-4.X.X-14XX15.x86_64.dd -q
< vmware-esx-tools-light (4.X.X-0.3.14XX15) >
< ESXi Firmware (4.X.X-14XX15) >
1 MounttheISOfilefromwhichyouwanttoextracttheDDimage.
sudo mount -o loop /opt/vmware/share/iso/VMware-VMvisor-Installer*.iso /mnt/iso
2 CreateadirectorytostoretheDDimagein.
$ mkdir /var/lib/deploy/images/my-image
$ cd /var/lib/deploy/images/my-image
3 Unziptheimageandwriteittothenewdirectory.
bunzip2 -c /mnt/iso/imagedd.bz2 > imagedd
4 ExtracttheESXisystemfilesandlockerfile.
sudo vibddi -i imagedd -e .
sudo vibddi -i imagedd -e . -a /opt/vmware/vibddi/conf/locker_export.cfg
5 Updatetheprofiletopointtothenewimage.
deploy-cmd updateprofile --name=default --repo=my-image
Multiplenamedbootprofilesallowyoutospecifydifferentconfigurationoptionsfordifferentsystemsthat
youboot.YoucanspecifytheESXiimagetouse,thevCenterServersystemtoassignthehostto,andthehost
profiletoapply.
1 MakesuretheESXiimageyouneedisintheimagerepository,andthehostprofileyouneedisavailable
onthevCenterServersystem.
2 Runthedeploy-cmd createprofilecommand,whichhasthefollowingoptions:
nameNameoftheprofile.
vcenterNameorIPaddressofavCenterServersystemtoaddthehostto.
20 VMware, Inc.
Chapter 2 Using VMware Auto Deploy for ESXi Deployment
repoImagerepository.DefaultstotherepositoryontheAutoDeployappliance.
bootimagesBootimagetouse.
bootoptionsKernelcommandlineoptions.
hostprofileNameofahostprofiletouse.ThehostprofilemustbeavailableonthespecifiedvCenter
Server.
pluginspluginmodulenames.
hostfoldervCenterServerfoldertoaddthismachineto.
Seedeploycmdcreateprofileonpage 24.
Whenyoulaterturnonthehost,AutoDeploychecksthedatabaseandfindsthatthehostisassignedtoaboot
profile.Thehostisbootedandusestheassignedoptions.
VMware, Inc. 21
VMware Auto Deploy Administrators Guide
22 VMware, Inc.
3
deploycmdaddhostonpage 23
deploycmdcreateprofileonpage 24
deploycmddeletehostonpage 26
deploycmddeleteprofileonpage 26
deploycmddhcpconfigonpage 26
deploycmdlisthostsonpage 27
deploycmdlistprofilesonpage 27
deploycmdupdatehostonpage 28
deploycmdupdateprofileonpage 28
IMPORTANTYouneedrootuserprivilegestorundeploy-cmd dhcpconfig.Youcanloginasviadminto
runanyoftheothercommands.
deploy-cmd addhost
Addsahosttothedeploycmddatabaseandallowsyoutospecifyacustombootprofile.
WhenyouturnonasystemthatissetuptocontactAutoDeploy,AutoDeploybootsthesystemwiththe
defaultprofilebydefault.Youspecifyacustombootprofileandothercustominformationinthedeploy-cmd
addhostcall.Theinformationisstoredinthedatabase.
Thebootprofileinformationinthedatabaseisusedduringthebootprocess.Thebootprofilecanspecify,for
example,theimageshouldrunonthehost,thehostprofiletoapply,andthefolderorclusteronthevCenter
Serversystemtoaddthehostto.
VMware, Inc. 23
VMware Auto Deploy Administrators Guide
Options
Option Description
--profile Setsthebootprofiletobindthehostto.Specifyanexistingbootprofilename.
<profile_name> Ifyoudonotspecifyaprofile,thecommandappliestothedefaultprofile.
Seedeploycmdlistprofilesonpage 27,deploycmdupdatehostonpage 28and
deploycmdupdateprofileonpage 28.
Output
Ifthecommandissuccessful,itprintsthefollowingvalues.
host IDThenumberthatdeploy-cmdusestouniquelyidentifyahostinitsdatabase.Youcanusethat
numberwithotherhostrelateddeploy-cmdcommands.
boot macBootMACaddresssetforthishost.
asset tagAssettagsetforthishost.
profile nameBootprofilethehostisusing.
Error Conditions
boot mac or asset tag already presentIftheMACaddressorassettagisalreadypresentinthe
deploy-cmddatabase,youcaneitherusethedeploy-cmd deletehostcommandtoremovethehostfrom
thedatabase,orthedeploy-cmd updatehostcommandtochangesettings.
Example
$ deploy-cmd addhost --bootmac=00:50:56:c0:00:08 --profile=profile42
AddsahostwiththeMACaddress00:50:56:c0:00:08andbindsittotheprofile42.
deploy-cmd createprofile
Createsanewbootprofile.
ThiscommandverifiesthatcredentialsforthespecifiedvCenterServersystemareavailable,andthatthe
specifiedhostprofileexistsonthevCenterServersystem.
Options
The--nameoptionisrequired.Allotheroptionsareoptional.Ifanoptionvalueistheemptystring,the
commandpullsdefaultvaluesforanoptionfromabootprofilenameddefault.Theexceptionistheplugins
option,whichisalwayssettotheemptystringifnovalueisset.
24 VMware, Inc.
Chapter 3 VMware Auto Deploy Interfaces
Option Description
--vcenter NameorIPaddressofavCenterServertoaddthehostto.
<vcenter_server_name> Ifthisoptionisanemptystring,thecommandusesadefaultvaluefromthebootprofile
nameddefault.IfdefaultdoesnotpointtoavCenterServer,thehostisnotaddedto
avCenterServersystemandnohostprofileisapplied.
--bootimages Acommaseparatedandorderedlistoffilesthatthemachinesshouldboot.Thedefault
<image_list> isb.z,k.z,s.z,c.z,oem.tgz,m.z.ThePXEbootloaderdownloadsthosefiles
separatelyfromtheimagerepositoryonthehost.
Ifnotspecified,defaultstothelistofESXiversion4.1imagefilesb.z,k.zandsoon.
--bootoptions Kernelcommandlineoptions.
<options> AutoDeploysupportstheno-auto-partitionoption,whichisturnedonbydefault.
SeeUsingBootOptionsonpage 19.
Tosetmultiplebootoptions,separatethembyspaces.
--hostprofile NameofahostprofileinthespecifiedvCenterServersystem.AutoDeployappliesthat
<profile_name> hostprofiletothehostthatusesthisbootprofile.Defaultisnohostprofile.
Ifyouaddahosttoacluster,AutoDeployignoresthisoptionandappliestheclusters
hostprofile.
Hostprofilesmustbefullyspecified,theycannotincludesettingsthatprompttheuser
forinformation.
Warnings
ThiscommandprintsawarningifnohostprofileornovCenterServersystemisspecified.
IfnovCenterServersystemisspecified,theESXisystemisnotaddedtoavCenterServersystemandno
hostprofilecanbeapplied.
Ifnohostprofileisspecified,andifthehostisattachedtoaclusterwithahostprofile,theclusterhost
profileisapplied.
Examples
deploy-cmd createprofile --name=Test1
CreatesaprofilenamedTest1.Youcancustomizetheprofilewithdeploy-cmd updateprofile.
VMware, Inc. 25
VMware Auto Deploy Administrators Guide
deploy-cmd deletehost
Removesthehostfromthedeploycmddatabase.
IftheDHCPserverissetupsothehostbootsusingAutoDeploy,thehostisautomaticallyaddedtothe
databasewhenitboots.
Options
Option Description
Error Conditions
host id not foundIfthehostIDisnotfound,checkthespelling.Usethedeploy-cmd listhosts
commandtolistallhostsandtheirdeploy-cmdIDnumbers.
deploy-cmd deleteprofile
Removesabootprofilefromthedeploycmddatabase.Allhostsmustbedissociatedfromtheprofilebefore
youcandeleteit.
Options
Option Description
Error Conditions
Profile doesn't existIftheprofiledoesnotexist,checkthespelling.
Profile is in use by hosts (that is, in the hostid to boot profile table)Dissociatehosts
thatareusingtheprofileusingdeploy-cmd updatehost.
Examples
deploy-cmd deleteprofile --name Test1
deploy-cmd dhcpconfig
ConfiguresDHCPontheAutoDeployvirtualappliance.TheDHCPconfigurationisbasedontheappliances
staticIPaddress.AnyaddressestheDHCPserverontheapplianceassignstohostsareonthesamenetwork
segmentastheapplianceitself.
Thenetworksegmentisdividedintofivesubsegments,andthethirdandfourthsubsegmentareusedfor
dynamicaddresses.IftheappliancesIPis192.168.2.2andnetmaskis255.255.255.0,theDHCPrangeis
192.168.2.100192.168.2.200.
Ontheappliance,thedhcpd.conffileisgeneratedfromatemplatefile,/etc/dhcpd.conf.template.To
updateDHCPsettings,updatethetemplatefileandregeneratetheconfigurationfile,asfollows:
1 Changethetemplate/etc/dhcpd.conf.templatefile(nottheconfigurationfile).
2 Rundeploy-cmd dhcpconfigagaintoregeneratethe/etc/dhcpd.conffile.
Options
Thiscommandsupportsnooptions.
26 VMware, Inc.
Chapter 3 VMware Auto Deploy Interfaces
Error Conditions
Anerrorresultsifanonrootuserattemptstorunthecommand.
TopreventyoufromaccidentallystartingtwoDHCPserversonthesamenetwork,thiscommandfailsifthe
applianceisconfiguredtogetitsnetworkconfigurationfromDHCP.UseastaticIPaddresstoavoidthis
problem.
Example
sudo deploy-cmd dhcpconfig
Createsthe/etc/dhcpd.confconfigurationfile,setsupthesystemtostarttheDHCPservereachtimeAuto
Deploystarts,andstartstheDHCPserver.
deploy-cmd listhosts
Displaysthefollowinginformationabouteachhostatthecommandprompt:
HostID
BootMACaddress
Assettag
Bootprofile
Lastbootdate
Lastbootstatus
Options
Thiscommandsupportsnooptions.
Example
deploy-cmd listhosts
Host ID: 1
Boot MAC : (none)
IP Address : (none)
Asset Tag : VERIDIAN01
Boot Profile: default
Status : NEW
deploy-cmd listprofiles
Displaysthefollowinginformationforeachbootprofileorforaspecifiedbootprofileatthecommandprompt.
Bootprofilename
vCenterServersystem
Bootrepository
Bootimages
Hostprofile
vCenterServerfolderordatacenter
Plugins
Seedeploycmdupdatehostonpage 28foradiscussionoftheitemsintheprofile.
Example
deploy-cmd listprofiles
Name: default
Repository : (default)
vCenter : (none)
Boot Images : b.z,k.z,s.z,c.z,oem.tgz,m.z
Boot Options: no-auto-partition
Plugins : (none)
VMware, Inc. 27
VMware Auto Deploy Administrators Guide
Listsprofileinformationforthetwospecifiedprofiles.
deploy-cmd updatehost
Assignsanewbootprofiletoahost.Anewbootprofileisoftennotneeded.Instead,youupdatethedefault
profileandthehostsusetheupdatedprofile.However,ifyourenvironmentusesmultipleprofiles,youcan
usethiscommandtoassignanondefaultprofiletoahost.
Thiscommanddoesnotaffectacurrentlyrunninghost.Toapplythechanges,rebootthehost.
Options
Option Description
Error Conditions
host id not foundIfthehostidisnotfound,youmighthavemisspelledtheID.Rundeploy-cmd
listhoststolistallhostsandtheirdeploy-cmdIDnumbers.
deploy-cmd updateprofile
Updatesanexistingbootprofile.Youmustspecifyanamefortheprofileyouwanttoupdate.Youcanspecify
alloptionsthatdeploy-cmd createprofilesupports.
Options
Thecommandonlychangesoptionsyouprovide.
Option Description
--vcenter NameorIPaddressofavCenterServertoaddthehostto.
<vcenter_server_name> Ifthisoptionisanemptystring,thecommandusesadefaultvaluefromthebootprofile
nameddefault.IfdefaultdoesnotpointtoavCenterServer,thehostisnotaddedto
avCenterServersystemandnohostprofileisapplied.
--repo <repo_url> ThelocationoftheESXisoftwarethatthehostsboundtothisprotocolshouldboot.You
canspecifyafilepathrelativeto /var/lib/deploy/imagesontheappliance,oraURL.
Forexample,avalueof 4.1.0-123456indicatesthatthefilesarein
/var/lib/deploy/images/4.1.0-123456.
IfyouupdateabootprofiletouseaURLtopointtotherepository,youcannotaccess
VMwareToolsdirectly.DownloadVMwareToolsfromvmware.comexplicitly.
--bootimages Acommaseparatedandorderedlistoffilesthatthemachinesshouldboot.Thedefault
<image_list> isb.z,k.z,s.z,c.z,oem.tgz,m.z.ThePXEbootloaderdownloadsthosefiles
separatelyfromtheimagerepositoryonthehost.
28 VMware, Inc.
Chapter 3 VMware Auto Deploy Interfaces
Option Description
--bootoptions Kernelcommandlineoptions.
<options> AutoDeploysupportstheno-auto-partitionoption,whichisturnedonbydefault.
SeeUsingBootOptionsonpage 19.
Tosetmultiplebootoptions,separatethembyspaces.
--hostprofile NameofahostprofileinthespecifiedvCenterServersystem.AutoDeployappliesthat
<profile_name> hostprofiletothehostthatusesthisbootprofile.Defaultisnohostprofile.
Ifyouaddahosttoacluster,AutoDeployignoresthisoptionandappliestheclusters
hostprofile.
Hostprofilesmustbefullyspecified,theycannotincludesettingsthatprompttheuser
forinformation.
Warnings
ThiscommandprintsawarningifnohostprofileornovCenterServersystemisspecified.
Examples
deploy-cmd updateprofile --name=default --bootimages=b.z,k.z,s.z,c.z,oem.tgz,m.z
--vcenter=192.NNN.N.N
UpdatesthedefaultprofiletousethespecifiedbootimagesandvCenterServersystem.
deploy-cmd updateprofile --name=Test1 --hostprofile=demoprofile
--hostfolder=/Techpubs/host/Test1
UpdatestheTest1profiletousethedemoprofilehostprofileandtoplacetheESXihostthatiscreatedusing
Test1intheTechpubs/host/Test1folder.
VMware, Inc. 29
VMware Auto Deploy Administrators Guide
30 VMware, Inc.
4
UsingLogstoResolveProblemsonpage 31
FrequentlyAskedQuestionsonpage 31
/var/log/messagesDHCPmessages,generalsysteminformation
/var/log/deployLoggingfromthedeploycmdcommandsandCGIscripts
/var/log/httpd (Apache)Webserverlogs
vCenterServerlogsYoucandownloadvCenterServerlogsandlogsforthehostsmanagedbyvCenter
ServerbyusingAdministration>ExportSystemLogsinthevSphereClient.
/var/coreESXicoredumps.Inmostcases,coredumpinformationisofinterestmainlytoVMware
TechnicalSupport.
InthevSphereClient,editthehostprofile.SettheAdministratorpassword,whichisintheSecurity
Configurationsection.
VMwarerecommendsthatyoucreateahostprofileinwhicharootuseraccountisdefinedandhasa
password.SeeTogeneratethehostprofileonpage 17.Youcanthenupdatethebootprofiletousethat
hostprofile.
Virtualmachinesarenotreregistered.WhenyouuseAutoDeploytoupdateanESX/ESXihost,for
example,touseanewversionofESXi,thevirtualmachinesthatwereregisteredwiththehostare
unregistered.
ThevCenterServerkeepstrackofvirtualmachinesandregistersthemduringhostbootifthebootprofile
wascreatedwiththe--vcenteroption.IfthevCenterServerisdown,orifyoudidnotspecifythe
vCenterServerinthebootprofilebutaddthehosttothevCenterServersystemexplicitly,thevirtual
machinesarenotreregistered.
HostsbootwhenvCenterServerisnotavailable.WhathappenswhenESXihostsbootandthevCenter
Serversystemspecifiedinthebootprofileisnotavailable?
VMware, Inc. 31
VMware Auto Deploy Administrators Guide
HostscannotcompletethebootprocesswhenthevCenterServersystemisnotavailable.Thehostreboots
periodicallyuntilthevCenterServersystembecomesavailable.
ProblemsreconnectingtovCenterServer.IrebootaPXEbootedESXihost,butthehostdoesnot
reconnecttothevCenterServersystem.
InthevSphereClient,chooseAdministration>vCenterServerSettingsanduncheckthevCenterrequires
verifiedhostSSLcertificatescheckbox.Thehostcanreconnectafterreboot.
DifferencesbetweenESXihosts.HowcanIdistinguishbetweenahostbootedandconfiguredbyAuto
DeployandotherESXihosts?
SomefunctionalityisnotavailableonaPXEboothost.PXEboothostsdonotsupport:
Resourcepools
Virtualmachineregistrationafterreboot
Hostprofilesarenotapplied.HostprofilesareavailableonthevCenterServersystembutarenot
applied.Whatstheproblem?
Makesurethehostprofileisfullyspecifiedanddoesnotrequireinputfromtheuser.Checkforthe
followinglogmessagein/var/log/deploy:
"error: host profile '<name>' requires user input; profiles must be fully specified"
32 VMware, Inc.