DefineSystem method of the Msvm_VirtualEthernetSwitchManagementService class

Creates a new virtual switch. Properties that are not specified will be populated with default values.

Syntax

uint32 DefineSystem(
  [in]  string                           SystemSettings,
  [in]  string                           ResourceSettings[],
  [in]  CIM_VirtualSystemSettingData REF ReferenceConfiguration,
  [out] CIM_ComputerSystem           REF ResultingSystem,
  [out] CIM_ConcreteJob              REF Job
);

Parameters

SystemSettings [in]

An embedded instance of the Msvm_VirtualEthernetSwitchSettingData class that is used to define the attributes of the virtual switch to be created. This parameter is required.

ResourceSettings [in]

An array of embedded instances of the Msvm_EthernetPortAllocationSettingData class that describes the settings of the switch ports to be created in the scope of the new virtual switch. If Null is specified, the virtual switch will be created with no resources (i.e. no switch ports).

ReferenceConfiguration [in]

This parameter is not used.

ResultingSystem [out]

If a virtual switch is successfully created, a reference to an instance of the Msvm_VirtualEthernetSwitch class that represents the newly defined virtual switch.

Job [out]

If the operation is performed asynchronously, this method will return 4096, and this parameter will contain a reference to an object derived from CIM_ConcreteJob.

Return value

This method returns one of the following values.

Completed with No Error (0)

Not Supported (1)

Failed (2)

Timeout (3)

Invalid Parameter (4)

DMTF Reserved (..)

Method Parameters Checked - Job Started (4096)

Method Reserved (4097..32767)

Vendor Specific (32768..65535)

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Namespace
Root\Virtualization\V2
MOF
WindowsVirtualization.V2.mof
DLL
Vmms.exe

See also

Msvm_VirtualEthernetSwitchManagementService