You are on page 1of 64

Virtual Machine Backup Guide

ESX Server 3.0 and VirtualCenter 2.0

Virtual Machine Backup Guide


Revision: 20060615
Item: VI-ENG-Q206-216

You can find the most up-to-date technical documentation at:


http://www.vmware.com/support/pubs
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com

2006 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242,
6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022,
6,961,941, 6,961,806 and 6,944,699; patents pending.
VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or
trademarks 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.
3145 Porter Drive
Palo Alto, CA 94304
www.vmware.com
ii

VMware, Inc.

Contents

Preface ................................................................ vii


AboutThisBook..................................................... viii
IntendedAudience ................................................... viii
DocumentFeedback .................................................. viii
VMwareInfrastructureDocumentation................................. viii
ConventionsandAbbreviations ..........................................ix
TechnicalSupportandEducationResources ...............................ix
SelfServiceSupport..................................................ix
OnlineandTelephoneSupport........................................x
SupportOfferings....................................................x
VMwareEducationServices...........................................x

Chapter1Introduction ...............................................1
Concepts ..............................................................2
WhattoBackUp .......................................................2
VirtualMachineContents .............................................3
VirtualMachineDisks .............................................3
RawDeviceMappings.............................................4
AccessingandManagingVirtualDiskFiles .............................4
BackupComponentsandApproaches ....................................5
BackupApproaches ..................................................6
UsingTraditionalBackupMethods .......................................6
TraditionalBackupConsiderations.....................................7
BackingUptheServiceConsole .......................................7
BackingUpVirtualMachines .........................................8
BackupClientinaVirtualMachine..................................8
BackupClientintheServiceConsole................................10
SANBackups ....................................................11
NFSBackups ....................................................11
UsingVMwareConsolidatedBackup ....................................12
VMwareConsolidatedBackupAdvantages............................12

VMware, Inc.

iii

Virtual Machine Backup Guide

Chapter2VMwareConsolidatedBackup ........................13
Overview............................................................14
HowConsolidatedBackupWorks .......................................14
IntegrationwithThirdPartyBackupSoftware ..........................14
Requirements ......................................................15
VMwareVirtualMachineSnapshotTechnology ........................16
ConsiderationsWhenCreatingSnapshots ...........................17
FileLevelBackups ...............................................17
FullVirtualMachineBackups ......................................18
SettingUpConsolidatedBackup........................................18
VMwareESXServerandVirtualCenterConfiguration ...................18
SANConfiguration .................................................19
ConfiguringtheThirdPartySoftware.................................20
ChangingBackupPoliciesafterESXServerUpgrades.................20
VCBProxyConfiguration ............................................21
HardwareRequirements ..........................................21
Prerequisites.....................................................21
ConfiguringWindowsontheVCBProxy ..............................22
DisablingAutomaticDriveLetterAssignment.......................22
ConfiguringtheConsolidatedBackupFramework ....................23
InstallingaBackupSoftwareInteroperabilityModule .................25
ConfiguringVirtualMachinesforConsolidatedBackup ....................25
ConsolidatedBackupRestrictions.......................................25
UsingConsolidatedBackup ............................................26
Aliases............................................................26
ConfiguringBackupJobs ............................................27
FirstTimeBackup ..................................................27
AdvancedConfigurations ..............................................27
RunningCustomQuiescingScripts ...................................28
CancelingaBackupJob ..............................................29

Chapter3RestorationandDisasterRecovery ....................31
RestoringYourFilesUsingConsolidatedBackup ..........................32
Restore ............................................................32
CentralizedRestore...............................................32
PerGroupRestore................................................32
SelfServiceBackup ...............................................33
RestoringFilesUsingthevcbRestoreUtility ..............................33

iv

VMware, Inc.

Contents

DataRecovery ........................................................33
Troubleshooting ......................................................33

Chapter4BackupScenarios........................................35
BackupUsageScenarios ...............................................36
ATypicalConsolidatedBackupUsageScenario ...........................36

AppendixAUsingServiceConsoletoBackUpandRestore
VirtualMachines .................................................37
GeneralConfigurationSettingsforConsolidatedBackupUtilities ...........38
ConfigurationFileSettings ...........................................38
BackingUpVirtualMachines ...........................................40
PerformingBackups ................................................40
IdentifyingVirtualMachines .........................................41
IdentifyingVirtualMachinesbyDNSNameorIPAddress ............41
IdentifyingVirtualMachinesbyBIOSUUID .........................41
IdentifyingVirtualMachinesbyMoRef .............................42
IdentifyingGroupsofVirtualMachines.............................42
SpecifyingBackupDestinations.......................................43
BackingUptoaLocalDirectory ....................................43
BackingUptoaRemoteServer.....................................43
RestoringVirtualMachines.............................................44
RestoringVirtualMachinestoOriginalLocations.......................44
RestoringVirtualMachinestoAlternativeLocations ....................44
CopyingaCatalogFile ............................................45
EditingaCatalogFile.............................................45
RestoringVirtualMachinesUsinganAlternateCatalog ...............47
NoninteractiveUseofthevcbRestoreUtility ...........................48

AppendixBRestoringVirtualMachinesfrom
ESXServer2.5.xtoESXServer3.0 ..............................49
SettingConfigurationParameters .......................................50
RestoringESX2.5.xServerVirtualMachines ..............................51

Index ..................................................................53

VMware, Inc.

Virtual Machine Backup Guide

vi

VMware, Inc.

Preface

ThisprefacedescribesthecontentsoftheVirtualMachineBackupGuideandprovides
pointerstotechnicalandeducationalresources.
Thisprefacecontainsthefollowingtopics:
!

AboutThisBookonpage viii

IntendedAudienceonpage viii

DocumentFeedbackonpage viii

VMwareInfrastructureDocumentationonpage viii

ConventionsandAbbreviationsonpage ix

TechnicalSupportandEducationResourcesonpage ix

VMware, Inc.

vii

Virtual Machine Backup Guide

About This Book


Thismanual,theVirtualMachineBackupGuide,providesinformationondifferent
methodsyoucanusetoperformbackupandrestoretasks.Italsodescribeshowtouse
VMwareConsolidatedBackup,anewbackupsolutionofferedbyESXServer3and
recommendedtoperformdailybackupsforvirtualmachinesresidingonaSAN.

Intended Audience
Theinformationpresentedinthismanualiswrittenforsystemadministratorswhoare
experiencedWindowsorLinuxsystemadministratorsandwhoarefamiliarwith
virtualmachinetechnologyanddatacenteroperations.

Document Feedback
Ifyouhavecommentsaboutthisdocumentation,submityourfeedbackto:
docfeedback@vmware.com

VMware Infrastructure Documentation


TheVMwareInfrastructuredocumentationconsistsofthecombinedVirtualCenterand
ESXServerdocumentationset.
YoucanaccessthebooksintheVMwareInfrastructuredocumentsetat:
http://www.vmware.com/support/pubs

viii

VMware, Inc.

Preface

Conventions and Abbreviations


ThismanualusesthestyleconventionslistedinTable P1.
Table P-1. Type Conventions
Style

Purpose

Monospace

Usedforcommands,filenames,directories,paths.

Monospace bold

Applytoindicateuserinput.

Bold

Usefortheseterms:
Interfaceobjects,keys,buttons
Itemsofhighlightedinterest
Glossaryterms

Italic

Usedforbooktitles.

<name>

Anglebracketsindicatevariableandparameternames.

Technical Support and Education Resources


Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou:
!

SelfServiceSupport

OnlineandTelephoneSupport

SupportOfferings

VMwareEducationServices

Self-Service Support
UsetheVMwareTechnologyNetworkforselfhelptoolsandtechnicalinformation:
!

ProductInformationhttp://www.vmware.com/products/

TechnologyInformationhttp://www.vmware.com/vcommunity/technology

Documentationhttp://www.vmware.com/support/pubs

KnowledgeBasehttp://www.vmware.com/support/kb

DiscussionForumshttp://www.vmware.com/community

UserGroupshttp://www.vmware.com/vcommunity/usergroups.html

FormoreinformationabouttheVMwareTechnologyNetwork,gotohttp://
www.vmtn.net.

VMware, Inc.

ix

Virtual Machine Backup Guide

Online and Telephone Support


Useonlinesupporttosubmittechnicalsupportrequests,viewyourproductand
contractinformation,andregisteryourproducts.Gotohttp://www.vmware.com/
support.
Forcustomerswithappropriatesupportcontracts,usetelephonesupportforthefastest
responseonpriority1issues.Gotohttp://www.vmware.com/support/
phone_support.html.

Support Offerings
FindouthowVMwaressupportofferingscanhelpyoumeetyourbusinessneeds.Go
tohttp://www.vmware.com/support/services.

VMware Education Services


VMwarecoursesofferextensivehandsonlabs,casestudyexamples,andcourse
materialsdesignedtobeusedasonthejobreferencetools.Formoreinformationabout
VMwareEducationServices,gotohttp://mylearn1.vmware.com/mgrreg/index.cfm.

VMware, Inc.

C HAPTER 1

Introduction

Backup,restoration,anddisasterrecoveryareamongthemostcriticalprocessesof
datacentermanagement.VMwareESXServerandVMwareInfrastructureprovide
manydifferentsolutions,eachsuitableforaspecificenvironment,toperformbackup
andrestoretasks.
ThisintroductiondescribeswhichresourcesshouldbebackeduponanESXServer
systemandexplainsoptionsavailableforthatbackup.
Thischapterincludesthefollowingsections:
!

Conceptsonpage 2

WhattoBackUponpage 2

BackupComponentsandApproachesonpage 5

UsingTraditionalBackupMethodsonpage 6

UsingVMwareConsolidatedBackuponpage 12

VMware, Inc.

Virtual Machine Backup Guide

Concepts
Thefollowingconceptsareessentialforyourunderstandingofbackupprocedures:
!

QuiescingAprocessofbringingtheondiskdataofaphysicalorvirtual
computerintoastatesuitableforbackups.Thisprocessmightincludesuch
operationssuchasflushingdirtybuffersfromtheoperatingsystemsinmemory
cachetodisk,orotherhigherlevelapplicationspecifictasks.

Volumelevel(imagelevel)backupAtypeofbackupthatbacksupanentire
storagevolume.

FilelevelbackupAtypeofbackupthatisdefinedattheleveloffilesandfolders.

FullbackupBacksupallselectedfiles.

FullvirtualmachinebackupBacksupallfilesthatcompriseentirevirtual
machine.Thesefilesincludediskimages,.vmxfiles,andsoon.

DifferentialbackupBacksuponlythosefilesthathavechangedsincethelast
fullbackup.

IncrementalbackupBacksuponlythosefilesthathavechangedsincethelast
backup,whetheritisafullorincrementalbackup.

VCBproxyAphysicalmachinerunningMicrosoftWindows2003,Consolidated
Backup,andthirdpartybackupsoftware.Usedtoperformoffloadedfilelevel
andfullvirtualmachinebackups.

What to Back Up
WithintheESXServerenvironment,youneedtobackupthefollowingmajoritems
regularly:
!

