Managed Object - DistributedVirtualSwitch

Property of
DistributedVirtualSwitchInfo, DistributedVirtualSwitchManagerDvsProductSpec, DistributedVirtualSwitchManagerHostDvsMembershipFilter, DVPortgroupConfigInfo, DvsEventArgument
Parameter to
MergeDvs_Task, QueryCompatibleHostForExistingDvs, QueryDvsConfigTarget
Returned by
CreateDVS_Task, QueryDvsByUuid
Extended by
VmwareDistributedVirtualSwitch
Extends
ManagedEntity
See also
DistributedVirtualPort, DistributedVirtualPortgroup, DistributedVirtualSwitchPortCriteria, DistributedVirtualSwitchProductSpec, DVPortConfigSpec, DVPortgroupConfigSpec, DVSCapability, DVSConfigInfo, DVSConfigSpec, DVSNetworkResourcePool, DVSNetworkResourcePoolConfigSpec, DVSSummary, HostSystem
Since
vSphere API 4.0


Managed Object Description

The interface to the distributed virtual switch objects.

Properties

Name Type Description
capabilityDVSCapability

The capability of the switch. Queried against hosts, the property should always return configModificationSupported as false.
configDVSConfigInfo

The configuration of the switch.
networkResourcePool*DVSNetworkResourcePool[]

The network resource pool information for the switch.

Since vSphere API 4.1
portgroup*ManagedObjectReference[]
to a DistributedVirtualPortgroup[]

The portgroups that are defined on the switch.
summaryDVSSummary

The summary of the switch.
uuidxsd:string

The generated UUID of the switch. Unique across vCenter Server inventory and instances.
Properties inherited from ManagedEntity
alarmActionsEnabled, configIssue, configStatus, customValue, declaredAlarmState, disabledMethod, effectiveRole, name, overallStatus, parent, permission, recentTask, tag, triggeredAlarmState
Properties inherited from ExtensibleManagedObject
availableField, value
*May not be present

Methods

Methods defined in this Managed Object
AddDVPortgroup_Task, EnableNetworkResourceManagement, FetchDVPortKeys, FetchDVPorts, MergeDvs_Task, MoveDVPort_Task, PerformDvsProductSpecOperation_Task, QueryUsedVlanIdInDvs, ReconfigureDVPort_Task, ReconfigureDvs_Task, RectifyDvsHost_Task, RefreshDVPortState, UpdateDvsCapability, UpdateNetworkResourcePool
Methods inherited from ManagedEntity
Destroy_Task, Reload, Rename_Task
Methods inherited from ExtensibleManagedObject
setCustomValue

AddDVPortgroup_Task

Add a DistributedVirtualPortgroup to the switch.
Required Privileges
DVPortgroup.Create

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
specDVPortgroupConfigSpec[]

The specification for the portgroup.

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
DuplicateName
DvsFault
InvalidName
NotSupportedThrown if called directly on a host.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



EnableNetworkResourceManagement

Enable/Disable network I/O control on the vNetwork Distributed Switch.
Required Privileges
DVSwitch.ResourceManagement
Since
vSphere API 4.1

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
enablexsd:boolean

If true, enables I/O control. If false, disables network I/O control.

Return Value

Type Description
None

Faults

Type Description
DvsFault
DvsNotAuthorizedThrown if login-session's extension key does not match the switch's configured switch's configured extension key
NotSupportedThrown if network I/O control is not supported on the vNetwork distributed switch.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



FetchDVPortKeys

Return the keys of ports that meet the criteria. Queried against host, the property reports only the connected ports currently on the host.
Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
criteria*DistributedVirtualSwitchPortCriteria

The port selection criteria. If unset, the operation returns the keys of all the ports in the switch.
*Need not be set

Return Value

Type Description
xsd:string[]

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



FetchDVPorts

Return the ports that meet the criteria.
Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
criteria*DistributedVirtualSwitchPortCriteria

The port selection criteria. If unset, the operation returns the keys of all the ports in the portgroup.
*Need not be set

Return Value

Type Description
DistributedVirtualPort[]

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



MergeDvs_Task

Merge an existing DistributedVirtualSwitch (source) to this switch (destination). The host members and the connected entity of the source switch will be transferred to the destination switch. This operation disconnects the entities from the source switch, tears down its host proxy VirtualSwitches, creates new ones for the destination switch, and reconnects the entities to the destination switch.

In summary, this operation does the following:

