Sie sind auf Seite 1von 32

VMware Auto Deploy Administrators 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

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.

VMware Auto Deploy Administrators Guide

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.

Technical Support and Education Resources


Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou.Toaccessthecurrentversion ofthisbookandotherbooks,gotohttp://www.vmware.com/support/pubs.

Online and Telephone Support


Touseonlinesupporttosubmittechnicalsupportrequests,viewyourproductandcontractinformation,and registeryourproducts,gotohttp://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon priority1issues.Gotohttp://www.vmware.com/support/phone_support.

Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.

VMware, Inc.

VMware Auto Deploy Administrators Guide

VMware Professional Services


VMwareEducationServicescoursesofferextensivehandsonlabs,casestudyexamples,andcoursematerials designedtobeusedasonthejobreferencetools.Coursesareavailableonsite,intheclassroom,andlive online.Foronsitepilotprograms andimplementationbestpractices,VMwareConsultingServicesprovides offeringsto helpyouassess,plan,build,andmanageyourvirtualenvironment.Toaccessinformationabout educationclasses,certificationprograms,andconsultingservices,gotohttp://www.vmware.com/services.

VMware, Inc.

Introduction to VMware Auto Deploy

VMwareAutoDeploysupportsautomaticPXEboot(networkbootusingPXE)andcustomizationoflarge numbersofESXisystems.ThischapterintroducesAutoDeploy,discussesbenefitsandlimitations,andgives anoverviewoftheAutoDeployarchitectureandthedeploymentprocess. Thechapterincludesthesetopics:


AutoDeployComponentsonpage 7 AutoDeployArchitectureonpage 8 ProcessOverviewonpage 8 AutoDeployPrerequisitesChecklistonpage 10 DiagnosticPartitionsforESXiHostsonpage 11

Auto Deploy Components


AutoDeployallowsrapiddeploymentandconfigurationofalargenumberofESXihosts.AfteraDHCP serverhasbeensetup,AutoDeployPXEbootsmachinesthatareturnedonwithanESXiimage.AutoDeploy thencustomizestheESXisystemsusinghostprofilesandotherinformationstoredonthemanagingvCenter Serversystem.Youcansetuptheenvironmenttousedifferentimagesanddifferenthostprofilesfordifferent hosts. 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.

VMware Auto Deploy Administrators Guide

Auto Deploy Architecture


Figure 11isastaticillustrationofthecomponentsoftheAutoDeployvirtualapplianceandthevSphere componentsAutoDeployinteractswith. Figure 1-1. Auto Deploy Architecture
vCenter Server
Host profiles

VMware Auto Deploy Virtual Appliance

DHCP

TFTP

deploy-cmd database

gPXE.conf

local.tgz deploy-cmd Apache Image Repository

ESXi physical servers ESX/ESXi system

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.

VMware, Inc.

Chapter 1 Introduction to VMware Auto Deploy

Figure 1-2. Overview of PXE Boot Process

physical host

Give me an IP VMware Auto Deploy DHCP server IP and TFTP Give me a boot loader VMware Auto Deploy TFTP server gPXE file and pointer to gPXE.conf Give me configuration info VMware Auto Deploy HTTP server

For your MAC address or Asset Tag, the database tells me to construct this gpxe.conf file. Here it is.

ESXi boots using specified boot profile

Boot complete. Whats next? VMware Auto Deploy Your profile says you belong to this vCenter

ESXi assigned to vCenter Host profile applied

AutoDeploysupportsautomaticPXEbootandcustomizationoflargenumbersofESXisystemsonthe physicalhostsyoudesignate.BeforeyoucanuseAutoDeploy,youmustperformsomesetup,discussedin UsingVMwareAutoDeployforESXiDeploymentonpage 13. WhenyouarereadytoPXEbootthephysicalservers,AutoDeployinteractswiththeserversasfollows: 1 2 Theadministratorturnsonthephysicalserver. WhathappensnextdependsonwhetheryouareusingtheAutoDeployDHCPserveroryourownDHCP server.

IfyouareusingtheAutoDeployDHCPserver,AutoDeploydirectsthephysicalservertothe locationfromwhichtodownloadthegPXEfileandthegPXE.confscript. IfyouareusingadifferentDHCPserver,youmustsetitupsophysicalseversyouwanttobootusing AutoDeploycontactthevirtualappliancesTFTPserver.AutoDeploysuppliesthedownload locationsforthegPXEfileandthegPXE.confscript.