VirtualmachinecontentsBecausevirtualmachinesareusedfrequently,critical
informationstoredintheirdiskfilesconstantlychanges.Aswithphysical
machines,virtualmachinedataneedstobebackedupperiodicallytopreventits
corruptionandlossduetohumanortechnicalerrors.
Thevirtualmachinedatayoubackupincludesvirtualdisks,RawDevice
Mappings(RDM),configurationfiles,andsoon.Formoreinformation,see
VirtualMachineContentsonpage 3.

VMware, Inc.

Chapter 1 Introduction

ESXServerserviceconsoleTheserviceconsole,acustomizedversionofLinux,
istheESXServercommandlinemanagementinterface.ItprovidestheESXServer
managementtoolsandacommandpromptformoredirectmanagementofESX
Server.Italsokeepstrackofallthevirtualmachinesontheserverandtheirconfig
urations.
NOTE

Inearlierreleases,theserviceconsolewasthemaininterfacetotheESX
Serverhost.WithESXServer3andlater,theVIClienthaspriority,
althoughyoustillmightusetheserviceconsoletoperformsome
advancedadministrationoperations.

Duringitslifetime,theserviceconsoledoesntexperienceanymajorchangesother
thanperiodicupgrades.Inaddition,incaseofafailure,youcaneasilyrecoverthe
stateofyourserviceconsolebyreinstallingESXServer.Therefore,althoughyou
mightconsiderbackinguptheserviceconsole,itdoesntneedtobebackedupas
frequentlyasthevirtualmachinesandtheirdata.

Virtual Machine Contents


ESXServerusesVMwareFileSystem(VMFS)foritsstorageneeds.VMFSisasimple,
highperformancefilesystemonphysicalSCSIdisksandpartitions.VMFSisusedfor
storinglargefiles,suchasthevirtualdiskimagesforESXServervirtualmachinesand
thememoryimagesofsuspendedvirtualmachines.ESXServer3supportsVMFS3.A
VMFS3volumecanspanmultiplediskpartitions,alsocalledextents.

Virtual Machine Disks


InESXServer3,VMFSsupportsdirectories.Typically,thereisonedirectoryforeach
virtualmachineonVMFS.Thisdirectorycontainsallthefilesthatcomprisethevirtual
machine,suchasdiskimages,virtualmachineconfiguration.vmxfiles,logfiles,andso
on.Thediskfilesareinaspecialformatandgenerallyusethe.vmdkfileextension.
NOTE

VMware, Inc.

Alltheinformationnormallybackedupintheenterpriseinfrastructure,
includingtheoperatingsystem,applications,anddata,isincludedinthe
virtualdisks.

Virtual Machine Backup Guide

Raw Device Mappings


RawDeviceMappings(RDM)letsyouuseallthefeaturesofVMwareVirtual
InfrastructureinconjunctionwithrawSANLUNs.Themappingfileisthefilethatis
usedtoconnecttherawLUNtothevirtualmachineandisreferencedinthevirtual
machinesconfiguration.
TwomodesexistforRDM:virtualcompatibilityandphysicalcompatibility.
Virtual Compatibility Mode
Virtualcompatibilitymodeallowsamappingtoactexactlyasavirtualdiskfiledoes,
includingvirtualmachinesnapshots.
Invirtualcompatibilitymode,anRDMfileinaVMFSvolumemanagesmetadatafor
itsmappeddevice.Thereisaonetoonemappingbetweenmappingfilesandmapped
devices.ThemappingfileispresentedtotheVMwareserviceconsoleasanordinary
diskfile,availableforfilesystemoperations,andcanhaveredologs.Tothevirtual
machine,theESXServerpresentsthemappeddeviceasalocallyattachedSCSIdevice.
Physical Compatibility Mode
PhysicalcompatibilitymodeallowsdirectSCSIaccesstothedevicebeingmappedfor
thoseapplicationsthatneedlowerleveldiskaccessandcontrol.Inbothcases,datais
storedontheLUNorSCSIdevice,notonthediskfile.
Inphysicalcompatibilitymode,RDMprovidesminimalSCSIvirtualizationofthe
mappeddevice.Inthismode,theVMkernelpassesallSCSIcommandstothedevice
withoneexception:theReportLUNscommandisvirtualizedsothattheVMkernelcan
isolatetheLUNforthevirtualmachinethatownsit.Otherwise,allphysical
characteristicsoftheunderlyinghardwareareexposed.Physicalmodeisusefulwhen
youneedtorunSANmanagementagentsorotherSCSItargetbasedsoftwareinthe
virtualmachine.Physicalmodeisalsousedforvirtualtophysicalclusteringforcost
effectivehighavailability.

Accessing and Managing Virtual Disk Files


Typically,youuseVirtualInfrastructure(VI)Clienttoperformavarietyofoperations
onyourvirtualmachines.
DirectmanipulationofyourvirtualdiskfilesonVMFSispossiblethroughESXServer
serviceconsoleandVMwareSDKs,althoughusingtheVIClientisthepreferred
method.
Fromtheserviceconsole,youcanviewandmanipulatefilesinthe/vmfs/volumes
directoryinmountedVMFSvolumeswithordinaryfilecommands,suchaslsandcp.
AlthoughmountedVMFSvolumesmightappearsimilartoanyotherfilesystem,such

VMware, Inc.

Chapter 1 Introduction

asext3,VMFSisprimarilyintendedtostorelargefiles,suchasdiskimageswiththe
sizeofupto2TB.Youcanuseftp,scp,andcpcommandsforcopyingfilestoandfrom
aVMFSvolumeaslongasthehostfilesystemsupportstheselargefiles.
NOTE

InLinux,importingalargediskfromaCommonInternetFileSystem(CIFS)
mounthangstheESXServer,whichmustthenberebooted.IfConsolidated
Backupisnotused,largefilesneedtobemovedfromtheserviceconsoleto
tapebackup.Todothiseffectively,usesupportedprogramswithnoreported
knownissues.Asaworkaround,usesmbclienttocopythelargefileontoa
localdirectoryontheserviceconsoleandthenimportfromthere.

Additionalfileoperationsareenabledthroughthevmkfstoolscommand.This
commandsupportsthecreationofaVMFSonaSCSIdiskandisusedforthefollowing:
!

Creating,extending,anddeletingdiskimages

Importing,exporting,andrenamingdiskimages

Settingandqueryingpropertiesofdiskimages

CreatingandextendingaVMFSfilesystem

Formoreinformationonthevmkfstoolscommand,seetheServerConfigurationGuide.

Backup Components and Approaches


Whenyouperformabackup,thefollowingthreecomponentsofbackupsoftwareare
generallyinvolvedintheprocess:
!

BackupClient(BackupAgent)Aprogramthatscansvirtualmachinefile
systemsandtransfersdatatobebackeduptoabackupserver.Duringrestore
operations,thebackupclientwritesthedataintothefilesystems.

BackupServerAprogramthatwritesthedata,pushedbythebackupclient,to
abackupmedium,suchasarobotictapelibrary.Duringrestoreoperation,the
backupserverreadsthedatafromthebackupmediumandpushesittothebackup
client.

SchedulerAprogramthatallowsyoutoscheduleregularautomaticbackupjobs
andcoordinatetheirexecution.Backupscanbescheduledatperiodicintervals,or
individualfilescanbeautomaticallybackedupimmediatelyaftertheyhavebeen
updated.

VMware, Inc.

Virtual Machine Backup Guide

Backup Approaches
Eachofthebackupsoftwarecomponentscanberuninavirtualmachine,ontheservice
console,oronaphysicalmachine,oraVCBproxy,runningMicrosoftWindows2003.
Whilethelocationoftheschedulerisntimportant,thelocationsofthebackupserver
andbackupclientareimportant.
Dependingonwhereyouwanttoruneachcomponent,youchooseoneofthefollowing
approaches:
!

Usetraditionalbackupapproach.Withthisapproach,youdeployabackupclient
toeverysystemthatrequiresbackupservices.Youcanthenregularlyperform
backupsinanautomatedway.
Withthisapproach,severalmethodologiesexist.Youcanchooseaspecificmethod
thatbettersuitesyourneedsandrequirements.
Formoreinformation,seeUsingTraditionalBackupMethodsonpage 6.

UseVMwareConsolidatedBackup,whichenablesoffloadedandimpactfree
backupforvirtualmachinesrunningonESXServer.Thisapproachletsyouusethe
virtualmachinesnapshottechnologyandSANbaseddatatransferinconjunction
withtraditionalfilebasedbackupsoftware.
WhenrunningConsolidatedBackup,youcanbackupvirtualmachinecontents
fromacentralizedMicrosoftWindows2003proxyserverratherthandirectlyfrom
theESXServersystem.UtilizingaproxyserverreducestheloadonESXServer
allowingittorunmorevirtualmachines.
FormoreinformationonConsolidatedBackup,seeVMwareConsolidated
Backuponpage 13.
FormoreinformationonthesnapshottechnologythatConsolidatedBackup
employs,seeVMwareVirtualMachineSnapshotTechnologyonpage 16.

Using Traditional Backup Methods


Withthetraditionalbackupmethods,youdeployabackupagentoneachhostwhose
dataneedstobesecured.Backupsarethenconductedonaregularbasisinan
automatedway.
Thebackupagentscansthefilesystemforchangesduringperiodsoflowsystem
utilizationandsendsthechangedinformationacrossthenetworktoabackupserver
thatwritesthedatatoabackupmedium,suchasarobotictapelibrary.

VMware, Inc.

Chapter 1 Introduction

Usingtraditionalmethods,youcanbackupyourserviceconsoleandvirtualmachines.
Formoreinformation,see:
!

BackingUptheServiceConsoleonpage 7

BackingUpVirtualMachinesonpage 8

Traditional Backup Considerations


Whenusingtraditionalmethodstobackupyoursystem,keepinmindthefollowing:
!

Tobeabletocapturethedatainitsconsistentstate,performbackupsatthetimes
ofthelowestactivityonthenetworkandwhenyourcomputerresourcesare
mostlyidle.Whileperformingbackups,youmightneedtotakecriticalapplica
tionsoffline.

Makesurethatnetworkbandwidthbetweentheserveryouarebackingupandthe
backupserverissufficient.

Withalargenumberofservers,bothphysicalandvirtual,allocateenough
resourcestomanagebackupsoftwareoneachhost.Rememberthatmanaging
agentsineveryvirtualmachineisverytimeconsuming.

Backing Up the Service Console


Becausetheserviceconsoledoesntexperienceanymajorchangesduringitslifetime
anditsstateiseasilyrecoverableincaseofafailure,youmightdecideagainstbacking
itup.However,ifyouchoosetobackuptheserviceconsole,youdontneedtodoit
frequently.
Usethefollowingmethodswhenbackingupserviceconsole:
!

FileBasedTheserviceconsolecanbetreatedasaphysicalmachinewitha
deployedbackupagent.Torestoretheserviceconsole,firstreinstallit,then
reinstalltheagent,andthenrestorethefilesthatyoubackedup.Thisapproach
makessenseifmanagementagentsthatarehardtosetuphavebeendeployedin
theserviceconsole.Otherwise,thisapproachprovidesnoadvantageovernot
backinguptheserviceconsole.

