Table of Contents
1. Introduction .............................................................................................. 3
2. Understanding VCB .................................................................................. 3
2.1 Limitations of VCB .................................................................................................................................... 4
2.2 VCB Operations ........................................................................................................................................ 4
2.2.1 Freeze VM (Pre-backup) .............................................................................................................................. 4
2.2.2 Invoke Backup Software ............................................................................................................................... 4
2.2.3 Cleanup ........................................................................................................................................................ 4
2.3 Comparison of backup methods ............................................................................................................... 5
2.4 Custom VM Quiesce Scripts..................................................................................................................... 6
2.5 VCB Commands ....................................................................................................................................... 7
2.5.1 vcbMounter Command Syntax ..................................................................................................................... 8
2.6 VCB Modes ............................................................................................................................................ 10
2.7 Disk Export Flags ................................................................................................................................... 11
Note: This is not an official VMware whitepaper or document. Please use at your own discretion.
Please refer to the documentation referenced at the end of this guide for further information.
2. Understanding VCB
The following are some point about the VCB Framework:
Most major backup applications integrate with VCB providing you with a fast and efficient way of backing
up data in virtual machines.
VCB eliminates the need for having a backup agent installed in each virtual machine you want to protect.
VCB supports file-level full and incremental backups for Windows VMs and image-level backups for VMs
running any OS.
You can use VCB against a single ESX or ESXi server or with a VirtualCenter Server.
VCB is NOT a stand-alone backup application, however you could create stand alone scripts and
schedule them to run VCB based backups to local staging disk on a VCB Proxy
VCB is a framework that can enable “LAN-Free” backups of virtual machines.
VCB provides the backup software with a way to access data stored in virtual machine disk images stored
on VMFS
VCB can use iSCSI or SAN based LUNs as long as the VCB proxy has access to them.
VCB can connect to the ESX hosts via the LAN for local or NAS based VMs
VCB can be installed on a VM for iSCSI SAN, NBD or Hot-Add modes
(VM snapshot is not committed nor deleted) Commit post-VM snapshot disk activity and
delete VM snapshot
2.2.3 Cleanup
Dismount mounted VM virtual disk(s) (optional) Delete FullVM backup files
Advantages: Advantages:
No disk space is required for staging The entire VM is backed up
File level recovery is simple The backup includes Windows system state
files
Simple disaster recovery
Ease of management
Disadvantages: Disadvantages:
The backup does not include Windows Sufficient disk space is required for holding
system state files tank
Requires a base VM for recovery in case of File level recovery involves restoring the VM
catastrophic failure files to a staging area and mounting the
VMDK file to extract data.
Not compatible with non-Windows systems
No ability to leverage differential incremental
backups.
/usr/sbin/pre-freeze-script /usr/sbin/pre-freeze-script
/usr/sbin/post-thaw-script /usr/sbin/post-thaw-script
All custom scripts placed in the backupScripts.d directory will be analyzed during both the pre-freeze AND post-
thaw events. This means that logic needs to be placed in the script so that the desired result is gained. If no “IF’
statements are contained in the scripts, they will be executed during both the pre-freeze and post-thaw events,
which could be undesirable.
:postThaw
IF “%1%” == “thaw goto doThaw
goto fail
:doFreeze
net stop mysql
goto EOF
:doThaw
net start mysql
goto EOF
:fail
echo “$ERRORLEVEL% >> vcbError.txt
:EOF
• Search for VMs visible to VCB proxy and obtain basic VM identification information
• Use to display path information to the VMFS data stores on the VCB Proxy
The vcbMounter utility is invoked by the backup software integration kit. The integration kit is a zipped set of
scripts used to act as a bridge between the backup software and the VCB Framework. The vcbMounter utiltiy will
create a VM snapshot and export the VM to the VCB proxy. This utility will be reviewed in detail later.
The mountvm utility is useful for mounting VMDK files. This utility can be invoked for file level restores of FullVM
backups.
The vcbSanDbg utility will show you identification information about all of the mass storage attached to the VCB
Proxy. It will indicate weather the disk contains a VMFS partition and will also report its UUID.
The vcbSupport utility will capture the output of the vcbSanDbg utility along with the logs and system info of the
VCB proxy. This should be gathered and uploaded to the support web site if an issue arises and support is
needed.
The vcbVmName utiltiy is useful for troubleshooting “VM not found” types of errors. It will report identification
information about VMs, such as UUID and MOREF.
The vcbSnapshot and vcbExport utilities will give more granular control of the process if required.
The vcbCleanup utility is a script that will unmount VMs and delete snapshots. It is useful for cleaning up after
failed backup jobs.
cos - Use this option to back up virtual machines whose disks are accessible to the ESX Server host
directly through /vmfs/volumes. Run the vcbMounter utility in the service console of the ESX Server host
where the virtual machines reside or on any ESX Server host which has access to the datastore where
the virtual machine disks are stored.
NOTE: The compact disk format will copy only “non-zeroed” disk space. In normal file system operations, a
“deleted” file is not really deleted. Only the pointers to the file are actually removed. In order to fully remove the
files, a utility that performs secure deletes, like “sdelete” will need to be run to “zero” the free space.
Duncan Epping posted an article about how to script this in his blog:
http://www.yellow-bricks.com/2008/01/04/vmware-consolidated-backup-and-deleted-files/
He also posted an article on how to run the script using the vmrun utility in his blog:
http://www.yellow-bricks.com/2008/12/12/zero-out-all-vms-from-just-one-script/
Click Install.
Restart the server. Open up the disk management console and verify that you see the LUNs as unknown
devices.
The second is by using the “Security Support Provider Interface” (SSPI). The advantage of SSPI is that it does not
require to be specified in a plain text file or in the registry. In order to use SSPI, the following conditions must be
met:
The HOST specification must point to a vCenter Server and not an ESX Server.
The backup software services that call the VCB Framework must use user credentials that reside on both
the VCB and the vCenter Servers (with identical passwords) or it must be a domain account.
The user account must have administrator privileges on the VCB Proxy and at least VMware
Consolidated Backup user privileges in vCenter.
For file level backups, the files to be backed up will be under the mount point. In this example, the files will be
mounted as “E:\mnt\vm-fqdn.com\letters\C” and “E:\mnt\vm-fqdn.com\letters\E”.
For FullVM backups, the mount point is specified with the VM FQDN and a “-FullVM” suffix. In this example, it will
be E:\mnt\vm-fqdn.com-FullVM
8. Click Browse.
The diagram on the left illustrates how the BL465 should be connected to the SAN. When using blade servers, it
is important to remember that the number of HBAs is usually limited to two. Care should be taken in the way that
tape drives, staging LUNs and datastores are presented. On standard servers, multiple fibre channel adapters
should be used to create single paths to each target. An example of this is illustrated in the diagram on the right.
Since this is a backup system, plan for performance rather than redundancy, especially in a blade environment.
Using the “-L 6” option will produce more robust logs. This can also be set in config.js as LOGLEVEL=“6”;
vcbmounter -h vc01.fqdn.com -u VCBUser -p pass -a ipaddr:vm.fqdn.com -r E:\mnt\ -t fullvm -m san –L 6
vcbmounter -h vc01.fqdn.com -u VCBUser -p pass -a ipaddr:vm.fqdn.com -r E:\mnt\ -t file -m san –L 6
Use vcbSanDbg for a quick view of the SAN from a VCB perspective. Look for:
“warning Could not scan for partitions on device. No VMFS names will be associated with this device.”
“info Lun does not contain any VMFS/LVM signatures.”
Use vcbSupport to generate a set of log files for submission to VMware Support or for your own analysis.
1. Create a Windows 2003 VM and install the VCB Framework as outlined in Section 3.
10.1.2 VCB FullVM Type Backup with Client Based Data Backup
For this, the C: drive is backed up with VCB at an image level. File level backups of the data drive are completed
using a backup client.
PROS:
o Easy backup and recovery
o No array-based tools required
CONS:
o Backup client required
o Requires network bandwidth for client-based backups
o Relatively longer backup times
10.2.1 Mixed VCB FullVM Type and File Type Backup Methods
The vcbVmName, vcbSnapshot and vcbExport utilities are used to perform a FullVM type backup of the C: drive.
The vcbExport utility is used to back up the files on the data drive. The backup software is set up to backup files in
the <Mount Point>\letters\d directory, or to the drive letter that points to the data drive.
PROS
o No backup client required in the VM
o LAN-Free backup (For SAN and Hot-Add mode)
o No array-based tools required
CONS
o Complex backup scripts required
o The VMX and Catalog files are not created
o Manual recovery process
It is important to note that this process will not export the VMX file or a catalog file. These files are required by
VMware Converter to import the VM back into vCenter or an ESX server. In order to recover using the VM from a
backup using this method is to copy the VMDK manually into the datastore using scp. A new VM will need to be
created and pointed to the VMDK file. An alternative would be to use scp and manually copy the VMX and VMXF
files to the VCB proxy.
The steps outlined above could be placed into a script that is called by the backup software. A script written in
VBS was posted by Justin Turver on his VMware blog:
http://communities.vmware.com/blogs/jturver/2008/01/24/vcb-how-to-backup-a-selected-specific-disk-or-disks-
using-vcbexport-and-a-useful-script-to-do-it
The original script will exit on any error, so SSL certificate verification must be set up in ESX 3.5. See the VM
Backup Guide page 42 for information about setting this up. There is a modified script posted that suppresses
some of these errors.
The mount point in this script will become the mount point specified in the config.js file, appended by the VM
name and “-FullVM”. For example, if the mount point specified in the config.js file is “E:\mnt” and the VM name is
“vm.fqdn.com” the location for the VM files will be “E:\mnt\vm.fqdn.com-FullVM” In this example, the “%1” variable
would represent the FQDN of the VM to be backed up. The contents could be placed in a simple .cmd file and the
pre-command would look like this:
Pre-FullVM.cmd vm.fqdn.com