You can use the CVVMwareSnapshotUtil utility to remove snapshots for one or more VMware VMs.
The CVVMwareSnapshotUtil utility is available only on Windows VSA proxy machines that can communicate with the vCenter and the ESX host. For SP17 and later service packs, you can find the utility in the C:\Program Files\Commvault\ContentStore\Base folder.
The utility removes snapshots from a single VM or all VMs based on the following criteria:
-
The name of the snapshot
-
The moref of the snapshot
-
The age of the snapshot
Syntax
Usage
CVVMwareSnapshotUtil -host <esx/vcenter> -user <username> -password <password> -vm <virtual machine name>
Specify user credentials that have the required permissions to perform backup operations and restore operations.
Options
Option |
Description |
---|---|
-allVMs |
Scan all VMs for snapshots. |
-snapMoref |
Specifies the snapshot moref. |
-snapName |
Specifies the snapshot name. |
-remove |
Remove the specified snapshot. |
-removeAll |
Remove all snapshots from the specified VM. |
-removeOld |
Remove snapshots older than the specified number of hours. |
-oldHours |
Specifies the number of hours to classify a snapshot for the removeOld option. The default value is 24. |
Procedure
- From the command line, run the CVVMwareSnapshotUtil utility using administrator privileges.
Examples
-
The following command scans all of the VMs on the host or vCenter and finds all snapshots:
CVVMwareSnapshotUtil -host esx/vCenter -user root -password cvlt -allVMs
-
The following command removes the snapshot with the moref "snapshot-281" for the VM "VMname":
CVVMwareSnapshotUtil -host vc -user admin@vsphere.local -password cvlt -vm <VMname> -remove -snapMoref snapshot-281
-
The following command removes all snapshots with names that begin with the string "__GX_BACKUP__" from the entire vCenter:
CVVMwareSnapshotUtil -host vc -user admin@vsphere.local -password cvlt -allVMs -snapName __GX_BACKUP__ -remove
-
The following command removes all snapshots from all VMs with names that begin with the string "__GX_BACKUP__" and that are more than 24 hours old (the default time) from the vCenter:
CVVMwareSnapshotUtil -host vc -user admin@vsphere.local -password cvlt -allVMs -snapName __GX_BACKUP__ -removeOld