Virtual Machine Create Snapshot Ex Task
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,
"quiesceSpec": {
"_typeName": "string",
"timeout": 0
}
}
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.
This data object type encapsulates configuration settings when creating a virtual machine quiesced snapshot.
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"
}
InvalidArgument: if quiesceSpec is invalid.
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 spec is set; or if the virtual machine is a Fault Tolerance primary or secondary; or if an unsupported quiesce spec is set.
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"
}
]
}