SeeSettingUptheDHCPServeronpage 15. 3 ThegPXE.confscriptlooksuptheMACaddressorassettagforeachhostinthedeploycmddatabase. Thedatabasehasinformationaboutthebootprofileforeachhost.Youcanaddtheinformationtothe databasebyusingthedeploy-cmdCLI. gPXEusestheinformationinthedatabasetodownloadthefileslistedfromtheimagerepository. ThelastiteminthegPXE.conffileisaURLthatpointstothelocal.tgzscriptlocatedonAutoDeploy. Thelocal.tgzscriptgeneratesalocal.tgzfilebasedonthehostprofileandthebootprofile.

4 5

VMware, Inc.

VMware Auto Deploy Administrators Guide

6 7

TheESXihostnowbootsnormallyusingthefilesdownloadedfromtheimagerepositoryandthe local.tgzfile. Whenthehosthasfinishedbooting,itcontactsAutoDeploy.AutoDeployperformsthefollowingactions tocompleteconfiguration: a b c d AddsthehosttothevCenterServersystemspecifiedinthebootprofile. Instructsthehosttoentermaintenancemode. Appliesthehostprofilespecifiedinthebootprofile. PerformsanyadditionalconfigurationbasedoninformationinthedatabaseandonthevCenter Serversystem.Aspartoftheconfiguration,AutoDeployregistersvirtualmachinesthatwereonthe host.Youcanperformadditionalconfigurationusingaplugin.Ifyoucreateaplugin,makesurethe namestartswithanunderbar(_)character. Instructsthehosttoexitmaintenancemode.

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

Auto Deploy Prerequisites Checklist


BeforeyoustartperformingthePXEbootprocessonyoursystem,makesureyoursystemmeetsthefollowing requirements.

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.


VMware, Inc.

10

Chapter 1 Introduction to VMware Auto Deploy

VMwarerecommendsthatyouformataVMFSpartitiononalocaldiskforstoringlogsandscratch spaceforeachmachine.

YoualsoneedthefollowinginformationtobeabletorespondtopromptsduringAutoDeployappliancesetup

HostnameforAutoDeploy. Networkconfigurationinformation:StaticIPaddress,subnetmask,DNSServer,andgateway.

IMPORTANTVMwarerecommendssettingupAutoDeploywithastaticIPaddress.

Passwordfortheviadminuser.NorootuserisdefinedonAutoDeploy.Theviadminuserhasrootuser privileges.

Diagnostic Partitions for ESXi Hosts


Bydefault,ESXisystemsbootedbyAutoDeploydonotincludeadiagnosticpartition(VMKcorepartition)for storingdiagnosticinformationsuchascoredumps.IfyouneedaccesstothecoredumpfilesontheESXihost, createadiagnosticpartitiononeachhost. Youcancreateadiagnosticpartitionbyremovingtheno-auto-partitionlinefromthebootprofilethathost uses.EachESXihostcreatedwiththatbootprofilehasadiagnosticpartitionandaVMFSpartition. YoucanalsocreateadiagnosticpartitionusingthevSphereClient. To create a diagnostic partition on your host 1 2 3 4 LogintothevSphereClientandselectthehostfromtheInventorypanel. ClicktheConfigurationtabandclickStorageintheHardwarepanel. ClickDatastoresandclickAddStorage. SelectDiagnosticandclickNext. IfyoudonotseeDiagnosticasanoption,thehostalreadyhasadiagnosticpartition. Youcanqueryandscanthehostsdiagnosticpartitionbyrunningthevicfg-dumppart -lvCLI command. 5 Specifythetypeofdiagnosticpartition.
Description Createsadiagnosticpartitiononalocaldisk.Thepartitionstoresfaultinformationonlyforyour host. CreatesthediagnosticpartitiononanonsharedSANLUN.Thispartitionstoresfault informationonlyforyourhost. CreatesthediagnosticpartitiononasharedSANLUN.Thispartitionisaccessedbymultiple hostsandcanstorefaultinformationformorethanonehost.

Option PrivateLocal PrivateSANStorage SharedSANStorage

6 7 8

ClickNext. SelectthedevicetouseforthediagnosticpartitionandclickNext. ReviewthepartitionconfigurationinformationandclickFinish.

VMware, Inc.

11

VMware Auto Deploy Administrators Guide

12

VMware, Inc.

Using VMware Auto Deploy for ESXi Deployment

SeveraltasksarerequiredfordeployingandcustomizingESXisystems.Inmostcases,youshouldperformthe tasksintheordertheyarepresented. IMPORTANTUsetheAutoDeployPrerequisitesChecklistonpage 10todeterminewhetheryoursystem setupsupportsAutoDeploy. Thechapterincludesthefollowingtopics:


