Virtual Machine Create Snapshot Task
Deprecated as of vSphere 8.0GA, this method is deprecated. Please use CreateSnapshotEx_Task instead.
Creates a new snapshot of this virtual machine.
As a side effect, this updates the current snapshot.
Snapshots are not supported for Fault Tolerance primary and secondary virtual machines.
Any % (percent) character used in this name parameter must be escaped, unless it is used to start an escape sequence. Clients may also escape any other characters in this name parameter.
Required privileges: VirtualMachine.State.CreateSnapshot
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"name": "string",
"description": "string",
"memory": false,
"quiesce": false
}
The name for this snapshot. The name need not be unique for this virtual machine.
A description for this snapshot. If omitted, a default description may be provided.
If TRUE, a dump of the internal state of the virtual machine (basically a memory dump) is included in the snapshot. Memory snapshots consume time and resources, and thus take longer to create. When set to FALSE, the power state of the snapshot is set to powered off.
capabilities indicates whether or not this virtual machine supports this operation. For a virtual machine in suspended state we always include memory unless VirtualMachineCapability.diskOnlySnapshotOnSuspendedVMSupported is true.
If TRUE and the virtual machine is powered on when the snapshot is taken, VMware Tools is used to quiesce the file system in the virtual machine. This assures that a disk snapshot represents a consistent state of the guest file systems. If the virtual machine is powered off or VMware Tools are not available, the quiesce flag is ignored.
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the newly created VirtualMachineSnapshot upon success.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
TaskInProgress: if the virtual machine is busy.
NotSupported: if the host product does not support snapshots or if the host does not support quiesced snapshots and the quiesce parameter is set to true; or if the virtual machine is a Fault Tolerance primary or secondary
SnapshotFault: if an error occurs during the snapshot operation. Typically a more specific fault like MultipleSnapshotsNotSupported is thrown.
FileFault: if there is a problem with creating or accessing one or more files needed for this operation.
VmConfigFault: if the virtual machine's configuration is invalid. Typically, a more specific fault like InvalidSnapshotState is thrown.
InvalidName: if the specified snapshot name is invalid.
InvalidPowerState: if the operation cannot be performed in the current power state of the virtual machine.
InvalidState: if the operation cannot be performed because of the virtual machine's current state. For example, the virtual machine configuration information is not available.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}