snapshotmanager.pl - Allows you to list, revert, go to, rename, or remove one or more snapshots.
snapshotmanager.pl --operation <List|Create|Revert|Goto|Rename|Remove|RemoveAll> [options]
This command provides an interface for seven basic operations for Snapshot:
List all snapshots for one or more virtual machines.
Create a snapshot (memory dump is not included) for one or more virtual machines.
Revert to the current snapshot for a single virtual machine.
Revert to the specified snapshot for a single virtual machine.
Rename a named snapshot for a single virtual machine.
Remove all snapshots for a single virtual machine.
Remove a named snapshot for one or more virtual machines.
Operation to be performed. Must be one of the following:
list – List all snapshots for one or more virtual machines.
create – Create a snapshot for one or more virtual machines.
revert – Revert to the current snapshot for a single virtual machine.
goTo – Revert to the specified snapshot for a single virtual machine.
rename – Rename a named snapshot [and children] for a single virtual machine.
removeAll – Remove all snapshots for a single virtual machine.
remove – Remove a named snapshot for one or more virtual machines.
Optional. The name of the source virtual machine.
Optional. Name of the datacenter for selection of virtual machines.
Optional. Name of the resource pool for selection of virtual machines.
Optional. Name of the host for selection of virtual machines.
Optional. Name of the folder for selection of virtual machines.
Optional. IP address of virtual machine.
Optional. Power Status for selection of virtual machines.
Optional. Guest OS for selection of virtual machines.
Optional. The name of the source virtual machine.
Optional. Name of the target datacenter for selection of virtual machines.
Optional. Name of the target resource pool for selection of virtual machines.
Optional. Name of the target host for selection of virtual machines.
Optional. Name of the target folder for selection of virtual machines.
Optional. IP address of target virtual machine.
Optional. Power Status for selection of virtual machines.
Optional. Guest OS for selection of virtual machines.
Required. Name of the new snapshot for the Create operation.
Required. The name of the source virtual machine.
Required. The name of the source virtual machine.
Required. Name of snapshot to revert to.
Required. The name of the source virtual machine.
Required. Name of snapshot to be renamed.
Required. New name for the snapshot.
Required. The name of the source virtual machine.
Optional. The name of the source virtual machine.
Optional. Name of the target datacenter for selection of virtual machines.
Optional. Name of the target resource pool for selection of virtual machines.
Optional. Name of the target host for selection of virtual machines.
Optional. Name of the target folder for selection of virtual machines.
Optional. IP address of target virtual machine.
Optional. Power Status for selection of virtual machines.
Optional. Guest OS for selection of virtual machines.
Required. Name of snapshot to be removed for operation Remove
Required. Binary value (0 or 1) that determines whether child snapshots are also removed (1) or not removed (0) for operation I <Remove>
List all the snapshots for Virtual Machine with name ``ABC'':
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation list --vmname ABC
Create snapshot SN1 for the Virtual Machine ``ABC'':
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation create --vmname ABC --snapshotname SN1
Revert Virtual Machine ``ABC'' to Current Snapshot:
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation revert --vmname ABC
Revert Virtual Machine ``ABC'' to the snapshot ``SN1'' :
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation goto --vmname ABC --snapshotname SN1
Rename snapshot ``SN1'' of Virtual Machine ``ABC'' to ``SN2'':
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation rename --snapshotname SN1 --newname SN2 --vmname ABC
Remove all the snapshot for the Virtual Machine ``ABC'':
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation removeAll --vmname ABC
Remove the snapshot ``SN1'' of Virtual Machine ``ABC'' along with all the childrens:
snapshotmanager.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation remove --vmname ABC --snapshotname SN1 --children 1
If you suspend a virtual machine and then take two successive snapshots, the second snapshot operation fails with the error ``Failure due to a malformed request to the server''. This error is expected and does not indicate a problem, because suspended virtual machines do not change, the second snapshot would overwrite the existing snapshot with identical data.