SettingUpthevCenterServerSystemonpage 13 DeployingandConfiguringtheApplianceonpage 13 SettingUptheDHCPServeronpage 15 MakingthevCenterServerSystemaTargetServeronpage 16 DeployingtheFirstHostwiththeDefaultBootProfileonpage 17 CustomizingtheFirstHostandCreatingaHostProfileonpage 17 CustomizingHostsUsingPluginsandBootOptionsonpage 17 DeployingAdditionalHostsonpage 19

Setting Up the vCenter Server System


HostprofilesforcustomizingthefreshlybootedESXisystemsarestoredonthevCenterServersystem.You mustthereforesetupavCenterServertocollaboratewithAutoDeploy. YoumustsetupthevCenterServersystemtohaveatleastonedatacenter.Ifyoudonotcreateadatacenter, AutoDeploycreatesoneandnamesitUntitled.

Deploying and Configuring the Appliance


YoucandeploytheAutoDeployapplianceonanESX/ESXisystemofyourchoice.Thesystemcanbemanaged byadifferentvCenterServersystemthantheoneyouwanttoaddhoststo.Thesystemmustbeabletoconnect tovCenterServersystemyouwanttoaddhoststo. To deploy Auto Deploy 1 2 3 LogintoavSphereClientconnectedtovCenterServer4.1system. Intheinventorypane,selecttheESX/ESXihosttowhichyouwanttodeployAutoDeploy. SelectFile>DeployOVFTemplate. TheDeployOVFTemplatewizardappears. 4 ClickBrowseandselectthelocationoftheOVAfile.

VMware, Inc.

13

VMware Auto Deploy Administrators Guide

5 6 7

ClickNextwhenthedownloaddetailsaredisplayed,andacceptthelicenseagreement. Whenprompted,specifyanameandselectalocationandafolder(optional)forthevirtualappliance. Selecttheresourcepoolforthevirtualappliance. Youcanleavethedefault,whichisthetoplevelrootresourcepool.

8 9

Ifprompted,selectthedatastoretostorethevirtualapplianceonandclickNext. SelectthenetworkmappingandclickNext. IMPORTANTMakesureAutoDeployisconnectedtothemanagementnetworkonwhichthevCenter ServerandESXisystemsthatAutoDeploywillinteractwitharelocated.

10

ReviewtheinformationandclickFinish. ThewizarddeploystheAutoDeployappliancetothehostthatyouselected.The deployprocesscantake severalminutes.

NextyouconfigureyourAutoDeployappliance.WhenyoustartAutoDeploythefirsttime,itpromptsyou forthefollowingconfigurationinformation:

Hostnamefortheappliance. Networkconfigurationforthevirtualappliance:IPaddress,subnetmask,DNSServer,andgateway. IMPORTANTVMwarerecommendssettingupAutoDeploywithastaticIPaddress.

Passwordfortheviadminuser.NorootuserexistsonAutoDeploy,buttheviadminuserhasrootuser privileges.

To configure Auto Deploy 1 2 3 InthevSphereClient,rightclickthevirtualappliance,andclickPowerOn. SelecttheConsoletab. 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.

Setting Up the DHCP Server


YoumustcustomizetheDHCPserverconfigurationsohostsyouwanttoPXEbootaredirectedtoAuto Deploy.

AutoDeployDHCPServerIfyoudonothaveaDHCPserverinyourenvironment,hostscontactthe AutoDeployDHCPserverandareautomaticallyaddedtothedeploycmddatabase.SeeAutoDeploy DHCPServeronpage 15. ThirdpartyDHCPServerIfaDHCPserverisalreadyrunninginyourenvironment,youmust configurethatserversoitpointstoAutoDeployforallphysicalhostsyouwanttoPXEboot.What preciselyyoudodependsontheDHCPserveryouareusing.

Auto Deploy DHCP Server


IfyouintendtousetheDHCPserverinsideAutoDeploy,youmustpreparetheDHCPserverandmighthave toresolveIPaddressissues.

Preparing the DHCP Server


YoumustturnonthebuiltinDHCPserverandcanlistexistinghostsandprofilesbeforeyoustartturningon thehosts. To turn on DHCP and check Auto Deploy setup 1 Rundeploy-cmd dhcpconfigtoturnontheAutoDeploybuiltinDHCPserver.
sudo deploy-cmd dhcpconfig