Required Privileges
DVSwitch.Modify

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
dvs PManagedObjectReference
to a DistributedVirtualSwitch

The switch (source) to be merged
P Required privilege: DVSwitch.Delete

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
DvsFault
InvalidHostState
NotFound
NotSupportedThrown if called directly on a host.
ResourceInUseThrown if failed to delete the source switch
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



MoveDVPort_Task

Move the ports out of their current portgroup into the specified portgroup. If the moving of any of the ports results in a violation of the portgroup policy, or type of the source or destination portgroup, the operation raises a fault. A conflict port cannot be moved.
Required Privileges
DVSwitch.Modify

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
portKeyxsd:string[]

The keys of the ports to be moved into the portgroup.
destinationPortgroupKey*xsd:string

The key of the portgroup to be moved into. If unset, the port will be moved under the switch.
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
ConcurrentAccess
DvsFault
NotFound
NotSupportedThrown if called directly on a host.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



PerformDvsProductSpecOperation_Task

Push the proxy VirtualSwitch module of the specified product info to the host members of the switch at a fixed location known by the host.
Required Privileges
DVSwitch.Modify

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
operationxsd:string

The operation. See DistributedVirtualSwitchProductSpecOperationType for valid values. For VmwareDistributedVirtualSwitch, only upgrade is valid.
productSpec*DistributedVirtualSwitchProductSpec

The product info of the implementation.
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
DvsFault
InvalidState
NotSupportedThrown if called directly on a host.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress



QueryUsedVlanIdInDvs

Return the used VLAN ID (PVLAN excluded) in the switch.
Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.

Return Value

Type Description
xsd:int[]

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



ReconfigureDVPort_Task

Reconfigure individual ports.
Required Privileges
DVSwitch.PortConfig

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
portDVPortConfigSpec[]

The specification of the ports.

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
ConcurrentAccess
DvsFault
InvalidArgumentThrown if the array have different elements for the same port.
NotFound
NotSupportedThrown if called directly on a host or if the switch implementation doesn't support this API or if the spec includes settings for any vNetwork Distributed Switch feature that is not supported on this switch.
ResourceInUse
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



ReconfigureDvs_Task

Reconfigure the switch.

Reconfiguring the switch may require any of the following privileges, depending on what is being changed:

Required Privileges
Dynamic - See discussion above

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
specDVSConfigSpec

The configuration of the switch

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
AlreadyExists
ConcurrentAccess
DuplicateName
DvsFault
DvsNotAuthorizedThrown if login-session's extension key does not match the switch's configured extensionKey.
InvalidArgumentThrown if any of the hosts being added lack support for any of the overlay classes of the switch's overlay instances.
InvalidName
InvalidState
LimitExceeded
NotFound
NotSupportedThrown if called directly on a host or if the spec includes settings for any vNetwork Distributed Switch feature that is not supported on this switch.
ResourceInUse
ResourceNotAvailableThrown if there is no port available in the portgroup
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



RectifyDvsHost_Task

Update the switch configuration on the host to bring them in sync with the current configuration in vCenter Server.
Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
hosts*ManagedObjectReference[]
to a HostSystem[]

The hosts to be refreshed. If not set, all hosts are rectified.
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task

Faults

Type Description
DvsFault
NotFound
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



RefreshDVPortState

Refresh port states.
Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
portKeys*xsd:string[]

The keys of the ports to be refreshed. If not set, all port states are refreshed.
*Need not be set

Return Value

Type Description
None

Faults

Type Description
DvsFault
NotFound
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



UpdateDvsCapability

Set the capability of the switch.
Required Privileges
DVSwitch.Modify

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
capabilityDVSCapability

The capability of the switch.

Return Value

Type Description
None

Faults

Type Description
NotSupportedThrown if called directly on a host or if the switch implementation doesn't support this API.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



UpdateNetworkResourcePool

Update the network resource pool configuration.
Required Privileges
DVSwitch.ResourceManagement
Since
vSphere API 4.1

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the DistributedVirtualSwitch used to make the method call.
configSpecDVSNetworkResourcePoolConfigSpec[]

the network resource pool configuration specification.

Return Value

Type Description
None

Faults

Type Description
DvsFaultThrown if the configuration application failed.
DvsNotAuthorizedThrown if login-session's extension key does not match the switch's configured extension key.
InvalidNameThrown if the name of the resource pool is invalid.
NotFoundThrown if the resource pool does not exist on the dvs.
NotSupportedThrown if network I/O control is not supported on the vNetwork distributed switch.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition