Virtual Machine Remove All Snapshots Task
Remove all the snapshots associated with this virtual machine.
If the virtual machine does not have any snapshots, then this operation simply returns successfully.
Required privileges: VirtualMachine.State.RemoveSnapshot
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.3.0 APIs.
{
"consolidate": false,
"spec": {
"_typeName": "string",
"retentionDays": 0
}
}
(optional) If set to true, the virtual disks of the deleted snapshot will be merged with other disk if possible. Default to true.
This data type defines the filtering specification for removing snapshots from virtual machine.
Since: vSphere API Release 8.0.3.0
This method returns a Task object with which to monitor the operation.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
TaskInProgress: if the virtual machine is busy.
NotSupported: if the host product does not support snapshots.
InvalidPowerState: if the operation cannot be performed in the current power state of the virtual machine.
SnapshotFault: if an error occurs during the snapshot operation. Typically, a more specific fault like InvalidSnapshotFormat is thrown.
InvalidState: if the operation cannot be performed because of the virtual machine's current state. For example, if 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"
}
]
}