TheDHCPconfigurationisderivedfromtheappliancesstaticIPaddress.SeeResolvingIPAddress Issuesonpage 15. 2 3 Specifytheviadminuserpasswordwhenprompted.NorootuserexistsonAutoDeploy. 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.

Resolving IP Address Issues


IfyoualreadyknowtheIPaddressesyouwanttouseforyourhosts,youmighthavetopreconfigurethemto avoidusingaddresseschosenbytheDHCPserver.

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; }

Runthefollowingcommandtoregeneratetheetc/dhcpd.conffile.
sudo deploy-cmd dhcpconfig

Restarttheserver.

Third-Party DHCP Server


IfyouhaveaDHCPserverinyourenvironment,youmustconfigurethatserversohostsyouwanttoPXEboot interactwithAutoDeploy. To configure DHCP servers to PXE boot through Auto Deploy 1 2 SpecifytheAutoDeployapplianceIPasthenext-serverorBoot Server Host NameintheDHCP serversPXEconfiguration. Specifyundionly.kpxe.vmw-hardwiredastheBoot filenameintheDHCPserversPXE configuration.

HowyoumakethosechangesdependsontheDHCPserverthatyouareusing.Forexample,ifyouareusing anISCDHCPserver,youchangethe/etc/dhcpd.conffile.IfyouareusingaMicrosoftDHCPserver,you makethechangesusingtheGUI.

Making the vCenter Server System a Target Server


YouuseavCenterServersystemtoconfiguretheESXisystemsthatarebootedbyAutoDeploy.Toallowthe AutoDeployappliancetologintothevCenterServerwithoutauthentication,makethevCenterServersystem atargetserver. 1 IntheAutoDeployconsole,type:
sudo vifp addserver <vc_name_or_IP>

