Managed Object - VirtualMachineSnapshot

Property of
VirtualMachineFileLayoutSnapshotLayout, VirtualMachineSnapshotInfo, VirtualMachineSnapshotTree
Returned by
CreateSnapshot_Task
See also
HostSystem, VirtualMachineConfigInfo

Managed Object Description

The Snapshot managed object type specifies the interface to individual snapshots of a virtual machine. Although these are managed objects, they are subordinate to their virtual machine.

Properties

Name Type Description
configVirtualMachineConfigInfo Information about the configuration of this virtual machine when this snapshot was taken.

The datastore paths for the virtual machine disks point to the head of the disk chain that represents the disk at this given snapshot. The fileInfo.fileLayout field is not set.


Methods

Methods defined in this Managed Object
RemoveSnapshot_Task, RenameSnapshot, RevertToSnapshot_Task

RemoveSnapshot_Task

Removes this snapshot and deletes any associated storage.
Required Privileges
VirtualMachine.State.RemoveSnapshot

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineSnapshot used to make the method call.
removeChildrenxsd:boolean Flag to specify removal of the entire snapshot subtree.

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy.

Show WSDL type definition



RenameSnapshot

Rename this snapshot with either a new name or a new description or both. At least one of these must be specified when calling the rename method.

Required Privileges
VirtualMachine.State.RenameSnapshot

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineSnapshot used to make the method call.
name*xsd:string New name for the snapshot.
description*xsd:string New description for the snapshot.
*Need not be set

Return Value

Type Description
None

Faults

Type Description
InvalidNameThrown if the specified snapshot name is not valid.
NotSupportedThrown if the host product does not support snapshot rename.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RevertToSnapshot_Task

Change the execution state of the virtual machine to the state of this snapshot.
Required Privileges
VirtualMachine.State.RevertToSnapshot

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the VirtualMachineSnapshot used to make the method call.
host*ManagedObjectReference
to a HostSystem
(optional) Choice of host for the virtual machine, in case this operation causes the virtual machine to power on.

If a snapshot was taken while a virtual machine was powered on, and this operation is invoked after the virtual machine was powered off, the operation causes the virtual machine to power on to reach the snapshot state. This parameter can be used to specify a choice of host where the virtual machine should power on.

If this parameter is not set and the vBalance feature is configured for automatic load balancing, a host is automatically selected. Otherwise, the virtual machine keeps its existing host affiliation.

*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
FileFaultThrown if there is a problem accessing the virtual machine on the filesystem.
InsufficientResourcesFaultThrown if this operation would violate a resource usage policy.
InvalidPowerStateThrown if the operation cannot be performed in the current power state of the virtual machine.
InvalidStateThrown if the operation cannot be performed in the current state of the virtual machine. For example, the virtual machine's configuration is not available.
NotSupportedThrown if the host product does not support snapshots.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy.
VmConfigFaultThrown if a configuration issue prevents the power-on. Typically, a more specific fault, such as UnsupportedVmxLocation, is thrown.

Show WSDL type definition