ImageBasedUsethirdpartysoftwaretocreateabackupimagethatyoucan
restorequickly.UseyourbootCDorwhateverthebackupsoftwarecreatedto
restoretheserviceconsole.

VMware, Inc.

Virtual Machine Backup Guide

Backing Up Virtual Machines


Dependingonyourrequirements,youmightchooseoneofthetraditionalmethodsfor
backingupyourvirtualmachines.Traditionalbackupmethodsdonotuse
ConsolidatedBackup.
Usethefollowingtabletocompareavailabletraditionalmethods.
Table 1-1. Recommended Traditional Backup Methods (No Consolidated Backup)
BackupServer

BackupClient

NOTE

Virtual
Machine

PhysicalMachine

VirtualMachine

Method1

Method2

ServiceConsole

Method3

Method4

Runningthebackupserverintheserviceconsoleisnotsupported.

Traditionalbackupmethodsofferthefollowingoptions:
!

Youcanrunbackupclientsfromwithinavirtualmachineperformingfilelevelor
systemlevelbackups.Aslongasyouarebackingupoverthenetwork,no
compatibilityguideisneeded.

YoucanrunbackupclientsfromtheESXServerServiceConsole,backingup
virtualmachinesintheirentiretyas.dskand/or.vmdkfilesresidingintheESX
ServerhostVMFSfilesystem.

Youcanbackupvirtualmachinedatabyrunningabackupserverwithinavirtual
machinethatisconnectedtoatapedriveorotherSCSIbasedbackupmedia
attachedtothephysicalsystem.

Backup Client in a Virtual Machine


Method1andmethod2assumethatyoudeployyourbackupclientinavirtual
machine.
Method 1: Backup Server in a Virtual Machine
Withthismethod,youdeployyourbackupclientinonevirtualmachinewhilethe
backupserverisinanothervirtualmachine.BothvirtualmachinesrunonthesameESX
Serversystem.Databetweenthetwovirtualmachinesmovesthroughthevirtual
ethernetthatconnectsthesevirtualmachines.
NOTE

Method1isnotrecommendedinESXServerexceptinabranchofficescenario
wherenoseparatehardwareforaVCBproxyorbackupserverisavailable.

VMware, Inc.

Chapter 1 Introduction

Whenyouusemethod1,thebackupagentperformsquiescingofavirtualmachine
beingbackedup.
Method1isgenerallyusedforfilelevelbackupsofthedatastoredwithinthevirtual
machinesdiskimage.
BackupServerinaVirtualMachine
Recommended:

No

Filelevelrestore:

Veryeasy

Fullvirtualmachinerestore:

No

Quiescing:

Excellent

LoadonESXServer:

Extremelyhigh

LANfreebackup:

No

BackupImpact:

No

Manageability:

Verypoor

Method 2: Backup Server in a Physical Machine


Withthismethod,youdeploythebackupclientinavirtualmachinewhilethebackup
serverrunsonaphysicalmachine.
NOTE

Insteadofmethod2,considerusingConsolidatedBackup.

Method2isusedforfilelevelbackupsofthedatastoredwithinthevirtualmachines
diskimage.
BackupServerinaPhysicalMachine

VMware, Inc.

Recommended:

Yes

Filelevelrestore:

VeryEasy

Fullvirtualmachinerestore:

No

Quiescing:

Excellent

LoadonESXServer:

High

LANfreebackup:

No

BackupImpact:

No

Manageability:

Verypoor

Virtual Machine Backup Guide

Backup Client in the Service Console


Method3andmethod4assumethatyoudeeplyyourbackupclientintheservice
console.
Method 3: Backup Server in a Virtual Machine
Withthismethod,youdeploythebackupclientintheserviceconsolewhilethebackup
serverrunsinthevirtualmachine.
NOTE

Method3isnotrecommendedinESXServerexceptinabranchofficescenario
wherenoseparatehardwareforaVCBproxyorbackupserverisavailable.

Method3isusedtoperformimagelevelbackups,orbackupsofentirevirtual
machines.
BackupServerinaVirtualMachine
Recommended:

No

Filelevelrestore:

No

Fullvirtualmachinerestore:

Veryeasy

Quiescing:

Excellent

LoadonESXServer:

Extremelyhigh

LANfreebackup:

No

BackupImpact:

No

Manageability:

Verypoor

Method 4: Backup Server in a Physical Machine


Withthismethod,youdeploythebackupclientintheserviceconsolewhilethebackup
serverrunsonaphysicalmachine.
NOTE

10

Insteadofmethod4considerusingConsolidatedBackup.

VMware, Inc.

Chapter 1 Introduction

Method4isusedtoperformimagelevelbackups.
BackupServerinaPhysicalMachine
Recommended:

Yes

Filelevelrestore:

No

Fullvirtualmachinerestore:

VeryEasy

Quiescing:

Excellent

LoadonESXServer:

High

LANfreebackup:

No

BackupImpact:

No

Manageability/Scalability:

Verypoor

SAN Backups
IfyourvirtualdiskfilesarestoredonaSAN,youcanusefeaturessuppliedbyyour
SANvendortocreateacopyofyourproductionLUN,containingallvirtualdisks.
Thesecopiescanthenbesenttoyourbackupmedia.Withthismethod,youdonothave
tousevirtualmachinesnapshottingfunctionalityduringthebackupprocessbecause
theSANsnapshotguaranteesconsistency.
IfyoudecidetouseSANsnapshotstobackupyourdata,youmustconsiderthe
followingpoints:
!

SomevendorssupportsnapshotsforbothVMFSandRDMs.Ifbotharesupported,
youcanmakeeitherasnapshotofthewholevirtualmachinefilesystemforahost,
orsnapshotsfortheindividualvirtualmachines(oneperdisk).

SomevendorssupportsnapshotsonlyforasetupusingRDM.IfonlyRDMis
supported,youcanmakesnapshotsofindividualvirtualmachines.

Seeyourstoragevendorsdocumentationforadditionalinformation.Formore
informationonSAN,seetheSANConfigurationGuide.

NFS Backups
Ifyourvirtualmachinesarestoredonexternalnetworkattachedstorage(NAS)
systemsusingthenetworkfilesystem(NFS)protocol,youcanperformimagelevel
backupsofthevirtualmachines.
Seeyourstoragevendorsdocumentationforadditionalinformation.

VMware, Inc.

11

Virtual Machine Backup Guide

Using VMware Consolidated Backup


Inamoderndatacenterenvironment,ithasbecomeincreasinglydifficulttoapplythe
traditionalapproachtoyourbackupprocesses.Usingitmightcauseconsiderable
overheadandanumberofproblems,someofwhicharedescribedinTraditional
BackupConsiderationsonpage 7.Toavoidmanyoftheproblemsandissues,consider
usingVMwareConsolidatedBackup.

VMware Consolidated Backup Advantages


VMwareConsolidatedBackupaddressesmostoftheproblemsyouencounterwhen
performingtraditionalbackups.ConsolidatedBackuphelpsyouto:

12

ReducetheloadonyourESXServersystemsbymovingthebackuptaskstooneor
morededicatedbackupproxies.

Avoidcongestingandoverloadingthedatacenternetworkinfrastructureby
enablingLANfreebackup.

Eliminatetheneedforabackupwindowbymovingtoasnapshotbasedbackup
approach.

Simplifybackupadministrationbymakingoptionalthedeploymentofbackup
agentsineachvirtualmachineyoubackup.

Backupvirtualmachinesthatarepoweredoff.

VMware, Inc.

C HAPTER 2

VMware Consolidated Backup

VMwareConsolidatedBackupisanewbackupsolutionofferedbyESXServer3andis
therecommendedwaytoperformdailybackupsforvirtualmachinesresidingona
SAN.Thismethodperformsbackupsusingadedicatedphysicalhost(proxyclient)
ratherthanbackingupfromanESXServersystemitself.
YoucanuseConsolidatedBackupwithasingleESXServerhostorwithaVirtualCenter
ManagementServer.
Thischapterincludesthefollowinginformation:
!

Overviewonpage 14

HowConsolidatedBackupWorksonpage 14

SettingUpConsolidatedBackuponpage 18

ConfiguringVirtualMachinesforConsolidatedBackuponpage 25

ConsolidatedBackupRestrictionsonpage 25

UsingConsolidatedBackuponpage 26

AdvancedConfigurationsonpage 27

VMware, Inc.

13

Virtual Machine Backup Guide

Overview
VMwareConsolidatedBackupisafastandefficientwayofbackingupdatainvirtual
machines.
ConsolidatedBackuphasthefollowingcharacteristics:
!

Offloadsbackupprocessestoadedicatedphysicalhost

Doesntrequirebackupagentsinvirtualmachines

Workswithotherindustryleadingbackupapplications

DoesntrestricttheuseofFibreChanneltapes

SupportsfilelevelbackupsforWindowsvirtualmachinesandfull(imagelevel)
backupforallguestoperatingsystems

How Consolidated Backup Works


ConsolidatedBackupenablesoffloadedandimpactfreebackupforvirtualmachines
runningonanESXServersystembyallowingtraditionalfilebasedbackupsoftwareto
leverageVMwarevirtualmachinesnapshottechnologyandefficientSANbaseddata
transfer.

Integration with Third-Party Backup Software


InatypicalConsolidatedBackupscenario,backupschedulingisdonebythethird
partysoftware.Asaresult,alltheadvancedschedulingandbackupmanagement
functionalityprovidedbythebackupsoftwareisalsoavailablewithConsolidated
Backup.
Backupjobsareconfiguredandlaunchedthroughthethirdpartybackupsoftware.The
basicbackupworkflowinvolvesthefollowingsteps:

14

Thethirdpartybackupsoftwareschedulesthebackupjobforasinglevirtual
machineoragroupofvirtualmachines.ThejobrunsontheVCBproxy.

ConsolidatedBackupsprebackupscriptrunsontheVCBproxy,creatingvirtual
machinesnapshots(forWindowsonly)andmountingthemontheproxy.

Thethirdpartybackupsoftwareperformsthebackup.

ConsolidatedBackupspostbackupscriptruns,removingthemountfromthe
VCBproxyandremovingthebackupsnapshots.

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Eventhoughthemounteddisksappeartobewritable,changesarecachedontheproxy
astransientwritesandarediscardedoncethediskisunmounted.Thisfeaturelets
youbackupNT4volumesthatuseanolderversionofNTFS.Windows2003running
ontheVCBproxywillfailanymountattemptsforNT4volumesiftheyarereadonly.
Formoreinformation,seeAdvancedConfigurationsonpage 27.

Requirements
TobeabletorunConsolidatedBackup,makesurethatthefollowingrequirementsare
met:
!

MicrosoftWindow2003serverisconfiguredforConsolidatedBackup.See
ConfiguringtheConsolidatedBackupFrameworkonpage 23.

Windowsvirtualmachinesareinplace.Requiredonlyforfilelevelbackup.Full
virtualmachinebackup(imagelevel)issupportedforallguestoperatingsystems.
CAUTION