<vc_name_or_IP>isthevCenterServernameorIPaddress. 2 3 SpecifythenameandpasswordofauserwithadministratorprivilegesonthevCenterServersystem whenprompted. (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

Deploying the First Host with the Default Boot Profile


AfteryouhavedeployedtheAutoDeployvirtualappliance,youcanPXEbootthefirstESXisystem. ThefirstPXEbootusesthedefaultprofileandrequiresonlythatyouturnonthephysicalmachineyouwant toPXEboot. Theprocessisautomaticandincludesthesesteps: 1 2 Theadministratorturnsonthesystem. WhenthesystemlooksforanIPaddress,itfindsorisdirectedtotheDHCPserverthatissetuptohandle deployment.TheDHCPserverperformsthesetasks: a b c 3 4 5 AssignsanIPaddresstothesystem. PointsthemachinetotheTFTPservertodownloadgPXE.TheversionofgPXEstoredonAuto DeployiscustomizedtoworkintheAutoDeployenvironment. PointsthemachinetotheHTTPServertodownloadthegpxe.conffile.Forthefirstmachine,the DHCPserverpointstoagpxe.conffilethatusesthedefaultbootprofile.

Thedefaultgpxe.conffileinstructsthehosttodownloadESXisoftware,whichisstoredintheimage repositoryontheappliance. TheESXisystembootsnormallyandcontactsAutoDeploy. AutoDeployperformsthefollowingactionstocompleteconfiguration: a b c d AddsthehosttothevCenterServersystemspecifiedinthebootprofile. Instructsthehosttoentermaintenancemode. Appliesthehostprofilespecifiedinthebootprofile. Instructsthehosttoexitmaintenancemode.

Customizing the First Host and Creating a Host Profile


Thefirsthostyoudeployisyourreferencehost.Youcancustomizethishostandcreateahostprofileforit.If youupdatethedefaultbootprofiletousethehostprofileofthereferencehost,AutoDeployappliesthehost profiletothePXEboothosts. To generate the host profile 1 2 3 4 OpenavSphereClientandconnecttothevCenterServeryouwanttouseastheprofilehost. SelectHostProfiles. ClickCreateProfileandfollowthewizardsteps(wizardhelpisavailable). SetuparootpasswordfortheESXisystems: a b c SelectthehostprofileandchooseEditProfile. IntheSecurityconfigurationsection,chooseAdministratorpassword. ChooseConfigureafixedadministratorpasswordfromthepulldownmenuandspecifytheroot passwordfortheESXisystemstobecreatedbyAutoDeploy.

IMPORTANTHostprofilesmustbefullyspecified;theycannotincludesettingsthatprompttheuserfor information.

Customizing Hosts Using Plugins and Boot Options


Youcancustomizesomeaspectsofahostsbehaviorusingpluginsandbootoptions.

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 pm si hostDesc Description Internaluseonly. HostServiceInstanceobject. 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. Example 2-1. Sample Plugin Code Fragment


import syslog from pyVim import host PLUGIN_VERSION = (1, 0) def vmwHostUp(_pm, si, hostDesc, bootProfile): syslog.syslog('Hello host #%s running profile %s' % (hostDesc['id'], bootProfile['name'])) 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

Using Boot Options


The--bootoptionsoptiontodeploy-cmd createprofileanddeploy-cmd updateprofileallowsyou tospecifybootoptionsforthehoststhatAutoDeployprocesses.Thisoptionallowsyoutospecifycommands youwouldotherwiseenteratthebootloaderpromptafterusingShifto. AutoDeployalsosupportstheno-auto-partitionoption.Bydefaulttheoptionison.Youcanturnthe optionoffbysettingtheoptiontotheemptystring,asfollows:
deploy-cmd --bootoptions=

Whenno-auto-partitionissettooff,thebootprocessautomaticallyformatsanylocallyattachedandblank disks.Ifnodiagnosticpartitionexistsonthehost,thebootprocessformatsoneandformatstheremainingpart ofthediskasaVMFSpartition. IMPORTANTSASdisksarealwaysconsideredremote,sothebootprocessdoesnotperformautopartitioning onaSASdisk.

Deploying Additional Hosts


Inmostcases,youuseAutoDeployasfollows: 1 2 Bootthefirsthost,makechanges,andcreateahostprofilethatusesthefirsthostisthereferencehost. Updatethedefaultbootprofileusingdeploy-cmd updateprofile.

WhenAutoDeploybootsotherhosts,theyusetheupdatedprofile,andthereferencehostshostprofileis appliedtothem. Forthiscase,youneedonlytoturnonthesystemsyouwanttobootandtheyareconfiguredautomatically. SeeUpdatingtheDefaultBootProfileonpage 19. YoucanfurthercustomizethePXEboothoststousedifferentimages,beassignedtodifferentvCenterServer systems,orincludeothercustominformationbycreatingadditionalbootprofiles.Forthiscase,youproceed asfollows: 1 2 Addeachsystemtothedeploycmddatabasebyrunningdeploy-cmd addhost. Specifythebootprofiletousebyusingthe--profileoptiontodeploy-cmd addhost. Whenyouturnonasystem,itcontactsAutoDeployandisbootedwiththebootprofilethatmatchesits MACaddressorassettag. Youcancustomizethehostsasfollows:

Addanondefaultimagetotheimagerepository.SeeAddingaNewImagetotheAutoDeployImage Repositoryonpage 20. MakesurethehostprofileyouwanttoapplyisavailableonthevCenterServersystemyouwanttodeploy to. Createacustombootprofile.SeeCreatingaCustomBootProfileonpage 20. Addahosttothedeploycmddatabase.Whenyouaddthehost,youcanspecifyacustomprofile.When thehostlaterboots,AutoDeploychecksthedeploycmddatabaseandconfiguresthehostbasedonthe customprofile.

Updating the Default Boot Profile


Ifyouexpecttouseonlyonebootprofileinyourenvironment,updatingthedefaultprofileisthebestsolution. Afteryouhaveupdatedthedefaultprofile,anyhostsyouturnonbootsusingtheupdatedprofile. TospecifythevCenterServersystemtoaddhoststo,runthiscommand:
deploy-cmd updateprofile --name=default --vcenter=<vcenter_name>

Tospecifythehostprofilethedefaultbootprofileshouldapplytoeachhost,runthiscommand:
VMware, Inc. 19

VMware Auto Deploy Administrators Guide

deploy-cmd updateprofile --name=default --hostprofile=<profile_name>

Adding a New Image to the Auto Deploy Image Repository


Bydefault,theAutoDeployimagerepositoryincludesanESXi4.1image.TouseotherversionsofESXi,you canaddanewimagetoAutoDeploy. Toaddanewimage,youstartwiththeESXiinstallerISOfile.TheISOcontainstheDDimagethatisnormally writtentodiskbydefault.Youinsteadusevibdditoextractthenecessaryfilesfromtheimageandplacethem inthe/var/lib/deploy/imagesdirectory. YoucanusethevibddiCLItomanageavSphereInstallationBundle(VIB).Mostvibddicommandsarefor internaluseonly.UsersofAutoDeploycanusevibdditoquerywhatisinstalledandtoaddanewimageto AutoDeploy. To check which VIBs are currently installed 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) >

