VMware

VIZZ.INFO

VMware Virtualisation Information from the creators of VIZZ.INFO

3 Posts tagged with the vcb tag
2

PHASE 1

  • Setup NFS
  • Setup SSH RSA login
  • Setup mailx
  • Setup host,username,password in /etc/vmware/backuptools.conf

PHASE 2

Create vcbBack.sh (on masteresx)

#
VMIMBK=/vmimages/vmbk
mount slaveesx:$VMIMBK $VMIMBK
rm -rf $VMIMBK/$1
vcbMounter -a name:$1 -r $VMIMBK/$1
umount $VMIMBK

Create vcbRes.sh (on slaveesx)

#
VMIMBK=/vmimages/vmbk
CATALOG=$VMIMBK/$1/catalog
echo $CATALOG
sed 's/masteresx\.com/slaveesx\.com/' $CATALOG > $CATALOG.rest
vcbRestore -s $VMIMBK/$1 -a $CATALOG.rest -b overwrite

Create vcbCron.sh (on masteresx)

#

/root/vcbBack.sh $1
ssh slaveesx -c "/root/vcbRest.sh $1"

Create cronjob

#
0 * * * * /root/vcbCron.sh myvm1 | smtp=upstream /usr/local/bin/mailx -s "<subject>" <name@domain>


Sit back and enjoy being a SysAdmin

2 Comments Permalink
0

To get the most out of your guest VMs and backup and restore them using VMware Consolidated Backup in the most reliable way you should install VMware Tools.

As well as providing better mouse & video drivers it provides an API to the host providing IP, clock information and installs VM startup, VM shutdown, VM freeze & VM thaw scripts /usr/sbin/pre-freeze-script and /usr/bin/post-thaw-script.

http://vizz.info/2007/11/quiesce-your-live-vmware-vms-before-you-snapshot-them/

These scripts are required to quicese the guest services so a reliable quiescent redo / snapshot can be made by VCB.

http://www.vmware.com/pdf/vi3_vm_backup.pdf

0 Comments Permalink
1


VMware Consolidated Backup -- Disk export utility, Version 1.0.3 (52542)
(C) 2005,2006, VMware, Inc. All rights reserved.

Usage:

vcbExport -M (0 -F (0 -d <dest_file> -s <diskspec> <verbosity>

<dest_file> := <local_filename>
<diskspec> := <authdspec>|<blklstspec>|<local_filename>
<verbosity> := -L (0-6)
<blklstspec> := blklst://<path>@<host>:<port>?<username>/<password>
<authdspec> := authd://<path>@<host>:<port>?<username>/<password>

Export Disk Flags:
-M: If set, the disk is exported into a single (monolithic) file.
When turned off (default), the disk is split into multiple 2GB files.

-F: If set, the disk is exported as "flat" disk, with no optimizations.
When turned off (default), the exported disk files will be more compact as unused space in the disk image is not included in the exported file.

VMware Consolidated Backup -- Snapshot Utility, Version 1.0.3 (52542)
(C) 2005,2006, VMware, Inc. All rights reserved.

Usage:

vcbSnapshot -h <url> -u <username> -p <password> <verbosity> <command>

<url> := <hostname>
<command> := <create>|<find>|<list>|<delete>
<verbosity> := -L (0-6)
<create> := -c <VmId> <SnapshotName> <Description>
<find> := -f <VmId> <SnapshotName>
<list> := -l <VmId> <SsId>
<delete> := -d <VmId> <SsId>
<VmId> := "moref:"<Sdk-MoRef>
<SsId> := "ssid:"<Sdk-MoRef>


VMware Consolidated Backup -- Virtual Machine Mount Utility V1.0.3 (52542)
(C) 2005-2007, VMware, Inc. All rights reserved.

Usage:

vcbSnapAll -h <url> -u <username> -p <password> <operation> <verbosity>

<url> := <hostname>
<operation> := <mount_op>
<verbosity> := -L (0-6)
<mount_op> := -a <VM> <mountPoint> <export-flags><datastores>
<VM> := <any><powerstate><...>(See VM Backup Guide for complete list of search criteria.)
<mountPoint> := -r <local_dir>
<datastores> := -C <datastore_catalog_file>
<export-flags> := -M (0|1) -F (0|1)

Export Flags:
-M: If set, the disk is exported into a single (monolithic) file.
When turned off (default), the disk is split into multiple 2GB files.

-F: If set, the disk is exported as "flat" disk, with no optimizations.
When turned off (default), the exported disk files will be more compact as unused space in the disk image is not included in the exported file.

NOTE: options -h -u -p must be present in command string.

Example:
+) Do a full VM style backup of powered up VMs on ESX host "wisdom.bar.com" as user "vc" with password "foobar". Export will go to local dir ackups" as a single file:

vcbSnapAll -h wisdom.bar.com -u vc -p foobar -a powerstate:on -r \backups\foo-fullVM -M 1

Full VM backups export an entire virtual machine into a set of files within a directory. Backing up this file set allows for the entire virtual machine to be restored later on.


VMware Consolidated Backup -- Virtual Machine restore utility, V1.0.3 (52542)
(C) 2005,2006, VMware, Inc. All rights reserved.

Usage:

vcbResAll -h <url> -u <username> -p <password> -C <datastorecatalog>
-s <sourcedir> -a <catalog> -V(0 -M(0 -F(0
-m <mode> -b <behavior> -o <powerop> <verbosity>

<url> := <hostname>
<datastorecatalog> := <filename>
<sourcedir> := <dirname>
<catalog> := <filename>
<mode> := cos|nas
<behavior> := overwrite|prompt|keep|abort
<powerop> := on|allon|alloff
<verbosity> := -L (0-6)

Import Disk Flags:
-V: If set to 1, the disk is imported into a VMFS-style disk. This will only work if the target location for the disk is on a VMFS file system. This flag defaults to (1) in COS mode and to 0 otherwise.
This flag is mutually exclusive with -M

-M: If set (default), the disk is imported into a single (monolithic) file.
When unset, the disk is split into multiple 2GB files.

-F: If set (default), the disk is imported as "flat" disk, with no space optimizations, but better I/O performance.
vcbResAll adds the "-d" option to this to specify an optional delay between virtual machine restores.


1 Comments Permalink
Click to view osde.info's profile Member since: Jan 25, 2005

VMware Virtualisation Information from the creators of VIZZ.INFO

View osde.info's profile

Communities