次の方法で共有


ApplyVirtualSystemSnapshotEx method of the Msvm_VirtualSystemManagementService class

Applies the disk state, run-time state, and configuration values for a snapshot to the virtual computer system. This information serves as the starting point for the virtual computer system when it is next activated. Any disk state, run-time state, or configuration values currently associated with the virtual computer system will be lost.

Syntax

uint32 ApplyVirtualSystemSnapshotEx(
  [in]  CIM_ComputerSystem           REF ComputerSystem,
  [in]  CIM_VirtualSystemSettingData REF SnapshotSettingData,
  [out] CIM_ConcreteJob              REF Job
);

Parameters

ComputerSystem [in]

Type: CIM_ComputerSystem

A reference to the CIM_ComputerSystem instance to which the snapshot should be applied.

SnapshotSettingData [in]

Type: CIM_VirtualSystemSettingData

A reference to the CIM_VirtualSystemSettingData instance that represents the snapshot to be applied.

Job [out]

Type: CIM_ConcreteJob

An optional reference that is returned if the operation is executed asynchronously. If present, the returned reference to an instance of CIM_ConcreteJob can be used to monitor progress and obtain the result of the method.

Return value

Type: uint32

If this method is executed synchronously, it returns 0 if it succeeds. If this method is executed asynchronously, it returns 4096 and the Job output parameter can be used to track the progress of the asynchronous operation. Any other return value indicates an error. The return value can be one of the following values.

Completed with No Error (0)

Method Parameters Checked - Job Started (4096)

Failed (32768)

Access Denied (32769)

Not Supported (32770)

Status is unknown (32771)

Timeout (32772)

Invalid parameter (32773)

System is in use (32774)

Invalid state for this operation (32775)

Incorrect data type (32776)

System is not available (32777)

Out of memory (32778)

Remarks

Access to the Msvm_VirtualSystemManagementService class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 R2
End of client support
None supported
End of server support
Windows Server 2012
Namespace
Root\Virtualization
MOF
WindowsVirtualization.mof

See also

Msvm_VirtualSystemManagementService

ApplySnapshot (V2)