To add a new image to Auto Deploy 1 MounttheISOfilefromwhichyouwanttoextracttheDDimage.


sudo mount -o loop /opt/vmware/share/iso/VMware-VMvisor-Installer*.iso /mnt/iso

CreateadirectorytostoretheDDimagein.
$ mkdir /var/lib/deploy/images/my-image $ cd /var/lib/deploy/images/my-image

Unziptheimageandwriteittothenewdirectory.
bunzip2 -c /mnt/iso/imagedd.bz2 > imagedd

ExtracttheESXisystemfilesandlockerfile.
sudo vibddi -i imagedd -e . sudo vibddi -i imagedd -e . -a /opt/vmware/vibddi/conf/locker_export.cfg

Updatetheprofiletopointtothenewimage.
deploy-cmd updateprofile --name=default --repo=my-image

Creating a Custom Boot Profile


AutoDeployallowsyoutoboothostswiththedefaultprofileortocreateprofilesandaddthemtotheAuto Deploydatabase. Multiplenamedbootprofilesallowyoutospecifydifferentconfigurationoptionsfordifferentsystemsthat youboot.YoucanspecifytheESXiimagetouse,thevCenterServersystemtoassignthehostto,andthehost profiletoapply. To create a boot profile 1 2 MakesuretheESXiimageyouneedisintheimagerepository,andthehostprofileyouneedisavailable onthevCenterServersystem. 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.

Adding a Host to the Database


WhenyouaddanESXihosttothedeploycmddatabase,youspecifywhichbootprofileituses.Theboot profiledeterminestheimage,vCenterServer,hostprofile,andothercharacteristicsforthehost. To add a host to the database Rundeploy-cmd addhost <host> ThecommandallowsyoutospecifyabootprofileandeithertheMACaddressortheassettagforthehost. Whenyoulaterturnonthehost,AutoDeploychecksthedatabaseandfindsthatthehostisassignedtoaboot profile.Thehostisbootedandusestheassignedoptions.

VMware, Inc.

21

VMware Auto Deploy Administrators Guide

22

VMware, Inc.

VMware Auto Deploy Interfaces

ThischapterisareferencetothecommandsthataresupportedbyAutoDeploy.Thechapterpresents commandsinalphabeticalorder.

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 Command Return Values


Commandsmightreturnerrors,butdonotgenerateanyconsoleoutputonsuccess.Commandsdoreturn UNIXexitcodestoindicatesuccessorerror.

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 --profile <profile_name> Description Setsthebootprofiletobindthehostto.Specifyanexistingbootprofilename. Ifyoudonotspecifyaprofile,thecommandappliestothedefaultprofile. Seedeploycmdlistprofilesonpage 27,deploycmdupdatehostonpage 28and deploycmdupdateprofileonpage 28. --bootmac <mac> MACaddressinhexadecimalform,forexample: 00:50:56:c0:00:01 MachinesareidentifiedbytheirethernetNICMACaddressesorbytheassettagsetin themachinesBIOS. Youmustspecifyeitherbootmacorassettagandcanspecifyboth. --assettag <asset_tag> Stringrepresentingtheassettag. ManymachinesletuserssettheassettagintheBIOSforinventorytracking.AutoDeploy canusetheassettagforidentification. Youmustspecifyeitherbootmacorassettagandcanspecifyboth.

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. profile not foundIfyougetthismessage,thesystemwasunabletofindthebootprofileyouspecified. Rundeploy-cmd listprofilestoverifythespelling,orrundeploy-cmd createprofiletocreatea profile. 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 --name <profile name>

Description Nameofthebootprofiletocreate. deploy-cmdusesthenametoidentifytheprofilewhenyoucallothercommands,for example,deploy-cmd updatehost.

--vcenter <vcenter_server_name>

NameorIPaddressofavCenterServertoaddthehostto. Ifthisoptionisanemptystring,thecommandusesadefaultvaluefromthebootprofile nameddefault.IfdefaultdoesnotpointtoavCenterServer,thehostisnotaddedto avCenterServersystemandnohostprofileisapplied. ThelocationoftheESXisoftwarethatthehostsboundtothisprotocolshouldboot.You canspecifyafilepathrelativeto /var/lib/deploy/imagesontheappliance,oraURL. Forexample,avalueof 4.1.0-123456indicatesthatthefilesarein /var/lib/deploy/images/4.1.0-123456. IfyoucreateabootprofilethatusesaURLtopointtotherepository,youcannotaccess VMwareToolsdirectly.DownloadVMwareToolsfromvmware.comexplicitly.

