ExportSnapshot method of the Msvm_CollectionSnapshotService class

Exports a snapshot collection of virtual computer systems to a file. The snapshot collection, its associated configuration settings, and its associated resource settings will be preserved in the resulting file.

Syntax

uint32 ExportSnapshot(
  [in]  CIM_Collection  REF SnapshotCollection,
  [in]  string              ExportDirectory,
  [in]  string              ExportSettingData,
  [out] CIM_ConcreteJob REF Job
);

Parameters

SnapshotCollection [in]

A reference to a CIM_Collection that represents the snapshot collection to be exported.

ExportDirectory [in]

The fully-qualified path of the directory to which the virtual system collection is to be exported. If the CreateVmExportSubdirectory property in the ExportSettingData parameter is set to True then this directory can be reused for exporting multiple virtual system collections and this method places each virtual system collection definition in a separate subdirectory under this path.

ExportSettingData [in]

An instance of Msvm_CollectionSnapshotExportSettingData that represents the settings for the export operation.

Job [out]

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 to obtain the result of the method.

Return value

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.

Requirements

Requirement Value
Minimum supported client
Windows 10 [desktop apps only]
Minimum supported server
Windows Server 2016
Namespace
Root\virtualization\v2
MOF
WindowsVirtualization.V2.mof
DLL
Vmms.exe

See also

Msvm_CollectionSnapshotService