FilesystemconsistencyisguaranteedforWindowsguestoperating
systemsonly.

SANisconnectedandLUNismasked.

BackupadministratoraccountexistsontheVCBproxywithreadaccesstothe
data.BecauseLUNscontainingVMFSvolumesareaccessiblebytheproxy,to
protecttheVMFSvolumesfromaccidentaldeletion,restrictaccesstotheproxyto
trainedpersonnelonly.

VMware, Inc.

15

Virtual Machine Backup Guide

ThefollowingillustrateshowdifferentcomponentsofConsolidatedBackupwork
together.

LAN

ESX Server

Backup proxy

virtual machine

backup software

VMware Tools
integration module
(pre-backup script)

file system

Consolidated
Backup
framework

SAN
vmware-hostd

c.vmdk

VMFS
datastore
mydata

Figure 2-1. Consolidated Backup Components

VMware Virtual Machine Snapshot Technology


ESXServercancreatefilesystemconsistentsnapshotsofWindowsvirtualmachines
thathaveVMwareToolsinstalled.Nofilesystemwritesarependingatthetimethe
snapshotofthevirtualmachineistaken.Asaresult,thesnapshotrepresentsaclean
stateofthevirtualmachinesdiskimages.Furthermore,systemadministratorscan
configureprefreezeandpostthawscriptsinbothWindows(applicationconsistency)
andLinuxvirtualmachinestoachieveevenhigherlevelsofdataconsistency.
Afterasnapshotofavirtualmachinehasbeencreated,thefrozendiskimagescanbe
accessedindifferentways,asdescribedintheremainderofthissection.

16

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Considerations When Creating Snapshots


Whencreatingsnapshots,keepinmindthefollowing:
!

Takingasnapshotofavirtualmachinefreezesitforaveryshortperiodoftime,
usuallyconsiderablylessthanasecond.

CreatingamemorysnapshotthroughtheUIcanleaveavirtualmachinefrozenfor
acoupleofseconds.Thismightaffectsomeverytimesensitiveapplications,such
asDBHammer.

CreatingquiescedsnapshotsusingtheSYNCdriverrequireswaitingforI/Oto
drainintheguestoperatingsystem.Thismightaffectsomeverytimesensitive
applications,suchasDBHammer.

IfyouchoosenottoinstalltheSYNCdriverwheninstallingVMwareTools,you
canavoidthedelaycausedbytheI/Odraining.However,itresultsinsnapshots
beingonlycrashconsistent,unlessyouprovidecustomquiescingthroughpre/and
postscriptsintheguest.

File-Level Backups
ForvirtualmachinesrunningWindows,ConsolidatedBackupsupportsfilelevel
backups.Afilelevelbackupisidealforpreventingdatalossduetoerrors,suchasfile
corruption,causedbybugsinapplicationprograms,orusererrors,suchasaccidental
filedeletion.
Whenrunningfilelevelbackups,ConsolidatedBackupperformsthefollowing:
1

Analyzesvolumesonvirtualmachinesnapshots.

MountsdiscoveredvolumesontheVCBproxyatpredefinedjunctionpoints.
Eachjunctionpointcorrespondstoadriveletterassignedtoeachpartitioninthe
virtualmachine.Forexample:
C:\mnt\mytestvm.foo.com\letters\D
CAUTION

VMware, Inc.

Becausetheproxycanrecognizeonlythosepartitionsthathavedrive
lettersassignedtothem,makesurethateachvirtualdiskpartition
hasadriveletter.

17

Virtual Machine Backup Guide

Full Virtual Machine Backups


ConsolidatedBackupsupportsfullvirtualmachinebackups.Afullvirtualmachine
backupisoperatingsystemneutralandcanbeperformedregardlessoftheguest
operatingsystem.
Thistypeofbackupissuitableforrestoringentirevirtualmachinesintheeventofa
hardwarefailureorasystemadministratorerror,suchastheaccidentaldeletionofan
entirevirtualmachineoradiskimage.
Whenrunningfullvirtualmachinebackups,thefollowingstepsareperformed:
1

ConsolidatedBackupexportsvirtualmachinediskimagesandconfigurationfiles
toalocaldirectoryontheVCBproxy.Forexample:
C:\mnt\mytestvm.foo.com-fullVM

Thirdpartybackupsoftwarepicksupthevirtualmachinefilesandmovesthemto
thebackupmedium.

Setting Up Consolidated Backup


BeforeyouuseConsolidatedBackup,configurethefollowingcomponents:
!

VMwareESXServerandVirtualCenter.SeeVMwareESXServerand
VirtualCenterConfigurationonpage 18.

TheSANfabric.SeeSANConfigurationonpage 19.

Thethirdpartysoftware.SeeConfiguringtheThirdPartySoftwareonpage 20.

Thebackupproxy(VCBproxy).SeeVCBProxyConfigurationonpage 21.

WindowsontheVCBproxy.SeeConfiguringWindowsontheVCBProxyon
page 22.

VMware ESX Server and VirtualCenter Configuration


YoushouldhaveanexistinginstallationofanESXServerandtheVirtualInfrastructure
(VI)ClientoramultihostconfigurationandVirtualCentertomanagethem.

18

VMware, Inc.

Chapter 2 VMware Consolidated Backup

SAN Configuration
BeforeinstallingConsolidatedBackup,setupyourESXServerstouseVMwareFile
System(VMFS)orvirtualcompatibilityrawdevicemappings(RDM).Youthenneedto
configuretheSANfabrictowhichboththeESXServersandtheVCBproxyare
connected.
Formoreinformation,seedocumentationprovidedbyyourSANstoragearrayand
switchvendors,aswellastheSANConfigurationGuide.
ForConsolidatedBackup,yourSANconfigurationmustmeetthefollowing
requirements:
!

TheVCBproxymusthaveaccessto:
!

AlltheSANarrayscontainingVMFSvolumes(datastores)withvirtualdisks
onthem

AlltheSANarrayscontainingvirtualcompatibilityRDMsthataresupposed
tobebackedupusingConsolidatedBackup

ForeveryLUNcontainingVMFSorRDMdata,theLUNIDontheproxyserver
mustmatchtheLUNIDasseenbytheESXServer.

NOTE

ThereisnosupportforEMCAX100managedwithNaviExpress.Usefull
NaviSphere.
IBMESSshouldbeexplicitlyconfiguredtohavetheconsistencyofLUNID
presentation.

Usually,theSANconfigurationonthestoragearrayinvolvesaddingtheVCBproxyto
allthehostgroupswheretheESXServersarelocated.

VMware, Inc.

19

Virtual Machine Backup Guide

Configuring the Third-Party Software


YoumustconfigurethirdpartybackupsoftwareforusewithConsolidatedBackup.
ThisinvolvesenablingtheuseoftheConsolidatedBackupprescriptsandpostscripts
foryourbackupsoftware.Also,youmighthavetoturnonthecrossjunctions(mount
points)optionforyourbackupsoftware.
Whenconfiguringthirdpartybackupsoftware,makesurethatthebackupclient
runningontheVCBproxydoesntusethefollowingmechanisms.Bothmechanisms
requirethebackupsoftwaretoalterthefilesystembeingbackedup,whichisnot
possibleinasnapshotbasedbackup.
!

Windowsarchivebitforincrementalbackups.Thearchivebitisanattributeofa
filethatsomebackupproductsusetodeterminewhetherthefileshouldbebacked
upornot.Configurethebackupclienttousetimestampsinstead.

Windowschangejournal.

Foreachsupportedthirdpartybackupsoftware,eitherthebackupsoftwarevendoror
VMwareprovidesanIntegrationModule.ThisisaZIPfilecontainingalltherequired
prebackupandpostbackupscripts.
TheZIPfilecontainsaREADME.htmlfilethatdescribeshowtousetheIntegration
Moduleontherespectivethirdpartybackupsoftware.Also,theREADME.htmlfile
outlineshowtoturnofftheWindowsarchivebitandchangejournalfunctionsinyour
thirdpartybackupsoftware,ifrequired.

Changing Backup Policies after ESX Server Upgrades


IfyouhaveupgradedyourESXServersoftware2.xto3.0,youneedtomodifyallVMFS
volumepathsthatyouconfiguredinthebackupsoftware.ApathformatthatESX
Server3usesisdifferentformtheESXServer2.xformatandfollowsthisstandard:
!

VMFSvolume
/vmfs/volumes/<file_system_UUID> or /vmfs/volumes/<file_system_label>

VMFSfile
/vmfs/volumes/<file system label|file system UUID>/[dir]/myDisk.vmdk

20

VMware, Inc.

Chapter 2 VMware Consolidated Backup

VCB Proxy Configuration


TouseConsolidatedBackup,youneedtoconfigureabackupproxy.

Hardware Requirements
TheVCBproxymustbeabletorunMicrosoftWindows2003.Inaddition,theproxy
requiresthefollowinghardwarecomponents:
!

Networkadapter(NIC)

FibreChannelhostbusadapter(HBA)

Prerequisites
TobeabletoinstallConsolidatedBackupontheVCBproxy,makesurethatthe
followingrequirementsaremet:
!

TheproxyisrunningMicrosoftWindows2003.ConsolidatedBackupdoesnt
supportanyotherversionsofWindowsontheproxy.

Networkingonthebackupproxyisconfiguredsothattheproxycanestablisha
connectiontoVirtualCenteroritsESXServerpeer.
IfthereisafirewallbetweenthebackupproxyandtheVirtualCenterorESXServer
peer,thefirewallmustpermitTCP/IPconnectionstoVirtualCenterortheESX
Serverpeer.Bydefault,VirtualCenterexpectsincomingconnectionsat
TCP/IPport902.

ThethirdpartybackupsoftwaretobeusedwithConsolidatedBackupisinstalled
andcorrectlyconfigured.
Verifytheconfigurationofthethirdpartybackupsoftwareatthistimebyrunning
abackupandrestorationjobonalocaldirectoryontheVCBproxy.

VMware, Inc.

21

Virtual Machine Backup Guide

Configuring Windows on the VCB Proxy


AftersettinguptheVCBproxy,youneedtoconfigureWindowsthatrunsontheproxy.
ConfiguringWindowsinvolvesthefollowing:
!

DisablingAutomaticDriveLetterAssignmentonpage 22

ConfiguringtheConsolidatedBackupFrameworkonpage 23

InstallingaBackupSoftwareInteroperabilityModuleonpage 25

Disabling Automatic Drive-Letter Assignment


AllversionsofWindows,exceptWindows2003EnterpriseEditionandWindows2003
DatacenterEdition,automaticallyassigndriveletterstoeachvisiblenewtechnology
filesystem(NTFS)andfileallocationtable(FAT)volume.
ForConsolidatedBackup,youneedtochangethisdefaultbehaviorsothatvolumesare
notautomaticallymountedontheproxy.
CAUTION

Ifyoudonotperformthisconfigurationstep,datacorruptionforvirtual
machinesusingRDMcanoccur.

To prevent Windows from automatically assigning drive letters to RDM


1

ShutdowntheWindowsproxy.

