vmsnapshot.pl - Creates snapshots of virtual machines.
vmsnapshot.pl [options]
This command creates snapshots of virtual machines (memory dump is not included) based on the filter criteria. A snapshot captures the entire state of a virtual machine at the time the user take the snapshot.
Required. The name of the snapshot to be created.
Optional. Name of the virtual machine whose snapshot is to be created. If this option is not specified, then the CreateSnapshot operation will be performed on a set of virtual machines based on the other parameters.
Optional. Power state of the virtual machine. poweredOn or poweredOff.
Optional. IP address of the virtual machine.
Optional. Guest operating system running on the virtual machine.
Optional. Name of the host.
Optional. Name of the datacenter.
Optional. Folder name.
Optional. Name of the resource pool.
Create snapshots for all the virtual machines which are in resource pool 'PoolA' and whose power status is 'ON'. Let the name of the snapshot be 'Snap14May':
vmsnapshot.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --sname Snap14May --pool PoolA --powerstatus poweredOn
Create snapshots for all the virtual machines which are in datacenter 'CenterABC', resource pool 'PoolA' and whose power status is 'ON'. Let the name of the snapshot be 'Snap14May':
vmsnapshot.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --sname Snap14May --datacenter CenterABC --pool PoolA --powerstatus poweredOn
Create snapshots for all the virtual machines which are in folder 'Team2' and whose guest OS is linux. Let the name of the snapshot be 'Snap14May':
vmsnapshot.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --sname Snap14May --folder Team2 --geustOS linux
Create snapshots for all the virtual machines whoose name is 'VM2'. Let the name of the snapshot be 'Snap14May':
vmsnapshot.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --sname Snap14May --vmname VM2
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.