Share via


ImportSystemDefinition method of the Msvm_VirtualSystemManagementService class

Creates a new planned virtual system based on a virtual system definition.

When this method is run, the files of the virtual system definition must not be in use by the host system or the virtualization platform. The snapshot folder is searched the snapshots referenced by the virtual system definition. Any referenced snapshots not found in this location must be deleted using the RemoveVirtualSystemSnapshot method, or imported using the ImportSnapshotDefinitions method before running ImportSystemDefinition.

Syntax

uint32 ImportSystemDefinition(
  [in]  string                         SystemDefinitionFile,
  [in]  string                         SnapshotFolder,
  [in]  boolean                        GenerateNewSystemIdentifier,
  [out] Msvm_PlannedComputerSystem REF ImportedSystem,
  [out] CIM_ConcreteJob            REF Job
);

Parameters

SystemDefinitionFile [in]

The fully-qualified path to the XML or EXP file that represents the virtual system definition to import.

SnapshotFolder [in]

The fully-qualified path to the folder where the snapshot configurations for this virtual machine are located.

GenerateNewSystemIdentifier [in]

true if to create a new unique identifier for the virtual system; otherwise, false.

ImportedSystem [out]

If the operation completes synchronously, a reference to the imported virtual system.

Job [out]

If the operation is being performed asynchronously, a reference to the job object which can be used to track the progress.

Return value

The possible return values are:

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)

File in Use (32779)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\HyperVCluster\v2
MOF
WindowsHyperVCluster.V2.mof
DLL
VMMS.exe

See also

Msvm_VirtualSystemManagementService