DisconnecttheWindowsproxyfromtheSANormaskalltheLUNscontaining
VMFSvolumesorRDMforvirtualmachines.

Boottheproxyandlogintoanaccountwithadministratorprivileges.

Openacommandlineinterface.

Runthediskpartutilitybytyping:
diskpart
Thediskpartutilitystartsupandprintsitsowncommandprompt.

Disableautomaticdriveletterassignmenttonewlyseenvolumesbytypingatthe
diskpartcommandprompt:
automount disable

Cleanoutentriesofpreviouslymountedvolumesintheregistrybytypingatthe
diskpartcommandprompt:
automount scrub

22

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Exitthediskpartutilitybytyping:
exit

ShutdownWindows.

10

ReconnecttheWindowsproxytotheSAN,orunmaskallpreviouslymasked
LUNscontainingeitherVMFSvolumesorRDM.

11

Boottheproxy.

To install the basic Consolidated Backup framework


1

Logintothebackupproxyusinganaccountwithadministratorprivileges.

InstalltheConsolidatedBackupframeworkbyrunningsetup.exefromyourCD
ROMorelectronicdistribution.

Duringtheinstallation,pickaninstallationdirectoryforConsolidatedBackupor
acceptthedefaultone.

Configuring the Consolidated Backup Framework


EssentialconfigurationforConsolidatedBackupisstoredinaconfigurationfilecalled
config.js.Itislocatedinasubdirectorynamedconfigwithintheinstalldirectoryfor
ConsolidatedBackup.

VMware, Inc.

23

Virtual Machine Backup Guide

Thefollowingtableprovidesanoverviewofalltheconfigurationsettingsinthisfile.
Table 2-1. Configuration Settings
Option

Default

Description

BACKUPROOT

C:\mnt

Directoryinwhichallthevirtualmachinebackupjobs
aresupposedtoreside.
Foreachbackupjob,adirectorywithauniquename
derivedfromthebackuptypeandthevirtualmachine
nameiscreatedhere.
Makesurethisdirectoryexistsbeforeattemptingany
virtualmachinebackups.
Forfullvirtualmachinebackups,thevolumecontain
ingthismountpointmustbelargeenoughtoholdthe
exporteddiskimagesofthelargestvirtualmachineto
behandled.

HOST

(no
default)

Hostname/portoftheVirtualCenterserverortheESX
ServerpeerusedbytheVCBproxy.

PORT

902

PortnumbertoconnecttoontheVirtualCenterorESX
Serverpeer.

USERNAME

(no
default)

UserIDtobeusedforloggingintotheVirtualCenter
hostorESXServerpeer.

PASSWORD

(no
default)

PasswordtobeusedforloggingintotheVirtualCenter
hostorESXServerpeer.

SNAPSHOT_POLICY

automatic

Validoptions:

automatic:TheConsolidatedBackupframeworkcre
atesanddeletesbackupsnapshotsforvirtualmachines
ondemand.Thisisthedefaultusedmostofthetime.
manual:TheConsolidatedBackupframeworkdoesnot
createordeleteanysnapshotsbutassumesthata
backupsnapshotnamed_VCB_BACKUP_alreadyexists
andusesthissnapshotforbackuppurposes.This
optionisusefulforcreativescripting.
createonly:TheConsolidatedBackupframework
createsabackupsnapshotwhentheprebackupscript
isbeingrun,butitdoesnotremovethesnapshotafter
backup.Thisoptionisusedifyouneedtorunaverifi
cationjob.Yourverificationscriptwouldthenbe
responsiblefortearingdownthemount.
deleteonly:TheConsolidatedBackupframework
assumesthatabackupsnapshotnamed
_VCB_BACKUP_alreadyexistsanddoesnotattemptto
createone.However,thesnapshotisdeletedbythe
postbackupscript.Thisoptionisusefulforcreative
scripting.

24

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Installing a Backup Software Interoperability Module


Finally,youmustinstallaConsolidatedBackupInteroperabilitymodulethatmatches
yourthirdpartybackupsoftware.
Fordirectionsonhowtoinstallaparticularinteroperabilitymodule,refertothe
documentationprovidedwiththeinteroperabilitymodule.

Configuring Virtual Machines for Consolidated Backup


Ingeneral,noparticularconfigurationisrequiredwithinthevirtualmachineto
supportConsolidatedBackup.
However,youmustinstallanewversionofVMwareToolscorrespondingtoESX
Server3ineachprotectedvirtualmachine.WithoutinstallingVMwareTools,the
snapshotsthatConsolidatedBackupcreatesforbackupwillbecrashconsistentonly.
Thatis,nofilesystemsynchronizationwillbeperformed.

Consolidated Backup Restrictions


Ingeneral,ConsolidatedBackupcanbackupvirtualmachinesonabackupproxy,thus
offloadingbackupfromtheESXServerandtheprotectedvirtualmachine.
Insomesituations,ConsolidatedBackupcannotbeusedforbackingupdatainavirtual
machine.Ifyouencounteranyofthesesituations,youshoulddeployabackupagentin
thevirtualmachineandperformbackupfromwithinthevirtualmachine.Thebackup
agentshouldbesuppliedbyyourthirdpartybackupsoftwarevendor.
Fordetailsoninstallationofthebackupagent,refertothedocumentationprovided
withtheinteroperabilitymodulematchingyourbackupsoftware.
YoucannotuseConsolidatedBackuptodoanyofthefollowing:
!

Backupvirtualmachineswithdiskimagesstoredonastoragedevicethatthe
proxycannotaccess

BackupvirtualmachineswithvirtualdisksthatarephysicalcompatibilityRDMs

BackupvirtualmachinesthatdonothaveanInternetprotocol(IP)addressora
domainnameserver(DNS)nameassociatedwiththem

Performafilelevelbackupofvirtualmachinesrunningoperatingsystemsother
thanWindowsNT4.0,Windows2000,WindowsXP,WindowsXPProfessional,or
Windows2003

BackupvirtualmachinesthatresideonNAS/NFSoriSCSIstoragedevices

VMware, Inc.

25

Virtual Machine Backup Guide

Performafilelevelbackupsimultaneouslywithafullbackupforthesamevirtual
machine
CAUTION

RunningtwobackupjobsonthesameVCBproxy,onethatperforms
afullbackupforonevirtualmachinewhileanotherperformsafile
levelbackupforanothervirtualmachine,cantriggerafailureofone
oftheseoperations.Ifthishappens,restartthefailedoperation.

Using Consolidated Backup


Ifyouhavemultiplevirtualmachinestobackup,groupthesevirtualmachines
togetherandmanagethatgroupasasingleentityinyourbackupsoftwareby
configuringDNSaliasesfortheproxy.
NOTE

ConsolidatedBackupsupportsamaximumof60concurrentlymounted
virtualmachines.Forexample,youcanconcurrentlymount60virtual
machinesthathaveaC:drive,or30virtualmachinesthathaveaC:andaD:
each.

Afteryouhaveassociatedagroupofvirtualmachineswithonehostname,youcanset
upabackupjobforeachaliasusingthealiasastheclientnameforthejob.

Aliases
Youcansetupdifferentaliasesforagroupofvirtualmachines,allpointingtothesame
IPaddressoftheVCBproxy.Thisletsyouassociatedifferentpermissionswiththe
group.Forexample,restorepermissionsaretiedtothesealiases,determiningwhocan
restoreandwhichvirtualmachinescanberestoredfrom.
Ifyourdepartmentgrowsandyouaddanotherphysicalmachine,aliasesmakeiteasy
tomoveagrouptoadifferentproxy.Youcanaddnewproxiesasthedatacentergrows
andthenmovejobsforthegroupbypointingthealiastoanewproxy.

26

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Configuring Backup Jobs


ConsolidatedBackupisabletomakebackupsofvirtualmachinesonthebackupproxy.
Whenconfiguringbackupjobs,makesurethat:
!

Alljobsareassignedtotheproxy.

Alljobsarespecifiedbyoneofthefollowingdirectories:

filelevel:C:\mnt\mytestvm.foo.com\letters\D

imagelevel:C:\mnt\mytestvm.foo.com-fullVM

Eachjobisscheduledtorunatspecifictime.
NOTE

Ifyouplantorunmultiplebackupjobsonthesameproxyatthesame
time,rememberthatbackupproductsmighthavelimitationsona
numberofjobsyoucanruninparallel.

Formoredetailsonhowtoconfigurebackupjobsforvirtualmachines,refertothe
documentationprovidedwithyourthirdpartybackupsoftware.

First-Time Backup
Whenyouperformafirstbackupforaparticularvirtualmachine,thevirtualmachine
hastobepoweredon,orthebackupfailsonESXServer.
Afteryouhavecompletedthefirstbackupofthevirtualmachine,ConsolidatedBackup
canperformbackupsofthevirtualmachineregardlessofitspowerstateatbackup
time.

Advanced Configurations
Oncertainoccasions,youmightneedtoperformsomeadvancedconfigurationswhen
usingConsolidatedBackup.Forexample,youcanruncustomscripstocreatea
quiescentsnapshotofyourvirtualmachine.Also,youmightneedtorunapostbackup
commandforyourvirtualmachinestocancelbackupjobs.

VMware, Inc.

27

Virtual Machine Backup Guide

Running Custom Quiescing Scripts


WhenyouuseConsolidatedBackup,yourvirtualmachinesareautomaticallyquiesced
whenyoustartthebackupprocess.
Youcanalsoruncustomprefreezeandpostthawquiescingscriptstocreatea
quiescentsnapshotofyourvirtualmachine.Youdeployandrunthecustomquiescing
scriptsinsidetheprotectedvirtualmachine.
Whenrunningthescripts,youcanusetheSYNCdriver,anoptionalfeaturethatholds
incomingI/Oandflushesalldirtydatatoadisk,thusmakingfilesystemsconsistent.
BecausetheSYNCdriverisoptional,youmightdecidenottoinstallitwheninstalling
VMwareTools.TheSYNCdriveriscurrentlynotsupportedonthefollowingoperating
systems:
!

64bitguestoperatingsystems

AnyoperatingsystemotherthanWindows

Runningthescriptsinvolvesthefollowingsteps.

Step 1 Running a pre-freeze script


ConsolidatedBackuprunsthefollowingprefreezescriptwithinthevirtualmachine
beingbackedup:
!

ForWindows:
C:\Windows\pre-freeze-script.bat

Forallotheroperatingsystems:
/usr/sbin/pre-freeze-script

Iftheprefreezescriptreturnsanonzeroexitcode,thesnapshotcreateoperationfails.

Step 2 Engaging the SYNC driver (optional)


EngagetheSYNCdrivertoholdincomingI/Oandflushalldirtydatatoadisk.This
helpstomakethefilesystemsconsistent.
Ifthisstepfails,proceedtostep5andfailthesnapshotcreation.

28

VMware, Inc.

Chapter 2 VMware Consolidated Backup

Step 3 Creating a snapshot


Inthisstep,anactualquiescentsnapshotofyourvirtualmachineiscreated.Ifthisstep
takestoolongandtimesout,thesnapshotcreateoperationfailsandthesnapshotis
deleted.Proceedtostep5.