--repo <repo_url>

--bootimages <image_list>

Acommaseparatedandorderedlistoffilesthatthemachinesshouldboot.Thedefault isb.z,k.z,s.z,c.z,oem.tgz,m.z.ThePXEbootloaderdownloadsthosefiles separatelyfromtheimagerepositoryonthehost. Ifnotspecified,defaultstothelistofESXiversion4.1imagefilesb.z,k.zandsoon. Kernelcommandlineoptions. AutoDeploysupportstheno-auto-partitionoption,whichisturnedonbydefault. SeeUsingBootOptionsonpage 19. Tosetmultiplebootoptions,separatethembyspaces. NameofahostprofileinthespecifiedvCenterServersystem.AutoDeployappliesthat hostprofiletothehostthatusesthisbootprofile.Defaultisnohostprofile. Ifyouaddahosttoacluster,AutoDeployignoresthisoptionandappliestheclusters hostprofile. Hostprofilesmustbefullyspecified,theycannotincludesettingsthatprompttheuser forinformation.

--bootoptions <options>

--hostprofile <profile_name>

--plugins <names>

Pluginmodulenames.Namesofthepythonmodulesstoredin /var/lib/deploy/.plugins/deployplugins/... Youcanaddmodulestothedirectoryandspecifythemasoptionto--plugins.For example,ifaPythonmoduleisnamedmy_module.py,use--plugins my_module. Anyfunctionsinsidethemodulesyouaddmuststartwithanunderbar(_)character. Ifyouspecifymorethanonemodule,theyareexecutedintheordertheyarespecified. SeeUsingPluginsonpage 18 PathtothefolderorclusterinthevCenterServersystemtoaddthehostto,forexample /MyDataCenter/MyFolder. Ifyoudonotspecifythisoption,andifthehostisaddedtoavCenterServersystem,the hostisaddedtothefirstdatacenteronthatvCenterServer.Youcanlatermovethehost toadifferentdatacenter. Ifyouspecifyapath,thehostisaddedtothespecifiedfolderorcluster.Ifthehostwas addedtothevCenterServersystemduringadifferentbootprocess,thehostismovedto thespecifiedfolder. Ifthefolderorclusterdoesnotexist,amessageisloggedin/var/log/deploy.

--hostfolder <folder>

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 --hostid <host_id> Description HostIDassignedtothehostbyAutoDeploy.Usethedeploy-cmd listhostscommand tolistallhostsandtheirdeploy-cmdIDnumbers. WhenAutoDeployaddsahosttothedatabase,itassignsanIDtothehost.

Error Conditions host id not foundIfthehostIDisnotfound,checkthespelling.Usethedeploy-cmd listhosts commandtolistallhostsandtheirdeploy-cmdIDnumbers.

deploy-cmd deleteprofile
Removesabootprofilefromthedeploycmddatabase.Allhostsmustbedissociatedfromtheprofilebefore youcandeleteit. Options
Option --name <profile_name> Description Nameofthebootprofiletodelete

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. Cannot delete the default profileIfyoutrytodeletethedefaultprofile,thismessagedisplays.You cannotdeletethedefaultprofile. 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 2 Changethetemplate/etc/dhcpd.conf.templatefile(nottheconfigurationfile). 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 : IP Address : Asset Tag : Boot Profile: Status :

(none) (none) VERIDIAN01 default 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

deploy-cmd listprofiles profile1 profile2

Listsprofileinformationforthetwospecifiedprofiles.

deploy-cmd updatehost
Assignsanewbootprofiletoahost.Anewbootprofileisoftennotneeded.Instead,youupdatethedefault profileandthehostsusetheupdatedprofile.However,ifyourenvironmentusesmultipleprofiles,youcan usethiscommandtoassignanondefaultprofiletoahost. Thiscommanddoesnotaffectacurrentlyrunninghost.Toapplythechanges,rebootthehost. Options
Option --hostid <host_id> Description HostIDassignedtothehostbyAutoDeploy.Usethedeploy-cmd listhostscommand tolistallhostsandtheirdeploy-cmdIDnumbers. WhenAutoDeployaddsahosttothedatabase,itassignsanIDtothehost. UsethehostIDdefaulttoconfiguretheprofilethatunknownhostsarebootedwith. --profile <profile_name> Nameofaprofilecreatedwithdeploy-cmd createprofile.

