Condividi tramite


ImportVirtualSystem method of the CIM_VirtualSystemManagementService class

Beginning with Windows Server 2008 R2 this method is deprecated.

Syntax

uint32 ImportVirtualSystem(
  [in]  string              ImportDirectory,
  [in]  boolean             GenerateNewID,
  [out] CIM_ConcreteJob REF Job
);

Parameters

ImportDirectory [in]

The fully qualified path to the directory that represents a previously exported virtual computer system. This file must have been generated by a previous call to the ExportVirtualSystem or ExportVirtualSystemEx methods.

GenerateNewID [in]

Indicates whether to reuse the unique identifier for the virtual computer system. If this parameter is TRUE, it is guaranteed that the identifier will not conflict with the identifier of an existing virtual computer system.

It can be useful to specify FALSE to track a specific virtual computer system across an export/import cycle, as the identifier for the virtual computer system will be the same as it was before the export. However, clients must ensure that the unique identifier is not already in use by an existing virtual computer system.

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.

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)

Requirements

Namespace
Root\virtualization
MOF
WindowsVirtualization.mof

See also

CIM_VirtualSystemManagementService