Step 4 Disengaging the SYNC driver


DisengagetheSYNCdrivertoallowI/Oagain.Thisstepcanfailifthesnapshotcreation
instep3tooktoolongandtimedout.

Step 5 Running post-thaw script


ConsolidatedBackuprunsthefollowingpostthawscriptwithinthevirtualmachine:
!

ForWindows:
C:\Windows\post-thaw-script.bat

Forallotheroperatingsystems:
/usr/sbin/post-thaw-script

EventhoughVMwareToolsdoesnotcurrentlychecktheexitstatusofthisscript,it
shouldreturn0ifsuccessful.

Canceling a Backup Job


Ifabackupoperationiscanceledfromyourthirdpartysoftwarewhilethebackupisin
process,thevirtualmachinemightnotbeunmountedfromtheproxyserver,andthe
snapshotmightnotbedeleted.Thisistobeexpectedbecausethecleanupscriptwas
unabletorun.Tofixtheproblem,youmustmanuallyrunthepostbackupcommand
foreachvirtualmachine.
To run the post-backup command
1

Checkthefoldersinthe C:\mntdirectorytodeterminethevirtualmachinehost
names.

Foreachvirtualmachinehostname,runthefollowingcommand.Runthis
commandfromthegenericsubdirectoryintheConsolidatedBackupinstallation
directory.

