ESX 4.0, ESXi 4.0 Installable and vCenter Server 4.0, Update 2 and later for ESX Server 3.5, ESX Server 3i version 3.5, VirtualCenter 2.5
This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
EN-000036-07
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 20072011 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.
Contents
AboutThisBook
1 BackingUpwithVMwareInfrastructure 11
BackupConcepts 11 WhattoBackUp 12 VirtualMachineContents 13 AccessingandManagingVirtualDiskFiles 13 BackupComponentsandApproaches 14 UsingTraditionalBackupMethods 15 TraditionalBackupConsiderations 16 BackingUptheESXServiceConsole 16 BackingUpVirtualMachines 17 RunningtheBackupClientinaVirtualMachine 17 RunningtheBackupClientintheESXServiceConsole 19 RunningtheBackupServerinaVirtualMachine 20 TreatingVirtualMachinesasFilesonSharedStorage 21 UsingVMwareConsolidatedBackup 22
2 VMwareConsolidatedBackup 23
VMwareConsolidatedBackupOverview 23 HowVMwareConsolidatedBackupWorks 24 VMwareConsolidatedBackupUsageModels 24 VMwareConsolidatedBackupWorkflow 28 TypesofBackups 29 PerformingImageLevelVirtualMachineBackups 30 PerformingFileLevelVirtualMachineBackups 30 VMwareConsolidatedBackupLimitations 30 ConsolidatedBackupSoftwareandHardwareRequirements 31 SettingUpVMwareConsolidatedBackup 32 ConfiguringVMwareESXServerandVirtualMachines 32 SettingUpaVCBProxy 33 ConfiguringWindowsontheVCBProxy 34
VMware, Inc.
ConfiguringNetworkingontheVCBProxy 35 ConfiguringThirdPartySoftwareontheVCBProxy 35 InstallingVMwareConsolidatedBackup 36 InstallingaBackupSoftwareIntegrationModule 36 ConfiguringVMwareConsolidatedBackup 37 ConfiguringUSERNAMEandPASSWORD 40 EnablingSSLCertificateVerification 41 ConfiguringSAN 43 UsingVMwareConsolidatedBackup 43 CreatingaVCBHelperVirtualMachine 44 AssigningBackupPrivilegestoaConsolidatedBackupUser 45 CreatingaVMwareConsolidatedBackupUserRole 45 CreatingaVMwareConsolidatedBackupProxyRole 46 GroupingVirtualMachines 47 ConfiguringBackupJobs 48 FirstTimeBackup 48 QuiescingMechanisms 49 UsingVMwareVSSComponents 50 UsingSYNCDriver 51 RunningCustomQuiescingScripts 51 AdvancedConfigurations 53 CancelingaBackupJob 53 CleaningUpAfteraFailedBackupJob 53 UpgradingConsolidatedBackup 54
3 RestorationandDisasterRecovery 55
RestoringVirtualMachinesUsingVMwareConsolidatedBackup 55 UsingVMwareConvertertoRestoreVirtualMachineImages 56 UsingthevcbRestoreUtilitytoRestoreVirtualMachines 56 CentralizedRestore 56 PerGroupRestore 57 DirectRestoretoaVirtualMachine 57 DataRecovery 57
4 BackupScenariosandTroubleshooting 59
BackupUsageScenarios 59 TypicalConsolidatedBackupUsageScenario 60 Troubleshooting 61 ChangingBackupPoliciesafterESXServer2.xUpgrades 61 IdentifyingVMFSVolumesinBackupGUI 61
4 VMware, Inc.
Contents
A UsingServiceConsoletoBackUpandRestoreVirtualMachines 63
GeneralConfigurationSettingsforConsolidatedBackupUtilities 64 ConfigurationFileSettings 64 BackingUpVirtualMachines 66 PerformingBackups 66 IdentifyingVirtualMachines 67 IdentifyingVirtualMachinesbyDNSNameorIPAddress 67 IdentifyingVirtualMachinesbyBIOSUUID 68 IdentifyingVirtualMachinesbyMoRef 68 DisplayingVirtualMachineInformation 69 SpecifyingBackupDestinations 69 BackingUptoaLocalDirectory 69 BackingUptoaRemoteServer 69 ArchivingVirtualMachines 70 RestoringVirtualMachines 71 RestoringVirtualMachinestoOriginalLocations 71 RestoringVirtualMachinestoAlternativeLocations 71 CopyingaCatalogFile 72 EditingaCatalogFile 72 RestoringVirtualMachinesUsinganAlternateCatalog 74 NonInteractiveUseofthevcbRestoreUtility 74 RestoringVirtualMachinesfromArchives 75
B RestoringVirtualMachinesfromESXServer2.5.xtoESXServer3.x 77
SettingConfigurationParameters 77 RestoringESX2.5.xServerVirtualMachines 78
Index 79
VMware, Inc.
VMware, Inc.
FortopicsspecifictoESX4.0,thisbookusesthetermESX4. FortopicsspecifictoESXi4.0,thisbookusesthetermESXi4. FortopicsspecifictoESXServer3.5,thisbookusesthetermESXServer3. FortopicsspecifictoESXServer3iversion3.5,thisbookusestheterm ESX Server 3. Fortopicscommontobothproducts,thisbookusesthetermESXServer. Whentheidentificationofaspecificreleaseisimportanttoadiscussion,thisbook referstotheproductbyitsfull,versionedname. WhenadiscussionappliestoallversionsofESXServerfor VMware Infrastructure 3,thisbookusesthetermESXServer3.x. ThisbookusesVirtualCenterindiscussionsthatalsoapplytovCenterServerin VMwarevSphere4.
VMware, Inc.
Intended Audience
Thismanualisintendedforanyonewhowantstoperformbackupandrestoretasks usingVMwareInfrastructure.Theinformationinthismanualiswrittenfor experiencedWindowsorLinuxsystemadministratorswhoarefamiliarwithvirtual machinetechnologyanddatacenteroperations.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhave comments,sendyourfeedbackto: docfeedback@vmware.com
VMware, Inc.
Support Offerings
FindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds.Goto: http://www.vmware.com/support/services
VMware, Inc.
10
VMware, Inc.
Backup Concepts
Thefollowingconceptsareessentialforyourunderstandingofbackupprocedures:
VMware, Inc.
Incrementalbackup.Backsuponlyfilesthathavechangedsincethelastbackup, whetheritisafullorincrementalbackup. Quiescing.Aprocessofbringingtheondiskdataofaphysicalorvirtual computerintoastatesuitableforbackups.Thisprocessmightincludesuch operationssuchasflushingdirtybuffersfromtheoperatingsystemsinmemory cachetodisk,orotherhigherlevelapplicationspecifictasks. VCBproxy.InthecontextofVMwareConsolidatedBackup,VCBproxyisa physicalorvirtualmachinerunningMicrosoftWindowsServer,Consolidated Backup,andthirdpartybackupsoftware.Usedtoperformfileleveland imagelevelvirtualmachinebackups.
What to Back Up
WithintheESXServerenvironment,youneedtobackupthefollowingmajoritems:
ServiceConsole(ESXServer3andESX4only).Theserviceconsole,acustomized versionofLinux,istheESXcommandlinemanagementinterface.Itprovidestools andacommandpromptformoredirectmanagementofESX.WiththeVI Clientor vSphereClientbeingthemaininterfacetotheESXhost,usetheserviceconsoleto performonlyadvancedadministrationoperations. NOTEESX4iandESXServer3idonothaveaserviceconsole. Duringitslifetime,theserviceconsoledoesnotexperienceanymajorchangesother thanperiodicupgrades.Incaseofafailure,youcanrecoverthestateofyourservice consolebyreinstallingESX.Ifyoudecidetobackuptheserviceconsole,youdonot needtobackitupasfrequentlyasthevirtualmachinesandtheirdata.
12
VMware, Inc.
VMware, Inc.
13
Formoreinformationonthevmkfstoolscommand,seetheESXServer3Server ConfigurationGuideorESXServer3iConfigurationGuide.
BackupClient(BackupAgent).Aprogramthatscansvirtualmachinefilesystems andtransfersdatatobebackeduptoabackupserver.Duringrestoreoperations, thebackupclientwritesthedataintothefilesystems. BackupServer.Aprogramthatwritesthedata,pushedbythebackupclient,toa backupmedium,suchasarobotictapelibrary.Duringrestoreoperation,the backupserverreadsthedatafromthebackupmediumandpushesittothebackup client. Scheduler.Aprogramthatallowsyoutoscheduleregularbackupjobsand coordinatetheirexecution.Youcanschedulebackupsatperiodicintervals,oryou canscheduleindividualfilestobebackedupimmediatelyaftertheyhavebeen updated.
14
VMware, Inc.
Dependingonwhereyouwanttoruneachcomponent,chooseoneofthefollowing approaches:
VMwareConsolidatedBackup.IfusedwithSANstorage,ConsolidatedBackup enablesoffloadedandimpactfreebackupsforvirtualmachinesrunningon ESX Server.Thisapproachletsyouusethevirtualmachinesnapshottechnology andSANbaseddatatransferinconjunctionwithtraditionalfilebasedbackup software.WhenrunningConsolidatedBackup,youcanbackupvirtualmachine contentsfromacentralizedMicrosoftWindowsServerbackupproxyratherthan directlyfromtheESXServersystem.Utilizingabackupproxyreducestheloadon ESXServerallowingittorunmorevirtualmachines. IfyoudonothaveSAN,youcanuseConsolidatedBackupintheLANmode.This modeletsyourunConsolidatedBackuponaphysicalmachineconnectedtoyour ESXServersystemoverregularTCP/IPnetwork,orinoneofthevirtualmachines onyourESXServerhost. SeeVMwareConsolidatedBackuponpage 23.
VMware, Inc.
15
16
VMware, Inc.
Runbackupclientsfromwithinavirtualmachineperformingfilelevelor imagelevelbackups.Aslongasyouarebackingupoverthenetwork,no compatibilityguideisneeded.SeeRunningtheBackupClientinaVirtual Machineonpage 17. RunbackupclientsfromtheESXserviceconsole,backingupvirtualmachinesin theirentiretyasfilesresidingintheVMFSfilesystem.SeeRunningtheBackup ClientintheESXServiceConsoleonpage 19. Backupvirtualmachinedatabyrunningabackupserverwithinavirtualmachine thatisconnectedtoatapedriveorotherSCSIbasedbackupmediaattachedtothe physicalsystem.SeeRunningtheBackupServerinaVirtualMachineonpage 20. Whenvirtualmachinefilesresideonsharedstorage,usestoragebasedimagingon storagesuchasSAN,NAS,oriSCSI,oranindependentbackupserver(aproxy backupserverorNDMP)tobackupvirtualmachinefiles.SeeTreatingVirtual MachinesasFilesonSharedStorageonpage 21.
NOTERunningthebackupserverintheESXserviceconsoleisnotsupported.
VMware, Inc.
17
Method1isgenerallyusedforfilelevelbackupsofthedatastoredwithinthevirtual machinesdiskimage. Table 1-1. Backup Client in One Virtual Machine, Backup Server in Another Virtual Machine
Recommended: File-level restore: Full virtual machine restore: Quiescing: Load on ESX Server: LAN-free backup: Manageability: WhenhardwareforaVCBproxyorbackupserverisnt available Veryeasy No Excellent Extremelyhigh No Verypoor
Method 2: Backup Server in a Physical Machine WithMethod2,youdeploythebackupclientinavirtualmachinewhilethebackup serverrunsonaphysicalmachine. NOTEInsteadofMethod2,considerusingConsolidatedBackup. UseMethod2forfilelevelbackupsofthedatastoredwithinthevirtualmachinesdisk image. Table 1-2. Backup Client in a Virtual Machine, Backup Server in a Physical Machine
Recommended: File-level restore: Full virtual machine restore: Quiescing: Load on ESX Server: LAN-free backup: Manageability: VCBcanbeusedinstead VeryEasy No Excellent High No Verypoor
18
VMware, Inc.
Poweroffyourvirtualmachines. Usesnapshotstobackuprunningvirtualmachines.
Method 3: Backup Server in a Virtual Machine WithMethod3,youdeploythebackupclientintheESXserviceconsolewhilethe backupserverrunsinthevirtualmachine. NOTEUseMethod3onlywhenseparatehardwareforaVCBproxyorbackupserver isnotavailable. Method3isusedtoperformimagelevellbackupsorbackupsofentirevirtual machines. Table 1-3. Backup Client in a ESX Service Console, Backup Client in a Virtual Machine
Recommended: File-level restore: Full virtual machine restore: Quiescing: Load on ESX Server: LAN-free backup: Manageability: WhenhardwareforaVCBproxyorbackupserverisnt available No Veryeasy Excellent Extremelyhigh No Verypoor
VMware, Inc.
19
Method 4: Backup Server in a Physical Machine WithMethod4,youdeploythebackupclientintheESXserviceconsolewhilethe backupserverrunsonaphysicalmachine. NOTEInsteadofMethod4considerusingConsolidatedBackup. Method4isusedtoperformimagelevelbackups. Table 1-4. Backup Client in an ESX Service Console, Backup Server in a Physical Machine
Recommended: File-level restore: Full virtual machine restore: Quiescing: Load on ESX Server: LAN-free backup: Manageability/Scalability: VCBcanbeusedinstead. No VeryEasy Excellent High No Verypoor
ForinformationonattachingaSCSIbasedtapedrivetoyourvirtualmachine,seeBasic SystemAdministration.
20
VMware, Inc.
VMware, Inc.
21
22
VMware, Inc.
VMware, Inc.
23
ThefollowingarethekeyfeaturesofConsolidatedBackup:
MostmajorbackupapplicationsintegratewithConsolidatedBackupproviding youwithafastandefficientwayofbackingupdatainvirtualmachines. ConsolidatedBackupeliminatestheneedforhavingabackupagentinstalledin eachvirtualmachineyouwanttoprotect. ConsolidatedBackupcanreadvirtualdiskdatadirectlyfromyourSANstorage deviceusingFibreChanneloriSCSI,orthroughtheESXServerI/Ostackorusea networkconnectiontoanESXServerhosttoaccessvirtualdiskdata. ConsolidatedBackupcanruninavirtualmachine. ConsolidatedBackupsupportsfilelevelfullandincrementalbackupsforvirtual machinesrunningMicrosoftWindowsoperatingsystemandimagelevelbackups forvirtualmachinesrunninganyoperatingsystem. YoucanuseConsolidatedBackupagainstasingleESXServerhostorwitha VirtualCenterServerthatmanagesanumberofESXServers.
24
VMware, Inc.
ConsolidatedBackupprovidesthefollowingmethodsofaccessingvirtualmachine diskdata:
SAN Mode YouselectthismodewhenyourESXServerstoresitsvirtualmachinedisksonFibre ChannelSANoriSCSISAN.Whenusingthismode,youcancompletelyoffload backupstoaphysicalVCBproxy. InadditionwithFibreChannel,youavoidmovingdataacrossthenetwork.Inthiscase, iftheVCBproxyisyourmediaserver,youcangetcompletelyLANfreebackupsof yourvirtualmachines. Figure 21illustrateshowConsolidatedBackupworksintheSANmode. Figure 2-1. VMware Consolidated Backup in the SAN mode
LAN
VCB proxy
backup software
integration module
Consolidated Backup
VMware, Inc.
25
SCSI Hot-Add Mode IntheSCSIHotAddmode,yousetuponeofyourvirtualmachinesasaVCBproxy anduseittobackupothervirtualmachinesresidingonstoragevisibletothe ESX ServerthathoststheVCBproxyvirtualmachine.Thismodeeliminatestheneedof havingadedicatedphysicalmachineforyourVCBproxyanddoesnotrequireyouto exposeSANLUNstotheWindowsVCBproxy. Inthismode,youcanuseConsolidatedBackuptoprotectanyvirtualdisksonanytype ofstorageavailabletoyourESXServerhost,includingNASorlocalstorage. (SEEUPDATE)Theonlyexceptionisthatitdoesnotbackupanydisksofthevirtual machinethathasanyindependentdisk,PhysicalCompatibilityRDM,orIDE(Thisis applicabletoESX4andESXi4.) ConsolidatedBackupcreatesasnapshotofthevirtualdisktobeprotectedandhotadds thesnapshottotheVCBproxy,allowingittoaccessvirtualmachinediskdata.TheVCB proxyreadsthedatathroughtheI/OstackoftheESXhost. Figure 2-2. VMware Consolidated Backup in the Hot-Add Mode
LAN
ESX Server VCB Proxy virtual machine backup software integration module
Consolidated Backup
TobeabletorunConsolidatedBackupintheSCSIHotAddmode:
26
RunningConsolidatedBackupintheSCSIHotAddmodeprovidestheLANfree capabilitiesoftheSANmodebecausethevirtualdiskdataistransferredfromthe ESX ServerI/Ostack.AlthoughthismodeisnotasefficientastheSANmode,which doesnotcauseanyoverheadontheESXServerhost,itisstillmoreefficientthanthe LANmode. LAN Mode (NBD Mode) YouselectthismodewhenyourESXServerdoesnothaveaccesstoaSAN,butuses localstoragedevicesorNAStostoreitsvirtualmachinedisks. Inthismode,ConsolidatedBackupusesanoverthenetworkprotocoltoaccessthe virtualdisk.TheESXServerhostreadsthedatafromthestoragedeviceandsendsit acrossanetworkchanneltotheVCBproxy. TobeabletorunConsolidatedBackupintheLANmode:
Figure 23illustrateshowConsolidatedBackupworksintheLANmode. Figure 2-3. VMware Consolidated Backup in the LAN mode
LAN
VCB proxy
backup software
integration module
VMware, Inc.
27
YouarenotrequiredtostorevirtualdisksonaSAN.Youcanuseanystorage device,includingNAS,thatESXServercanaccess. YouarenotrequiredtohaveadedicatedphysicalserverforyourVCBproxy.In additiontosettingupaphysicalserverastheVCBproxy,youhaveanoptionof configuringoneofyourvirtualmachinesastheVCBproxy. WhilethisconfigurationdoesnotcompletelyoffloadbackupprocessesfromtheESX Serverhost,itstillhasanadvantageoverusingabackupagentintheserviceconsole orintheproductionvirtualmachine.Youcanusetheadvancedresourcescheduling capabilitiesofVMwareInfrastructuretopreventthevirtualmachinerunningyour backupsfromimpactingtheperformanceofyourproductionworkloads.Forexample, youcanputthevirtualmachineperformingyourbackupsandyourproductionvirtual machinesindifferentresourcepools.SeetheResourceManagementGuide.
UnquiescesthevirtualmachinethatwasquiescedinStep b.
VMware, Inc.
(Optional)Runsyourcustompostthawscriptinthevirtualmachine. ThepostthawscriptreversesanychangesmadebytheprefreezescriptinStep a.
Makesthevirtualmachinesnapshotavailabletothethirdpartysoftware:
Types of Backups
ConsolidatedBackupsupportsimagelevelbackupsforvirtualmachinesrunningany guestoperatingsystemandfilelevelbackupsforvirtualmachinesrunningMicrosoft Windowsoperatingsystems.
Thethirdpartybackupsoftwarepicksupthevirtualmachinediskimagesand configurationfilesandmovesthemtothebackupmedium.
30
VMware, Inc.
VMware, Inc.
31
Networkadapter(NIC).
TouseConsolidatedBackupintheSANmode,additionalrequirementsinclude:
3 4
32
VMware, Inc.
VirtualmachinesyouareplanningtobackuphavetheirvirtualdisksonVMFS datastorescreatedonlocalstorage,oroniSCSIorFCSAN.Virtualmachinescan alsouseRDMsinvirtualcompatibilitymode.ConsolidatedBackupdoesnot supportRDMsinphysicalcompatibilitymode. IfyouplantouseConsolidatedBackupintheLANmode,thesizeofyourvirtual diskfilesshouldnotexceed1TB. ThelatestversionofVMwareToolsisinstalledineachvirtualmachineyouare planningtobackup.WithoutthelatestversionofVMwareTools,thesnapshots thatConsolidatedBackupcreatesforbackupsarecrashconsistentonly.Thatis,no filesystemsynchronizationisperformed. Forfilelevelbackups,yourvirtualmachinesrunMicrosoftWindowsNT4.0, Windows2000Server,WindowsXPProfessional,WindowsServer2003, Windows Vista,orWindowsServer2008operatingsystems. Imagelevelvirtualmachinebackupsaresupportedforallguestoperating systems.
VMware, Inc.
33
4 5 6
Cleanoutentriesofpreviouslymountedvolumesintheregistrybytypingatthe Diskpartcommandprompt:
automount scrub
34
VMware, Inc.
ExittheDiskpartutilitybytyping:
exit
9 10 11
ForinformationonconfiguringNetworking,seetheESXServer3ConfigurationGuide, ESXServer3iConfigurationGuide,ESXConfigurationGuide,orESXiConfigurationGuide.
VMware, Inc.
35
Afteryouinstallandconfigureyourthirdpartybackupsoftware,youcanverifyitby runningabackupandrestorationjobonalocaldirectoryontheVCBproxy.
36
VMware, Inc.
WhenconfiguringConsolidatedBackup,makesuretospecifyalloptionsinthe config.js filethatdonothaveanydefaultvalues. Table 21providesanoverviewofalltheconfigurationsettingsinthisfile. Table 2-1. Consolidated Backup Configuration Settings
Option BACKUPROOT Default C:\\mnt Description Directoryinwhichallthevirtualmachinebackupjobs reside.Makesurethisdirectoryexistsbeforeyoustart virtualmachinebackups. Foreachbackupjob,asubdirectorywithauniquename derivedfromthebackuptypeandthevirtualmachine nameiscreatedhere. Forimagelevelvirtualmachinebackups,thevolume containingthismountpointmustbelargeenoughto holdtheexporteddiskimagesofthelargestvirtual machinetobehandled. HOST PORT USERNAME PASSWORD (no default) 443 (no default) (no default) HostnameoftheVirtualCenterserverortheESXServer hostusedbytheVCBproxy. PortnumbertoconnecttotheVirtualCenteror ESX Serverhost. SeeConfiguringUSERNAMEandPASSWORDon page 40. SeeConfiguringUSERNAMEandPASSWORDon page 40.
VMware, Inc.
37
san(forSANmode) Backupvirtualdiskfiles residingonasharedFibreChanneloriSCSIstorage device. hotadd Backupvirtualdiskfilesonanyshared storageorlocalstoragethroughtheVCBproxy virtualmachine. nbd ornbdssl (forLANmode) Useoneofthe followingoptionstobackupvirtualdiskfiles residingonastoragedeviceaccessedthroughthe NetworkBlockDevice(NBD)protocol. Also,use oneoftheseoptionstoenableConsolidatedBackup insideavirtualmachinethatservesasaVCBproxy.
nbd Selectifyoudonotneedtoencrypt virtualdiskdata. nbdssl Selecttoencryptvirtualdiskdatafor overthenetworktransfers.Also,youmaywant toenableSSLcertificateverification.See EnablingSSLCertificateVerificationon page 41.
LOGLEVEL
38
VMware, Inc.
automatic ConsolidatedBackupcreatesand deletesbackupsnapshotsforvirtualmachineson demand. manual ConsolidatedBackupdoesnotcreateor deleteanysnapshotsbutdetectsabackupsnapshot named_VCB-BACKUP_andusesthissnapshotfor backup.Thisoptionisusefulforcreativescripting. createonly ConsolidatedBackupcreatesa backupsnapshotwhentheprebackupscriptis beingrun,butitdoesnotremovethesnapshotafter backup.Thisoptionisusedtorunaverificationjob. Yourverificationscriptwouldberesponsiblefor tearingdownthemount. deleteonly ConsolidatedBackupdetectsthata backupsnapshotnamed_VCB-BACKUP_existsand doesnotattempttocreateone.However,the snapshotisdeletedbythepostbackupscript.This optionisusefulforcreativescripting.
VM_LOOKUP_METHOD
ipaddr
Useoneofthefollowingoptionstospecifyhow ConsolidatedBackupidentifiesvirtualmachines:
ipaddr Identifiesvirtualmachinesbasedon DNS name/IPaddress. name Identifiesvirtualmachinesbasedonnames asshowninVirtualCenter.Usethisoptionifyou havemultiplevirtualmachineswiththesame IP address,butwithdifferentnames.Eachvirtual machinemusthaveauniquename,otherwisea backupjobfails.
PREEXISTING_MOUN TPOINT1
fail
VMware, Inc.
39
MAX_RETRIES
BACKOFF_TIME
10
Ifthepasswordisnotspecifiedintheregistry,ConsolidatedBackuppromptsforthe password.
40
VMware, Inc.
ConsolidatedBackupmustconnectdirectlytoaVirtualCenterServerversion2.5 orlater.MakesurethatHOSTintheconfig.jsconfigurationfilepointstoyour VirtualCenterServer. AlwaysuseConsolidatedBackupfromausercontextwiththesameusernameand passwordcredentialsonboththeVCBproxyandtheVirtualCenterServer,orbea domainuser.ThebackupapplicationserviceprocesswhichcallsVCBmustbe configuredtorununderthisusercontext.ConsolidatedBackupandthebackup applicationthatcallsitmustnotbeusedintheLocalSystemaccountcontext. TheConsolidatedBackupusermusthaveadministratorprivilegesontheVCB proxyandhavetheVCBBackupUserroleassignedinVirtualCenter.
VMware, Inc.
41
FortheSSLcertificateverificationtosucceed,thehostnameonthecertificatemust matchthecurrentfullyqualifieddomainnameofthehostthatpresentsthecertificate. Ifyouusethedefaultselfsignedcertificate,thesenamesdonotmatchandthecertificate verificationfails.Toaddressthisissue,addacertificatethatissignedbyarecognized certificateauthority.SeetheReplacingVirtualCenterServerCertificateswhitepaper. To enable SSL certificate verification on a VCB proxy 1 UsingtheMicrosoftRegistryEditor(regedit.exe),locatethefollowingkey:
HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware Consolidated Backup
MakesurethattheDWORDentrywiththefollowingnameispresent.Otherwise, createanewone.
VerifySSLCertificates
3 4
Afterverifyingthethumbprint,clickYestoaddthecertificatetotheWindows certificatestore.
YoucanalsoenabletheSSLcertificateauthenticationfortheESXcommandlineutilities ontheserviceconsole. To enable SSL certificate verification on an ESX service console 1 ObtainthethumbprintoftheESXServerhostbyenteringthefollowingcommand ontheserviceconsole:
openssl x509 -noout -in /etc/vmware/ssl/rui.crt -fingerprint -sha1
2 3
42
VMware, Inc.
Configuring SAN
IfyouareusingSANtostoreyourvirtualmachinedata,configuretheSANfabricto whichboththeESXServerandtheVCBproxyareconnected. ForConsolidatedBackup,yourSANconfigurationmustmeetthefollowing requirements:
SeedocumentationprovidedbyyourSANstoragearrayandswitchvendors,aswellas theFibreChannelSANConfigurationGuideandiSCSISANConfigurationGuide.
IfyouuseConsolidatedBackupintheHotAddmode,createaVCBproxyhelper. SeeCreatingaVCBHelperVirtualMachineonpage 44. Createabackuproleandassociateaspecificuserwiththisrole.SeeAssigning BackupPrivilegestoaConsolidatedBackupUseronpage 45. Ifyouhavemultiplevirtualmachinestobackup,groupthesevirtualmachinesand managethatgroupasasingleentityinyourbackupsoftwarebyconfiguringDNS aliasesfortheproxy.SeeGroupingVirtualMachinesonpage 47. NOTEConsolidatedBackupsupportsamaximumof60concurrentlymounted virtualmachines.Forexample,youcanconcurrentlymount60virtualmachines thathaveaC:drive,or30virtualmachinesthathaveaC:andaD:each.
VMware, Inc.
43
44
VMware, Inc.
11 12
VMware, Inc.
45
Toenablehotaddtransportmode,addthefollowingprivileges:
Datastore>Browseadatastore VirtualMachine>Provisioning>Clonevirtualmachine
8 9
46
VMware, Inc.
7 8
Settingupdifferentaliasesletsyou:
VMware, Inc.
47
filelevel:C:\mnt\mytestvm.foo.com\letters\D imagelevel:C:\mnt\mytestvm.foo.com-fullVM
NOTEYoucannotperformafilelevelbackupsimultaneouslywithanimagelevel backupforthesamevirtualmachine.
First-Time Backup
Whenyouperformafirstbackupforavirtualmachine,thevirtualmachinehastobe poweredon,otherwisethebackupfails. NOTEYoudonotneedtopoweronavirtualmachineifyourintegrationmoduleis configuredtousevirtualmachinedisplaynamesinsteadofIPaddressesorDNS names. Afteryouhavecompletedthefirstbackupofthevirtualmachine,ConsolidatedBackup canperformbackupsofthevirtualmachineregardlessofitspowerstateatbackup time.
48
VMware, Inc.
Quiescing Mechanisms
WhenyoustartthebackupprocessusingConsolidatedBackup,yourvirtualmachines areautomaticallyquiescedtoguaranteetheconsistencyofthevirtualmachine snapshots. Tonothaveaquiescingmechanism,append-Q 0tovcbMounter. Touseprebackupjobs,addNO_QUIESCE=1attheendoftheconfig.jsconfiguration file.Allprebackupjobswillnothavequiescingsnapshotsifconfig.jsconfiguration fileiseditedasabove. DependingonthequiescingmechanismthatConsolidatedBackupuses,thesnapshot canbe:
AsTable 22demonstrates,thequiescingmechanismsdependontheguestoperating systemthatyouruninyourvirtualmachines,theversionsofESXServerthathostsyour virtualmachines,andtheversionofVMwareToolsyouinstallinthevirtualmachines. Table 2-2. Quiescing Mechanisms Used by VMware Consolidated Backup
ESX Server 3.5 U1 or Earlier and Corresponding VMware Tools SYNCdriver Filesystemconsistent quiescing SYNCdriver Filesystemconsistent quiescing Crashconsistentquiescing ESX Server 3.5 U2 or Later and Corresponding VMware Tools SYNCdriver Filesystemconsistentquiescing VMwareVSScomponent Applicationconsistent quiescing VMwareVSScomponent Applicationconsistent quiescing Crashconsistentquiescing Crashconsistentquiescing Crashconsistentquiescing VMwareVSScomponent Filesystemconsistentquiescing VMwareVSScomponent Filesystemconsistentquiescing Crashconsistentquiescing
Guest Operating System Windows2000Server 32bit WindowsXP32bit WindowsServer2003 32bit WindowsServer2003 64bit WindowsVista 32bit/64bit WindowsServer2008 32bit/64bit Otherguestoperating systems
VMware, Inc.
49
Thefollowingvirtualmachinesgetonlycrashconsistentbackups:
50
VMware, Inc.
VMware, Inc.
51
Script Prefreeze
Whenrunningthescripts,ConsolidatedBackupperformsthefollowingsteps: 1 Runstheprefreezescriptinsidethevirtualmachinebeingbackedup. Forthescriptslocation,seeTable 23. Iftheprefreezescriptreturnsanonzeroexitcode,thesnapshotcreateoperation fails. 2 (Optional)EngageseithertheSYNCdriverorVSScomponents. ForinformationonthevirtualmachinesthatsupporttheSYNCdriverandVSS components,seeTable 22. Ifthisstepfails,ConsolidatedBackupproceedstoStep 5. 3 Createsasnapshot.
52
VMware, Inc.
Runsthepostthawscriptinsidethevirtualmachine. Ifsuccessful,theexitstatusofthisscriptis0.
Advanced Configurations
YoumightneedtoperformadvancedconfigurationswhenusingConsolidatedBackup. Forexample,youmightneedtorunapostbackupcommandforyourvirtualmachines tocancelbackupjobs.
VMware, Inc.
53
54
VMware, Inc.
RestoringVirtualMachinesUsingVMwareConsolidatedBackuponpage 55 DataRecoveryonpage 57
Imagelevelrestoration
VMware, Inc.
55
Filelevelrestoration
Nobackupsoftwareinthevirtualmachine.Restorationisdonebythe administratoronabackupproxynetworksharethatisaccessiblebythe protectedvirtualmachine.SeeCentralizedRestoreonpage 56 Backupsoftwareindedicatedvirtualmachinesanddatamovedtotarget virtualmachines.SeePerGroupRestoreonpage 57. Backupsoftwaredeployedineveryprotectedvirtualmachine.Restorationis donedirectlybythesystemadministratorortheuser.SeeDirectRestoretoa VirtualMachineonpage 57.
Centralized Restore
Whenperformingacentralizedrestore,youhaveagroupofvirtualmachineson ESX Server,aproxy,andabackupagentontheproxyinadedicatedvirtualmachine thatyouplantousetorestoreyourdata.Usethebackupsoftwaretogetthedatatothe proxythatisrunningtheagent.Aftertheadministratorrestoresthedatatothecentral server,copyitbacktothevirtualmachineusingtheCommonInternet File System (CIFS)remoteaccessfilesharingprotocol. Advantages:Thenumberofagentstomaintainisminimal. Disadvantages:Becausedatarestorationiscentralized,anadministratormustbe involvedinfilelevelrestoration.
56
VMware, Inc.
Per-Group Restore
Whenperformingapergrouprestoration,onevirtualmachinehasabackupagentfor eachgroup,suchasaccounting,engineering,andmarketing.Thegroupadministrator restoresworkflowstoapergrouprestorehost.Filesarecopiedtoatargetvirtual machineusingCIFSfileshare. Advantages:
Disadvantages:Thisprocessisnotacompleteselfservicerestoration.
Data Recovery
Thefollowingguidelinescanhelpyourecoveryourdata:
EnablingmigrationwithVMotionorusingDRSenhancesyourdisasterrecovery capabilities.
VMware, Inc.
57
58
VMware, Inc.
Datacenter
VMware, Inc.
59
60
VMware, Inc.
Troubleshooting
Thissectionguidesyouthroughissuesyoumightencounterwhenperforming backups.
VMFSvolume
/vmfs/volumes/<file_system_UUID>
or
/vmfs/volumes/<file_system_label>
VMFSfile
/vmfs/volumes/<file system label|file system UUID>/[dir]/myDisk.vmdk
VMware, Inc.
61
To identify a VMFS volume by its label 1 Browsethe/vmfs/volumesdirectoryinyourbackupsoftwareGUI. ThesymboliclinkspointingtotheVMFSvolumemountpointsshowupinthefile selectionpane. 2 3 UsetheseentriestofindtheuniqueIDforthefilesystemlabelyouneed. SelectthedirectorycorrespondingtothisuniqueIDinthedirectorypanefor browsing.
Whenperformingfilebasedbackups,thebackupapplicationusespathsreferencing theuniqueidentifier,sothebackedupfilesshowupasthefollowing:
/vmfs/volumes/43a0552e-ae6093b2-47a1-00145e0a7ec0/vm01/vm01.vmdk
62
VMware, Inc.
Thisappendixdescribeshowtobackupandrestorevirtualmachinesusingyour ESX Server3orESX4serviceconsole.Theappendixwalksyouthroughtheprocessof configuringtheConsolidatedBackupcommandlineutilitiesandprovidesexamples onhowtousetheseutilities. NOTEBecauseESXServer3iandESXi4donothaveaserviceconsole,informationin thischapterisnotapplicabletoESXServer3iandESXi4.Toperformimagelevel virtualmachinebackupsonanESXServer3iorESXi4hostthatdoesnothaveaccess toSAN,useConsolidatedBackupinLANmodeandrunitonavirtualmachine. Thisappendixincludesthefollowingsections:
VMware, Inc.
63
64
VMware, Inc.
VMNAMECACHE Themostcommonwayofidentifyingavirtualmachineforbackuppurposesisby itsDNSnameorbyitsIPaddress.However,whenyoubackupavirtualmachine fromastandaloneESXhost,theESXhostcanrecognizetheIP addressonlywhen thevirtualmachineispoweredonandrunningVMwareTools. TobeabletoperformbackupsofthevirtualmachineonthestandaloneESXhost evenwhenthevirtualmachineispoweredoff,youshouldmaintainacachefile. ThecachefilerecordstheIPaddressofthevirtualmachineeachtimethevirtual machineisbeingbackedup.Thisallowsyoutoperformthefuturebackupsofthis virtualmachineregardlessofitspowerstate. VMwarerecommendsthatyoudonotchangethedefaultsetting. NOTEYoucanusethe-ccommandlineoptionforvcbMountertooverridethis setting.ThevcbRestorecommanddoesnotusethissetting.
VMware, Inc.
65
Performing Backups
AftersettingupconfigurationoptionsasdescribedinConfigurationFileSettingson page 64,enterthefollowingcommandinthecommandline: vcbMounter -a <virtual_machine_identifier> -r <backup_destination> -m <cos|nbd|nbdssl>, where
66
VMware, Inc.
Followtheseexampleswhenbackingupvirtualmachines:
VMware, Inc.
67
Forexample,torefertothevirtualmachinevm37.company.comwiththeIPaddress 10.17.5.12,useoneofthefollowingsearchspecifiers:
ipaddr:vm37.company.com ipaddr:10.17.5.12
moref:vm-00027UsethisformatwhenaccessingVirtualCenterServer. moref:248UsethisformatwhenaccessingtheESXServerhost.
BecauseMoRefschangeeverytimetheVirtualCenterserverorthehostinstancethat ConsolidatedBackupconnectstorestarts,youshouldnotuseMoRefstoidentify virtualmachines.However,whenrunningashellscripttobackvirtualmachines,you canuseMoRefstoidentifythevirtualmachines. Forexample,youcanwriteascriptthatusesvcbVmNamewiththeany:searchspecifier togetalistofallvirtualmachines,andperformcustomfilteringtoproducealistofonly thosevirtualmachinesyouwanttobackup.Virtualmachinesonthislistcanuse MoRefsastheiridentifiers.AnotherpartofyourscriptcancallvcbMounteroneachof theseMoRefstoperformthebackupoperations. Inacaselikethis,usingMoRefsratherthanotheridentifiers,suchasUUID,causesless searchoverheadbecausetheentirelistofallvirtualmachinesdoesnotneedtobe parsedeachtimetheidentifierisused.
68
VMware, Inc.
ThefollowingisthesampleoutputyougetafterusingvcbVmName:
bash #vcbVmName -s name:vm37.company.com Found VM: moref:192 name:Virtual Machine 37 uuid:564d78a1-8c1c-59b4-fa02-be14138797be ipaddr:10.17.5.31
VMware, Inc.
69
where<virtual_machine_identifier>specifiesagroupofvirtualmachines.Use oneofthefollowingsearchspecifiers:
70
VMware, Inc.
VMware, Inc.
71
72
VMware, Inc.
Bydefault,alltheseentriesusethesamepath,whichpointstothesamedirectoryon thesamedatastore.VMwarerecommendsthatyoufollowthisstandardwhen changingthepath. Thedatastorepathshavethefollowingsyntax: [<datastore_name>] <path_on_datastore> Youcanobtainalistofvaliddatastorenamesfromthedatastorebrowserinyour VI Client,orbylookingatthefilesystemlabelsofyourVMFSvolumesintheservice consoleunder/vmfs/volumes. Changing Folder Paths Thevirtualmachinesfolderpathinthecatalogfilespecifiesthefolderwithinthe VirtualCenterfolderhierarchywheretherestoredvirtualmachinewillbeplaced. To change the folder path for the virtual machine 1 Identifythefolderthatwillstorethevirtualmachinebyrunningthefollowing commandintheserviceconsole: vcbUtil -c vmfolders Runningthiscommandassumesthatyouhavesetupappropriateconfiguration optionsasdescribedinConfigurationFileSettingsonpage 64. 2 Inthecatalogfile,setthefolderpathtooneofthefolderpathsprintedoutbythe vcbUtil command.
Changing Resource Pools Theresourcepoolsentryinthecatalogfiledeterminesthevirtualmachinesbehavior withrespecttoDRS(DistributedResourceScheduling).WhenyouusemultipleESX hostsmanagedbyVirtualCenter,thisitemalsospecifiesthehostthatwillrunthe virtualmachine. To change the resource pool setting for the virtual machine 1 Identifytheresourcepoolthatthevirtualmachinewillusebyrunningthe followingcommand: vcbUtil -c resourcepools Runningthiscommandassumesthatyouhavesetupappropriateconfiguration optionsasdescribedinConfigurationFileSettingsonpage 64. 2 Inthecatalogfile,settheresourcepooltooneoftheoptionsprovidedbythe vcbUtil command.
VMware, Inc.
73
74
VMware, Inc.
VMware, Inc.
75
76
VMware, Inc.
Restoring Virtual Machines from ESX Server 2.5.x to ESX Server 3.x
SettingConfigurationParametersonpage 77 RestoringESX2.5.xServerVirtualMachinesonpage 78
VMware, Inc.
77
Inaddition,definethefollowingparameters.
Thisentryrestoresthevirtualmachinewiththemyvm.vmxfileinto[oldvms] /myvm.
78
VMware, Inc.
Index
A
aliases 47 archive bit 36
C
catalog files 72 change journal 36 CIFS 56 Common Internet File System protocol 56 configuration file backup utilities 64 Consolidated Backup 37 Consolidated Backup and third-party backup software 24 configuration file 37 configuring SAN 43 configuring third-party software 35 configuring VCB proxy 33 considerations 22 customizing 53 features 23 file-level backups 30 image-level backups 30 installing 36 interoperability modules 36 limitations 30 overview 24 performing first backup 48 running 43 setting up backup jobs 48 turning off drive-letter assignment 34 utilities 64 versus traditional backup methods 22
B
backup clients about 14 in a virtual machine 17 in the service console 19 backup jobs canceling 53 setting up 48 backup policies, modifying 61 backup schedulers 14 backup servers 14 backup utilities 64 backups differential 11 file-level 30 from NFS 21 from SAN 21 image-level 30 incremental 12 overview 12 performing first 48 sample scenario 60 techniques 15 traditional 15 backuptools.conf file 64 BIOS UUID 68
VMware, Inc.
79
VMware Tools 32
P
physical compatibility 13
D
directory, /vmfs/volumes 13 disaster recovery 57 disk images, exporting 30 DNS name 67 drive letters 34
Q
quiescing about 12 customizing 51
E
ESX Server 2.5.x 77 ESX Server, upgrading 61
R
raw device mapping 13 RDM physical compatibility 13 turning off drive-letter assignment 34 virtual compatibility 13 README.html file 36 restorations centralized 56 ESX Server 2.5.x virtual machines 77 file-based 55 per-group 57 self-service 57 vcbRestore utility 56 workflows 55
F
FAT 34 files .vmdk 13 .vmx 13
I
incremental backups archive bit 36 interoperability modules about 24 installing 36 IP address 67
J
junction points about 30 turning on 35
S
SAN storage and backups 21 configuring for VCB 43 schedulers 14 SCSI disks 13 service console 12 backing up 16 file-based backups 16 image-based backups 16
M
MoRef 68
N
NFS storage and backups 21 NTFS 34
T
third-party software
80
VMware, Inc.
Index
configuring for VCB 35 interoperability modules 24 turning off archive bit 36 turning off change journal 36 working with Consolidated Backup 24 time stamps 36 traditional backup methods 17 troubleshooting backup software GUI 61 path formats 61
virtual compatibility 13 virtual disks manipulating 13 storing 13 virtual machines aliases 47 groups 47 VMFS 13 vmkfstools commands 14 VMware Tools 32
U
utilities Consolidated Backup 64 vcbMounter 66 vcbRestore 56, 71
W
Windows archive bit 36 Windows change journal 36 workflow 24
V
VCB proxy about 12 and networking 33 installing Consolidated Backup 36 junction points 30 running Windows 34 setting up 33 turning off drive-letter assignment 34 VCB, see Consolidated Backup vcbMounter destinations 69 overview 66 performing backups 66 specifying virtual machines 67 vcbRestore 71 catalog files 72 default use 74 restoring to alternative locations 71 restoring to original locations 71
VMware, Inc.
81
82
VMware, Inc.
VMware, Inc.
Update1
Updates for Consolidated Backup Software and Hardware Requirements Section on Page 31
TheConsolidatedBackupSoftwareandHardwareRequirementssectionincorrectly listsMicrosoftWindowsServer2003R2(32bitor64bit)asoneoftheversionsof MicrosoftWindowsoperatingsystemsthatshouldbeinstalledonyourVCBproxy. TheversionthatyoumustinstallisMicrosoftWindowsServer2003R2ServicePack2 (32bitor64bit).
Editrole>AllPrivileges>VirtualMachine>Configuration>RawDevice.
Update2
VMware, Inc.