Error Conditions host id not foundIfthehostidisnotfound,youmighthavemisspelledtheID.Rundeploy-cmd listhoststolistallhostsandtheirdeploy-cmdIDnumbers. profile not foundIftheprofileisnotfound,youmighthavemisspelledtheprofile.Rundeploy-cmd listprofiles tolistallprofiles.

deploy-cmd updateprofile
Updatesanexistingbootprofile.Youmustspecifyanamefortheprofileyouwanttoupdate.Youcanspecify alloptionsthatdeploy-cmd createprofilesupports. Options Thecommandonlychangesoptionsyouprovide.
Option --name <profile name> Description Nameofthebootprofiletoupdate. deploy-cmdusesthenametoidentifytheprofilewhenyoucallothercommands,for example,deploy-cmd updatehost. --vcenter <vcenter_server_name> NameorIPaddressofavCenterServertoaddthehostto. Ifthisoptionisanemptystring,thecommandusesadefaultvaluefromthebootprofile nameddefault.IfdefaultdoesnotpointtoavCenterServer,thehostisnotaddedto avCenterServersystemandnohostprofileisapplied. 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 <image_list> Acommaseparatedandorderedlistoffilesthatthemachinesshouldboot.Thedefault isb.z,k.z,s.z,c.z,oem.tgz,m.z.ThePXEbootloaderdownloadsthosefiles separatelyfromtheimagerepositoryonthehost.

--repo <repo_url>

28

VMware, Inc.

Chapter 3 VMware Auto Deploy Interfaces

Option --bootoptions <options>

Description Kernelcommandlineoptions. AutoDeploysupportstheno-auto-partitionoption,whichisturnedonbydefault. SeeUsingBootOptionsonpage 19. Tosetmultiplebootoptions,separatethembyspaces. NameofahostprofileinthespecifiedvCenterServersystem.AutoDeployappliesthat hostprofiletothehostthatusesthisbootprofile.Defaultisnohostprofile. Ifyouaddahosttoacluster,AutoDeployignoresthisoptionandappliestheclusters hostprofile. Hostprofilesmustbefullyspecified,theycannotincludesettingsthatprompttheuser forinformation.

--hostprofile <profile_name>

--plugins <names>

Pluginmodulenames.Namesofthepythonmodulesstoredin /var/lib/deploy/.plugins/deployplugins/... Youcanaddmodulestothedirectoryandspecifythemasoptionto--plugins.For example,ifaPythonmoduleisnamedmy_module.py,use--plugins my_module. Anyfunctionsinsidethemodulesyouaddmuststartwithanunderbar(_)character. Ifyouspecifymorethanonemodule,modulesareexecutedintheordertheyare specified. SeeUsingPluginsonpage 18 PathtothefolderorclusterinthevCenterServersystemtoaddthehostto,forexample /MyDataCenter/MyFolder. Ifyoudonotspecifythisoption,andifthehostisaddedtoavCenterServersystem,the hostisaddedtothefirstdatacenteronthatvCenterServer.Youcanlatermovethehost toadifferentdatacenter. Ifyouspecifyapath,thehostisaddedtothespecifiedfolderorcluster.Ifthehostwas addedtothevCenterServersystemduringadifferentbootprocess,thehostismovedto thespecifiedfolder. Ifthefolderorclusterdoesnotexist,amessageisloggedin/var/log/deploy.

--hostfolder <folder>

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.

Frequently Asked Questions and Troubleshooting

ThischapterhelpsyoufindlogsonVMwareAutoDeploy,listssomeFAQs(frequentlyaskedquestions),and discussesbestpractices.Thechapterincludesthesetopics:

UsingLogstoResolveProblemsonpage 31 FrequentlyAskedQuestionsonpage 31

Using Logs to Resolve Problems


IfyouhaveproblemswiththedeploymentofthecustomizedESXisystem,considerlookingatthefollowing logs:

/var/log/messagesDHCPmessages,generalsysteminformation /var/log/deployLoggingfromthedeploycmdcommandsandCGIscripts /var/log/httpd (Apache)Webserverlogs vCenterServerlogsYoucandownloadvCenterServerlogsandlogsforthehostsmanagedbyvCenter ServerbyusingAdministration>ExportSystemLogsinthevSphereClient. /var/coreESXicoredumps.Inmostcases,coredumpinformationisofinterestmainlytoVMware TechnicalSupport.

Frequently Asked Questions

Hostswithrootpassword.Iwanttocreateaprofilewithapresetrootpasswordforeachhost.Rightnow, therootpasswordistheemptystring. 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.

Das könnte Ihnen auch gefallen