NAME

vmsnapshot.pl - Creates snapshots of virtual machines.


SYNOPSIS

 vmsnapshot.pl [options]


DESCRIPTION

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.


OPTIONS

sname

Required. The name of the snapshot to be created.

VIRTUAL MACHINE OPTIONS

vmname

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.

powerstatus

Optional. Power state of the virtual machine. poweredOn or poweredOff.

ipaddress

Optional. IP address of the virtual machine.

guest_os

Optional. Guest operating system running on the virtual machine.

INVENTORY OPTIONS

host

Optional. Name of the host.

datacenter

Optional. Name of the datacenter.

folder

Optional. Folder name.

pool

Optional. Name of the resource pool.


EXAMPLES

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


KNOWN ISSUE

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.