Print View

Creating a file or fullVM VCB backup on a disk by disk basis

Issue

Typically a fullVM based backup of C: is required for most virtual machines for bare metal recovery. Large data disks may be backed up using other methods such as specific agents (e.g. Exchange, SQL) and can be marked as independent, so as not to be included in the snapshot for the fullVM based backup.

The issue occurs with file servers that may have data disks of hundreds of gigabytes or terabytes that are ideal candidates for a VCB file based backup, but cannot run a fullVM based backup due to the size of the data disk, and due to the data disk not being able to be marked as independent, otherwise the file based backup is not possible.

Resolution

The vmdkMounter.vbs script can be used instead of the VCB generic scripts to selectively mount multiple vmdk's in either file or fullVM mode in one command.

An unmount is only required when using a file based backup, as a fullVM backup is basically and export, not a mount.

There are a couple options that can be uncommented in the script, otherwise all options are from the command line:

vmMounter.verbose = True

This will increase the verbosity of the messages in the Application Event Log, including the commands used to run the VCB utilities. Note: This option will expose passwords in the log.

vmMounter.compressVMDK = True

This will create a single VMDK, rather than the default descriptor file and a -flat.vmdk. This compressed file needs to be imported on ESX using vmkfstools -i <source>.vmdk <destination>.vmdk

The vmdkMounter script is available here:
http://theether.net/download/VMware/vmdkMounter.vbs

Useage: cscript //nologo vmdkMounter.vbs -h <hostname> -u <username> -p <password> -s <VmId> -r <mountpoint> -U <unmount mountpoint> <drive mount spec>

Note:
	-s <VmId> valid naming conventions:
		ipaddr:vm.domain.com
		moref:vm-99

	If moref is used virtual machine does not require registration/VMware Tools

	<drive mount spec>	comma seperated list of diskes and backup types
		<disk:type,disk:type,...>
			type is fullvm or file
			disk is virtual device node
		e.g. scsi0.0:fullvm,scsi0.1:file

	Requires VCB installed and configured

	Unmount (-U) only required if file type backup is done on any disk

	C: will always be mounted if file type backup is done on any disk, to determine drive letters

	Events written to the application event log

e.g. Mount C: as fullVM, mount D: as file
	cscript //nologo vmdkMounter.vbs -h virtualcenter -u username -p password -r D:\mnt\server -s ipaddr:server.domain.com scsi0.0:fullvm,scsi0.1:file

e.g. Unmount above backup
	cscript //nologo vmdkMounter.vbs -h virtualcenter -u username -p password -U D:\mnt\server -s ipaddr:server.domain.com

References

Products

VMware VirtualCenter 2.5
VMware ESX 3.5
VMware Consolidated Backup 1.5

Created: 18th August 2009
Updated: 18th August 2009

Print View

© 2005-2025 Jamie Morrison