cscript /nologo <VCB default installation path ["C:\program


files\VMware\VMware Consolidated Backup Framework"]> postcommand.wsf <virtual_machine_hostname>

VMware, Inc.

29

Virtual Machine Backup Guide

30

VMware, Inc.

Restoration and Disaster


Recovery
C HAPTER 3

Thischapterdescribeshowtorestoreyourdataorrecoverfromadisaster.Youneedto
findabalancebetweenthenumberofagentsthatyouwanttouseandtheeasewith
whichyoucanrestoreyourdata.
Thischapterincludesthefollowinginformation:
!

RestoringYourFilesUsingConsolidatedBackuponpage 32

RestoringFilesUsingthevcbRestoreUtilityonpage 33

DataRecoveryonpage 33

VMware, Inc.

31

Virtual Machine Backup Guide

Restoring Your Files Using Consolidated Backup


ConsolidatedBackuphelpsyouperformfilebasedrestoresofyourvirtualmachines.

Restore
Forinformationonrestoringworkflows,consultthedocumentationthatcomeswith
theintegrationmoduleforyourthirdpartybackupsoftware.
Ingeneral,threedifferentrestorationworkflowsaresupported:
!

Nobackupsoftwareinvirtualmachine.Restorationisdonebytheadministrator
onabackupproxynetworksharethatisaccessiblebytheprotectedvirtual
machine.

Backupsoftwareindedicatedvirtualmachinesanddatamovedtotargetvirtual
machines.

Backupsoftwaredeployedineveryprotectedvirtualmachine.Restorationisdone
directlybythesystemadministratorortheuser.

Centralized Restore
Whenperformingacentralizedrestore,youhaveagroupofvirtualmachinesonESX
Server,aproxy,andabackupagentontheproxyinadedicatedvirtualmachinethat
youareplanningtousetorestoreyourdata.Inthiscase,youusethebackupsoftware
togetthedatatotheproxythatisrunningtheagent.Aftertheadministratorrestores
thedatatothecentralserver,youcancopyitbacktothevirtualmachineusingthe
CommonInternetFileSystem(CIFS)remoteaccess,filesharingprotocol.
Pros:Thereareaminimumnumberofagentstomaintain.
Cons:Datarestorationisnowcentralized,andtheadministratorisinvolvedinfilelevel
restoration.

Per-Group Restore
Whenperformingapergrouprestoration,onevirtualmachinehasabackupagentfor
eachgroup,suchasaccounting,engineering,andmarketing.Thegroupadministrator
restoresworkflowstoapergrouprestorehost.Filesarecopiedtoatargetvirtual
machineusingCIFSfileshare.
Pros:
!

Restorationscanbedelegated.

Thisisagoodcompromisebetweenthenumberofagentsandeaseofrestoration.

Cons:Thisisnotacompleteselfservicerestoration.
32

VMware, Inc.

Chapter 3 Restoration and Disaster Recovery

Self-Service Backup
Backupagentsaredeployedineveryvirtualmachine.Theusercanusetheagentto
backupdatatotapeandrestorethesameway.Thebackupagentinthevirtualmachine
isusedtorestorethedata.
Pros:Thisisselfservicerestoration.
Cons:Agentsarerequiredineachvirtualmachine.

Restoring Files Using the vcbRestore Utility


ThevcbRestoreutilityisacommandlineutilitythatyouusetorestoredatathathas
beenbackedupusingimagebasedbackup.
Forinformationonhowtousethisutility,seeUsingServiceConsoletoBackUpand
RestoreVirtualMachinesonpage 37.

Data Recovery
Thefollowingguidelinescanaidyouinrecoveringyourdata:
!

Makesureyouhavefullvirtualmachineimagebasedbackups.

BackupyourVirtualCenterDatabase.

Makesureyouhaveyourlicensekeys.

Makesureyouhaveenoughserverstorunallthevirtualmachinesyouplanto
restore.

EnablingmigrationwithVMotionorusingDRSgreatlyenhancesyourdisaster
recoverycapabilities.

Troubleshooting
InESX3.0,VMFSvolumesareidentifiedbyuniqueidentifiers.Thenameofthe
directoryunderwhicheachVMFSvolumeismountedin/vmfs/volumescorresponds
tothisuniqueidentifier.Theuniqueidentifierisassignedtothevolumeautomatically
duringformatting,andyoucannotchangeit.

VMware, Inc.

33

Virtual Machine Backup Guide

VMFSvolumescanhaveuserfriendlylabels.Theselabelsshowupassymboliclinks
in/vmfs/volumesthatpointtothecorrespondingdirectory.Forexample,foraVMFS
volumewiththeuniqueidentifier43a0552e-ae6093b2-47a1-00145e0a7ec0andthe
labelstorage1,thefollowingentriesarecreatedunder/vmfs/volumes:
!

Adirectorynamed43a0552e-ae6093b2-47a1-00145e0a7ec0,underwhichthefile
systemismounted

Asymboliclinknamedstorage1,pointingtothedirectory43a0552e-ae6093b247a1-00145e0a7ec0

Graphicaluserinterfaces(GUIs)forbackupsoftwarethatallowyoutoselectfilesfor
backupshowonlythedirectory(theuniqueID)intheirBrowseDirectorypane.
To identify a VMFS volume by its label
1

Browsethe/vmfs/volumesdirectoryinyourbackupsoftwareGUI.
ThesymboliclinkspointingtotheVMFSvolumemountpointsshowupinthefile
selectionpane.

UsetheseentriestofindtheuniqueIDforthefilesystemlabelyouneed.

SelectthedirectorycorrespondingtothisuniqueIDinthedirectorypanefor
browsing.

Whenperformingfilebasedbackups,thebackupapplicationusespathsreferencing
theuniqueidentifier,sothebackedupfilesshowupasthefollowing:
/vmfs/volumes/43a0552e-ae6093b2-47a1-00145e0a7ec0/vm01/vm01.vmdk
Whenrestoringfilesfromthebackupapplication,youmightneedtoperformareverse
mappingtoidentifythecorrectVMFSvolumelabel(inthisexample,storage1)
correspondingtothisuniqueidentifier.Tobeabletodothis,considerbackingupthe
symboliclinkitselfwhileperformingbackups.

34

VMware, Inc.

C HAPTER 4

Backup Scenarios

Thischapterdescribesrealworldscenariosthatcanhelpyouplanyourbackup
strategies.
Thischapterincludesthefollowinginformation:
!

BackupUsageScenariosonpage 36

ATypicalConsolidatedBackupUsageScenarioonpage 36

VMware, Inc.

35

Virtual Machine Backup Guide

Backup Usage Scenarios


Thefollowingarethemostrecommendedusecases:
!

DatacenterConsolidatedBackupatthefilelevelperformedeverynight.

DatacenterConsolidatedBackupattheimagelevelperformedperiodicallyfor
WindowsornightlyforLinux.Thisisadisasterrecoveryscenario.

AgentsinvirtualmachinesIncrementalbackupforLinux.

BackupserverinavirtualmachineForbranchoffices,agentsinthevirtual
machineaswell.

A Typical Consolidated Backup Usage Scenario


ThisisanexampleofhowyoucanuseConsolidatedBackuptoprotectdatainvirtual
machines:
1

Thesystemadministratorconfiguresbackupschedulesandpoliciesinthethird
partybackupsoftware.
Forexample,thesystemadministratormightinstructthebackupsoftwaretoback
upD:\Data on vm37.company.comdailyat3:05a.m.

36

Thebackupsoftwareschedulesthisbackupjobautomatically.

Whenthebackupsoftwarelaunchesthisjob,itcallsintotheConsolidatedBackup
frameworkbyusingaprebackupscript.ConsolidatedBackupperformsthe
following:
a

ContactsaVirtualCenterinstanceoranESXServerpeer,andrequestsitto
createasnapshotofthevirtualmachinetobebackedup.

Makesthissnapshotavailable(mounted)onthebackupproxy.Thismakesthe
datathatneedstobebackedupvisibletothethirdpartybackupsoftware.

Thethirdpartybackupsoftwareperformsthebackupprocedureofcopying
changeddatatothebackupmedia.

Attheendofthebackupjob,thethirdpartybackupsoftwarecallsintothe
ConsolidatedBackupframework,usingapostbackupscriptinwhich
ConsolidatedBackupdoesthefollowing:
a

Detaches(unmounts)thesnapshotfromthebackupproxy.

AsksVirtualCenteroritsESXServerpeertoremovethevirtualmachine
snapshot.

VMware, Inc.

Using Service Console to Back


Up and Restore Virtual Machines
A PPENDIX A

Thisappendixdescribeshowtobackupandrestorevirtualmachinesusingtheservice
console.TheappendixwalksyouthroughtheprocessofconfiguringtheConsolidated
Backupcommandlineutilitiesandprovidesexamplesonhowtousetheseutilities.
Thisappendixincludesthefollowingsections:
!

GeneralConfigurationSettingsforConsolidatedBackupUtilitiesonpage 38

BackingUpVirtualMachinesonpage 40

RestoringVirtualMachinesonpage 44

VMware, Inc.

37

Virtual Machine Backup Guide

General Configuration Settings for Consolidated Backup


Utilities
BeforeusingserviceconsoleConsolidatedBackuputilities,editthe/etc/vmware/
backuptools.conf configurationfiletosetthemostcommonparametersforthese
tools.
BecausethisconfigurationfileisparsedasaBourneshellscript,youshouldfollow
generalsyntaxconventionsoftheBourneshellwheneditingthefile:
!

Usethe#charactertoindicateacomment.

Donotusespaceswhenenteringvariables.Forexample,FOO="bar"shouldhave
nospacesaroundtheequalssign.

Useabackslashbeforeenteringanyspecialcharacters,suchas$.Forexample,
\$erver.

AdministratorsfamiliarwithBourneshellscriptprogrammingcanuseallthestandard
Bourneshellmechanisms,suchascommandexecution,forexample`foo`,oruse
environmentvariables.

Configuration File Settings


Usethe/etc/vmware/backuptools.conf configurationfiletosetupthefollowing
options.
VCHOST
SpecifiestheURLoftheVirtualCenterinstancethatmanagestheESXServerhost
beingbackeduporrestored.VCHOSTshouldpointtotheVirtualCenterinstance
managingthehost.
Ifyouperformthebackuporrestoreoperationsonastandalonehost,youcanuse
localhostasthehostname.
NOTE

Youcanusethe-hcommandlineoptionforanyConsolidatedBackup
commandlineutilitytooverridethissetting.

USERNAME
SpecifiestheusernametologintotheVirtualCenterinstancedefinedbyVCHOST.
Theusermusthaveprivilegestobeabletoregisterorcreatevirtualmachines.
NOTE

38

Youcanusethe-ucommandlineoptionforanyConsolidatedBackup
commandlineutilitytooverridethissetting.

VMware, Inc.

Appendix A Using Service Console to Back Up and Restore Virtual Machines

PASSWORD
SpecifiesthepasswordcorrespondingtoUSERNAME.Thisoptionallowsyouto
performvirtualmachinebackupsinanoninteractiveway.
NOTE

Becausespecifyingapasswordinaconfigurationfilecanpresenta
securityrisk,makesurethattheServiceConsoleisnotusedbyanyone
exceptanESXServeradministrator.

NOTE

Youcanusethe-pcommandlineoptionforanyConsolidatedBackup
commandlineutilitytooverridethissetting.

VMNAMECACHE
Themostcommonwayofidentifyingavirtualmachineforbackuppurposesisby
itsDNSnameorbyitsIPaddress.However,whenyoubackupavirtualmachine
fromastandaloneESXServerhost,theESXServerhostcanrecognizetheIP
addressonlywhenthevirtualmachineispoweredonandrunningVMwareTools.
TobeabletoperformbackupsofthevirtualmachineonthestandaloneESXServer
hostevenwhenthevirtualmachineispoweredoff,youshouldmaintainacache
file.ThecachefilerecordstheIPaddressofthevirtualmachineeachtimethe
virtualmachineisbeingbackedup.Thisallowsyoutoperformthefuturebackups
ofthisvirtualmachineregardlessofitspowerstate.
VMwarerecommendsthatyoudonotchangethedefaultsetting.
NOTE

Youcanusethe-ccommandlineoptionforvcbMountertooverridethis
setting.ThevcbRestorecommanddoesnotusethissetting.

TEMPDIR
IfyouareusingthesecurecopycapabilitiesoftheConsolidatedBackup
commandlineutilities,youcanusethisoptiontospecifyatemporaryholding
spaceforyourvirtualmachinedata.
Thisholdingspacemusthaveenoughfreestoragetoholdthelargestofyour
virtualmachines.
NOTE

VMware, Inc.

Thissettingcannotbeoverriddenfromthecommandline.

39

Virtual Machine Backup Guide

Backing Up Virtual Machines


YoucanusevcbMountertobackupanentirevirtualmachineintheserviceconsole.The
vcbMounterutilitycreatesaquiescedsnapshotofthevirtualmachineandexportsthe
snapshotintoasetoffiles,whichcanbelaterusedtorestorethevirtualmachine.To
backupthesetoffiles,youcanuseanyfilebasedthirdpartybackupsoftware.
BeforebackingupavirtualmachineusingvcbMounter,determinethefollowing:
!

Whichvirtualmachinetobackup.
Forinformationonidentifyingvirtualmachines,seeIdentifyingVirtual
Machinesonpage 41.

Wheretostorethebackupdata.
ConsolidatedBackupserviceconsolesupportsdifferenttransportpluginsto
eitherbackupthevirtualmachinetoalocaldirectoryorbackituptoaremote
directoryusingscp.Formoreinformation,seeSpecifyingBackupDestinations
onpage 43.

Performing Backups
AftersettingupconfigurationoptionsasdescribedinConfigurationFileSettingson
page 38,enterthefollowingcommandinthecommandline:
vcbMounter -a <virtual_machine_identifier> -r <backup_destination>,
where
!

<virtual_machine_identifier>isauniqueidentifierofthevirtualmachineyoure
backingup.Forinformationonidentifyingvirtualmachines,seeIdentifying
VirtualMachinesonpage 41.

<backup_destination>specifiesthelocationforbackupdata.Forinformationon
howtospecifyabackupdestination,seeSpecifyingBackupDestinationson
page 43.

NOTE

Whenbackingupagroupofvirtualmachines,usethevcbSnapAllcommand
insteadofvcbMounter.Forinformationonhowtoidentifythegroupyou
wanttobackup,seeIdentifyingGroupsofVirtualMachinesonpage 42.

Followtheseexampleswhenbackingupvirtualmachines:
!

Backingupthevirtualmachinevm37.company.comtothelocaldirectory/home/
VMs/vm37:
vcbMounter -a ipaddr:vm37.company.com -r /home/VMs/vm37

40

VMware, Inc.

Appendix A Using Service Console to Back Up and Restore Virtual Machines

Backingupthevirtualmachinevm37.company.comtothedirectory/backups/VMs/
vm37.Thedirectoryislocatedontheremoteserverbackups.company.comwiththe
userIDvmware. Thebackups.company.comhostisrunningasecureshell(ssh)
server.YoucanuseConsolidatedBackupssecurecopy(scp)plugintotransferthe
virtualmachinetobackups.company.com.

vcbMounter -a ipaddr:vm37.company.com -r scp://vmware@backups.company.com:/backups/


VMs/vm37
!

BackingupavirtualmachineonastandaloneESXServerhost.Toidentifythe
virtualmachine,usethevirtualmachinesnamedisplayedintheVIClient.The
virtualmachineisbackeduptothelocaldirectory/home/VMs/vm37.
vcbMounter -a name:"Virtual Machine 37" -r /home/VMs/vm37
NOTE

Thevirtualmachinenameargumentiscasesensitive.

Identifying Virtual Machines


Youcanusedifferentstandardstospecifythevirtualmachineyouwanttobackup.

Identifying Virtual Machines by DNS Name or IP Address


ThemostcommonwayofidentifyingvirtualmachinesistousetheirDNSnameorIP
address.Toidentifythevirtualmachine,usethefollowingspecification:
ipaddr:<DNS name or IP address>
Forexample,torefertothevirtualmachinevm37.company.comwiththeIPaddress
10.17.5.12,useoneofthefollowingsearchspecifiers:
!

ipaddr:vm37.company.com

ipaddr:10.17.5.12

Identifying Virtual Machines by BIOS UUID


Youcanidentifyavirtualmachinebyitsuniversallyuniqueidentifier(UUID).Usethe
followingsearchspecifier:
uuid:<uuid>
Forexample:
uuid:564d78a1-8c1c-59b4-fa02-be14138797be

VMware, Inc.

41

Virtual Machine Backup Guide

Identifying Virtual Machines by MoRef


Internally,VirtualCenterandESXServerrefertoobjectsbyManagedObjectReferences
(MoRef).ToidentifyavirtualmachinebyMoRef,followtheseexamples:
!

moref:vm-00027UsethisformatwhenaccessingVirtualCenterServer.

moref:248UsethisformatwhenaccessingtheESXServerhost.

BecauseMoRefschangeeverytimetheVirtualCenterserverorthehostinstancethat
ConsolidatedBackupconnectstogetsrestarted,youshouldnotuseMoRefstoidentify
virtualmachines.However,whenrunningashellscripttobackvirtualmachines,you
canuseMoRefstoidentifythevirtualmachines.
Forexample,youcanwriteascriptthatusesvcbVmNamewiththeany:searchspecifier
togetalistofallvirtualmachinesfirst,andthenperformscustomfilteringtoproduce
alistofonlythosevirtualmachinesyouwanttobackup.Virtualmachinesonthislist
canuseMoRefsastheiridentifiers.AnotherpartofyourscriptcanthencallvcbMounter
oneachoftheseMoRefstoperformthebackupoperations.
Inacaselikethis,usingMoRefsratherthanotheridentifiers,suchasUUID,causesless
searchoverheadbecausetheentirelistofallvirtualmachinesdoesntneedtobeparsed
eachtimetheidentifierisused.

Identifying Groups of Virtual Machines


Whenyouneedtobackupagroupofvirtualmachines,youusethevcbSnapAll
commandinsteadofvcbMounter.Youidentifyaspecificgroupbyusingoneofthe
followingsearchspecifiers:
!

powerstate:on|off|suspendedFindsallvirtualmachineswiththespecified
powerstate.

any:Findsallvirtualmachines.

none:Doesntfindanyvirtualmachines.Youcanusethisoptionfortesting
purposes.

Displaying Virtual Machine Information


Tosearchforaparticularvirtualmachineandgetinformationaboutit,usevcbVmName.
Followtheseexamples:

42

vcbVmName -s powerstate:onListsallpoweredonvirtualmachines.

vcbVmName -s any:Listsallknownvirtualmachines.

vcbVmName -s ipaddr:vm37.company.comDisplaysinformationaboutthevirtual
machinewiththespecifiedaddress.

VMware, Inc.

Appendix A Using Service Console to Back Up and Restore Virtual Machines

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

Specifying Backup Destinations


Youcanbackupavirtualmachinetoalocaldirectoryortoaremoteserverusingscp.

Backing Up to a Local Directory


Whenbackingupavirtualmachinetoalocaldirectory,youcanspecifythepathtothe
directoryorusethefiletransportplugindescriptor.
Forexample,tobackupavirtualmachinetothelocaldirectory/home/VMs/vm37,you
canuseoneofthefollowingspecifiers:
!

/home/VMs/vm37

file://home/VMs/vm37

NOTE

Youdontneedtocreatethedestinationsubdirectory,suchas/home/VMs/
vm37, inadvancebecausethebackupoperationwillcreateit.However,the
directorythatlistsyourdestinationsubdirectory,forexample/home/VMs,
mustexistbeforeyoustartabackupprocess.

Backing Up to a Remote Server


Whenbackingupavirtualmachinetoaremoteserver,youcanuseacorresponding
scpplugin.Usethefollowingsyntax:
scp://<user>@<host>:<path>
Toperformthescpbackupinanautomatedway,useRSAkeybasedauthentication.In
thiscase,scpwillnotpromptyouforapasswordduringbackup.

VMware, Inc.

43

Virtual Machine Backup Guide

Forexample,youneedtobackupavirtualmachinetothedirectory/backup/VMs/vm37
locatedontheremoteserverbackups.company.comthatusesthevmwareuserID.Enter
thefollowing:
scp://vmware@backups.company.com:/backups/VMs/vm37
NOTE

Priortobackup,makesurethatthe/backups/VMsdirectoryalreadyexistson
theremoteserver.However,youdonotneedtocreatethe/backups/VMs/vm37
directorybecauseitwillbecreatedduringthebackupoperation.

Restoring Virtual Machines


Youcanrestoreavirtualmachinetoitsoriginallocationortoanotherlocationofyour
choice.

Restoring Virtual Machines to Original Locations


IfyousetupallconfigurationoptionsasdescribedinConfigurationFileSettingson
page 38,thefollowingistheonlycommandyouneedtopasstovcbRestoretorestore
avirtualmachine:
vcbRestore -s <backup_directory>
Forinformationonhowtospecifyabackupdirectory,seeSpecifyingBackup
Destinationsonpage 43.
Followtheseexampleswhenrestoringyourvirtualmachines:
!

Restoringavirtualmachinefromalocalbackupdirectorynamed/home/VMs/vm37:
vcbRestore -s /home/VMs/vm37

Restoringavirtualmachinefromtheremoteserverbackup.company.com,directory
/backups/VMs/vm37,anduserIDvmware:
vcbRestore -s scp://vmware@backup.company.com:/backups/VMs/vm37

Restoring Virtual Machines to Alternative Locations


Whenyouneedtorestoreavirtualmachinetoalocationotherthanitsoriginallocation,
ortoadifferentESXServerhost,youusethevirtualmachinescatalogfile.vcbMounter
createsthisfileforeachvirtualmachineitbacksup.Thecatalog filecontainssummary
informationaboutthevirtualmachine,suchasitsdisplayname,itspowerstateatthe
timeofbackup,andsoon.

44

VMware, Inc.

Appendix A Using Service Console to Back Up and Restore Virtual Machines

To restore a virtual machine to an alternative location


1

Makeacopyofthevirtualmachinescatalogfile.
SeeCopyingaCatalogFileonpage 45.

Inthecopyofthecatalogfile,specifythenewsettingsfordatastores,folderpath,
andresourcepool.
SeeEditingaCatalogFileonpage 45.

RestorethevirtualmachineusingvcbRestore.
SeeRestoringVirtualMachinesUsinganAlternateCatalogonpage 47

Copying a Catalog File


Whenrestoringavirtualmachinetoalocationotherthantheoriginal,youstartby
makingacopyofthevirtualmachinescatalogfile.
Forexample,youneedtomakeacopyofthecatalogfileofthe/home/VMs/vm37virtual
machine.Enterthefollowing:
cp /home/VMs/vm37/catalog /tmp/catalog-vm37

Editing a Catalog File


Inthecopyofthecatalogfileyoumade,youneedtochangethefollowingsettings:
!

DatastoreThedatastoreidentifieswheretostoreallthefilesthatcomprisea
virtualmachine.

FolderpathThevirtualmachinesfolderpathdefineswherethevirtualmachine
willbeplacedintheVirtualCenterfolderhierarchy.

ResourcepoolThishostspecificconfigurationitemdeterminesthevirtual
machinesbehaviorwithrespecttoDRS(DistributedResourceScheduling).When
youusemultipleESXServersmanagedbyVirtualCenter,thisitemalsospecifies
thehostthatwillrunthevirtualmachine.

NOTE

Ifyouchangethenameofthevirtualmachineinthecatalogfile,vcbRestore
doesntpickupthenewnamefromthefile,butinsteadusestheoriginal
virtualmachinenamespecifiedinthe.vmxfile.
YoucanchangethenameofthevirtualmachinelaterusingtheVIClient.

VMware, Inc.

45

Virtual Machine Backup Guide

Changing Datastore Paths


Thedatastorepathinthecatalogfileidentifieswheretostoreallthefilesthatcomprise
avirtualmachine.Changedatastorepathsinthefollowingentries:
!

disk.scsi*.disknameNamesandlocationsofalldisksassociatedwiththis
virtualmachine.

config.vmxLocationforthevirtualmachinesmainconfigurationfile.

config.suspenddirLocationforthememorysnapshotstakenwhenthevirtual
machinegetssuspended.

config.logdirLocationforthevirtualmachineslogfiles.

Bydefault,alltheseentriesusethesamepath,whichpointstothesamedirectoryon
thesamedatastore.Itishighlyrecommendedthatyoufollowthisstandardwhen
changingthepath.
Thedatastorepathshavethefollowingsyntax:
[<datastore_name>] <path_on_datastore>
Youcanobtainalistofvaliddatastorenamesfromthedatastorebrowserinyour
VirtualCenterclient,orbylookingatthefilesystemlabelsofyourVMFSvolumesin
theserviceconsoleunder/vmfs/volumes.
Changing Folder Paths
Thevirtualmachinesfolderpathinthecatalogfilespecifiesthefolderwithinthe
VirtualCenterfolderhierarchywheretherestoredvirtualmachinewillbeplaced.
To change the folder path for the virtual machine
1

Identifythefolder,whichwillstorethevirtualmachine,byrunningthefollowing
commandintheserviceconsole:
vcbUtil -c vmfolders
Runningthiscommandassumesthatyouhavesetupappropriateconfiguration
optionsasdescribedinConfigurationFileSettingsonpage 38.

46

Inthecatalogfile,setthefolderpathtooneofthefolderpathsprintedoutbythe
commandabove.

VMware, Inc.

Appendix A Using Service Console to Back Up and Restore Virtual Machines

Changing Resource Pools


Theresourcepoolsentryinthecatalogfiledeterminesthevirtualmachinesbehavior
withrespecttoDRS(DistributedResourceScheduling).WhenyouusemultipleESX
ServersmanagedbyVirtualCenter,thisitemalsospecifiesthehostthatwillrunthe
virtualmachine.
To change the resource pool setting for the virtual machine
1

Identifytheresourcepool,whichthevirtualmachinewilluse,byrunningthe
followingcommand:
vcbUtil -c resourcepools
Runningthiscommandassumesthatyouhavesetupappropriateconfiguration
optionsasdescribedinConfigurationFileSettingsonpage 38.

Inthecatalogfile,settheresourcepooltooneoftheoptionsprovidedbythe
commandabove.

Restoring Virtual Machines Using an Alternate Catalog


Aftermodifyingthesettingsinthevirtualmachinesalternatecatalog,usethisfileto
restorethevirtualmachine.
Torestorethevirtualmachine,usethe-aentrytospecifythealternatecatalog.
Forexample,torestoreavirtualmachinebackedupunder/home/VMs/vm37byusingthe
alternatecatalogfile/tmp/catalog-vm37,enter:
vcbRestore -s /home/VMs/vm37 -a /tmp/catalog-vm37

VMware, Inc.

47

Virtual Machine Backup Guide

Non-interactive Use of the vcbRestore Utility


Bydefault,vcbRestorepromptsyouwhattodowhentherestoreoperationdetectsa
filethatalreadyexistsoravirtualmachinealreadyknowntoVirtualCenter.
IfvcbRestoreisusedbyascriptinanoninteractiveway,usethe-bcommandline
entrytospecifythedefaultbehavior.Thefollowingoptionsareavailable:
prompt
Promptsauserwhattodobeforeoverwritingfilesorconfigurationsofvirtual
machinesalreadyknowntoVirtualCenter.
overwrite
Overwritesanyexistingfilesandvirtualmachineconfigurationsknownto
VirtualCenterduringrestore.
keep
Preservesexistingfilesandconfigurationsofvirtualmachinesknownto
VirtualCenterwithoutreplacingthem.
abort
Terminatestherestoreoperationafterdetectinganexistingfileoravirtual
machineconfigurationalreadyknowntoVirtualCenter.

48

VMware, Inc.

Restoring Virtual Machines


from ESX Server 2.5.x to ESX Server 3.0
A PPENDIX B

Thisappendixdescribeshowtorestorevirtualmachines,whichwerecreatedand
backeduponESXServer2.5.x,inESXServer3.0usingtheserviceconsole.
Thisappendixincludesthefollowingsections:
!

SettingConfigurationParametersonpage 50

RestoringESX2.5.xServerVirtualMachinesonpage 51

VMware, Inc.

49

Virtual Machine Backup Guide

Setting Configuration Parameters


TorestorevirtualmachinesfromESXServer2.5.xtoESXServer3.0,youfirstneedto
setupconfigurationparametersinthe/etc/vmware/backuptools.conffile.
Tosetupgeneralparameters,followrecommendationsinGeneralConfiguration
SettingsforConsolidatedBackupUtilitiesonpage 38.
Inaddition,definethefollowingspecificparameters.
DSPATH
Specifiesthepathtoadatastorewhereyourrestoredvirtualmachinewillreside.
Toavoidsettingupthisoptionindividuallyforeachvirtualmachineyourestore,
usethe%VMNAME%entry.Duringtherestoreprocess,thebasenameofthevirtual
machines.vmxconfigurationfilesubstitutesthisentry.
Forexample,torestorevirtualmachinestotheoldvmsdatastoreusingthebase
nameofthevirtualmachines.vmxfile,enterthefollowing:
DSPATH="[oldvms] %VMNAME%"
Thisentryrestoresthevirtualmachinewiththemyvm.vmxfileinto[oldvms] /myvm.
VMHOST
Specifiesthehostforthevirtualmachineyourestore.Thevirtualmachinewillbe
poweredonfromthishost.
RESOURCEPOOL
Specifiestheresourcepoolforthevirtualmachineyourestore.Formore
informationonthisparameter,seeChangingResourcePoolsonpage 47.
NOTE

Makesuretoselectavalidresourcepoolonthehostyouspecifiedin
VMHOST.Typically,theresourcepoolnamecontainsthenameofthe
correspondingESXServerhost.Youcanalsousethe%VMHOST%entry,
whichwillbereplacedbythevalueyouassignedtoVMHOST.

FOLDERPATH
SpecifiesthefolderwithintheVirtualCenterhierarchy,inwhichtherestored
virtualmachinewillbeplaced.Formoreinformationonthisparameter,see
ChangingFolderPathsonpage 46.

50

VMware, Inc.

Appendix B Restoring Virtual Machines from ESX Server 2.5.x to ESX Server 3.0

Restoring ESX 2.5.x Server Virtual Machines


Afterdefiningallnecessarysettingsinthe/etc/vmware/backuptools.conffile,youcan
restorevirtualmachinesthatwerebackeduponESXServer2.5.x.
TherestoreprocessisthesameasfortheESXServer3.0virtualmachines.
Formoreinformation,seeRestoringVirtualMachinesonpage 44.

VMware, Inc.

51

Virtual Machine Backup Guide

52

VMware, Inc.

Index

archive bit 20

physical compatibility 4
physical SCSI disks 3

B
backup destinations 43
BIOS UUID 41

catalog files 45
change journal 20
configuration file 38
configuration files, exporting 18

User groups ix
utilities 38

D
directory, /vmfs/volumes 4
disk images, exporting 18
DNS name 41

Report LUNs command 4

V
VCB utilities 38
virtual compatibility 4
virtual-to-physical clustering 4
VMFS 3
vmkfstools command 5
VMware community forums ix

F
file allocation table 22

I
IP address 41

K
Knowledge base ix

M
metadata 4
MoRef 42

N
new technology file system 22

VMware, Inc.

53

Virtual Machine Backup Guide

54

VMware, Inc.

You might also like