| Local Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |
A proxy switch performs network I/O to support the following network traffic and operations:
A DistributedVirtualSwitch is the base distributed switch implementation. It supports a VMware distributed virtual switch implementation and it supports third party distributed switch implementations. The base implementation provides the following capabilities (DVSFeatureCapability):
A VmwareDistributedVirtualSwitch supports the following additional capabilities (DVSFeatureCapability and VMwareDVSFeatureCapability):
Distributed Virtual Switch Configuration
To use a distributed virtual switch, you create a switch and portgroups on a vCenter Server, and add hosts as members of the switch.
Port creation on a distributed switch is determined by the portgroup type (DVPortgroupConfigSpec.type):
true
.
You can also specify standalone ports that are not associated with a port group and uplink ports that are created on ESXi hosts (DVSConfigSpec.numStandalonePorts).
The DVPortgroupConfigInfo.numPorts property is the total number of ports for a distributed virtual switch. This total includes the ports generated by the static and dynamic portgroups and the standalone ports.
When you add a host to a distributed virtual switch (DistributedVirtualSwitch.Config.host), the host automatically creates a proxy switch. The proxy switch is removed automatically when the host is removed from the distributed virtual switch.
Host connection | Specify port or portgroup connections in the host virtual NIC spec (HostVirtualNicSpec.distributedVirtualPort or HostVirtualNicSpec.portgroup). |
Virtual machine connection | Specify port or portgroup connections in the distributed virtual port backing (VirtualEthernetCardDistributedVirtualPortBackingInfo) for the virtual Ethernet cards on the virtual machine (VirtualEthernetCard.backing). |
Backup, Rollback, and Query Operations
If you are using a VmwareDistributedVirtualSwitch, you can perform backup and rollback operations on the switch and its associated distributed virtual portgroups.
When you reconfigure a VMware distributed virtual switch (ReconfigureDvs_Task), the Server saves the current switch configuration before applying the configuration updates. The saved switch configuration includes portgroup configuration data. The Server uses the saved switch configuration as a checkpoint for rollback operations. You can rollback the switch or portgroup configuration to the saved configuration, or you can rollback to a backup configuration (EntityBackupConfig).SelectionSet
parameter.
To backup the complete configuration you must select the
distributed virtual switch and all of its portgroups.
To perform query operations on a distributed virtual switch, use the DistributedVirtualSwitchManager methods.
Properties
Name | Type | Description |
---|---|---|
capability | DVSCapability |
Capability of the switch. Capabilities are indicated at the port,
portgroup and switch levels, and for version-specific features.
When you retrieve this property from an ESXi host,
Capability.dvsOperationSupported
should always be set to false.
|
config | DVSConfigInfo |
Switch configuration data.
|
networkResourcePool* | DVSNetworkResourcePool[] |
Deprecated.
as of vSphere API 6.0
Use vmVnicNetworkResourcePool
to get the Virtual NIC resource pool information.
Use infrastructureTrafficResourceConfig
to get the host infrastructure resource information.
Network resource pool information for the switch.
Since vSphere API 4.1 |
portgroup* | ManagedObjectReference[]
to a DistributedVirtualPortgroup[] |
Portgroups that are defined on the switch.
|
runtime* | DVSRuntimeInfo |
Runtime information of the distributed virtual switch.
Since vSphere API 5.1 |
summary | DVSSummary |
Summary of the switch.
|
uuid | xsd:string |
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 |
Methods
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
spec P | DVPortgroupConfigSpec[] |
The specification for the portgroup.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. The method does not return a value in the Task.Info.result property. Use the Portgroup property to obtain managed object references to the new portgroups. |
Faults
Type | Description |
---|---|
DuplicateName | |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
configSpec P | DVSNetworkResourcePoolConfigSpec[] |
the network resource pool configuration specification.
Since vSphere API 5.0 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
spec P | DVPortgroupConfigSpec |
The specification for the portgroup.
Since vSphere API 5.1 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object. The Task.Info.result property contains a managed object reference to the new portgroup. The Portgroup property also contains the reference. |
Faults
Type | Description |
---|---|
DuplicateName | Thrown if a portgroup with the same name already exists |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
InvalidName | Thrown if name of the portgroup is invalid |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
configSpec P | DvsVmVnicResourcePoolConfigSpec[] |
The Virtual NIC network resource pool configuration specification and operation type.
Since vSphere API 6.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
ConcurrentAccess | Thrown if a Virtual NIC network resource pool is modified by two or more clients at the same time. |
ConflictingConfiguration | Thrown if the any property being set is in conflict. |
DvsFault | Thrown if operation fails on any host or if there are other reconfigure failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | |
NotFound | Thrown if the resource pool does not exist on the dvs. |
ResourceInUse | Thrown if Virtual NIC network resource pool being removed is associated with a network entity |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
entityBackup
parameter, the returned
configuration specification represents the exported switch configuration.
If the entityBackup
matches the current switch
configuration, the method does not return a configuration specification.
entityBackup
is not specified, the returned configuration
specification represents a previous state of the switch, if available.
When you use a VMware distributed virtual switch, each time you reconfigure
the switch, the Server saves the switch configuration before applying the updates.
If the vCenter Server is restarted, the saved configuration is not preserved
and the method does not return a configuration specification.
To use the rollback method, you must have the DVSwitch.Read privilege.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
entityBackup* P | EntityBackupConfig |
Backup of a distributed virtual switch, returned by
the DVSManagerExportEntity_Task
method.
Since vSphere API 5.1 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. If the distributed virtual switch configuration has changed, the Task.Info.result property contains the DVSConfigSpec object. |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails. |
RollbackFailure | Thrown if there is no configuration specified in entityBackup and the previous configuration does not exist either. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
enable P | xsd:boolean |
If true, enables I/O control. If false,
disables network I/O control.
Since vSphere API 4.1 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
DvsFault | Thrown if the enabling/disabling fails. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
criteria* P | DistributedVirtualSwitchPortCriteria |
The port selection criteria. If unset, the operation
returns the keys of all the ports in the switch.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
xsd:string[] |
Faults
Type | Description |
---|---|
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
criteria* P | DistributedVirtualSwitchPortCriteria |
The port selection criteria. If unset, the operation
returns the keys of all the ports in the portgroup.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
DistributedVirtualPort[] |
Faults
Type | Description |
---|---|
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
portgroupKey P | xsd:string |
The key that identifies a portgroup of this VDS.
Since vSphere API 5.1 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a DistributedVirtualPortgroup |
Faults
Type | Description |
---|---|
NotFound | Thrown if the portgroup for the specified key is not found. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
In summary, this operation does the following:
config
.maxPorts
of the source switch to the maxPorts
of the
destination switch.Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
dvs P | ManagedObjectReference
to a DistributedVirtualSwitch |
The switch (source) to be merged
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidHostState | |
NotFound | |
ResourceInUse | Thrown if failed to delete the source switch |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
portKey P | xsd:string[] |
The keys of the ports to be moved into the portgroup.
Since vSphere API 4.0 |
destinationPortgroupKey* P | xsd:string |
The key of the portgroup to be moved into.
If unset, the port will be moved under the switch.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
ConcurrentAccess | |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
NotFound | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
operation P | xsd:string |
The operation. See DistributedVirtualSwitchProductSpecOperationType for
valid values. For
VmwareDistributedVirtualSwitch,
only vim.DistributedVirtualSwitch.ProductSpecOperationType#upgrade
is valid.
Since vSphere API 4.0 |
productSpec* P | DistributedVirtualSwitchProductSpec |
The product info of the implementation.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidState | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
TaskInProgress |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
Return Value
Type | Description |
---|---|
xsd:int[] |
Faults
Type | Description |
---|---|
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
port P | DVPortConfigSpec[] |
The specification of the ports.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
ConcurrentAccess | |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
NotFound | |
ResourceInUse | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Reconfiguring a Standard Distributed Virtual Switch
To reconfigure a DistributedVirtualSwitch, use a DVSConfigSpec to set the switch properties.
Reconfiguring a VMware Distributed Virtual Switch
If you use a VmwareDistributedVirtualSwitch, you can perform the following switch reconfiguration:
Reconfiguring the switch may require any of the following privileges, depending on what is being changed:
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
spec P | DVSConfigSpec |
The configuration of the switch
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
AlreadyExists | |
ConcurrentAccess | |
DuplicateName | |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | |
InvalidState | |
LimitExceeded | |
NotFound | |
ResourceInUse | |
ResourceNotAvailable | Thrown if there is no port available in the portgroup |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
VspanDestPortConflict | Thrown if a dvPort is used as desination ports in multiple Distributed Port Mirroring sessions. |
VspanPortConflict | Thrown if dvPort is used as both the transmitted source and destination ports in Distributed Port Mirroring sessions. |
VspanPromiscuousPortNotSupported | Thrown if a promiscuous port is used as transmitted source or destination in the Distributed Port Mirroring sessions. |
VspanSameSessionPortConflict | Thrown if a dvPort is used as both the source and destination in the same Distributed Port Mirroring session. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
hosts* P | ManagedObjectReference[]
to a HostSystem[] |
The hosts to be rectified.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
NotFound | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
portKeys* P | xsd:string[] |
The keys of the ports to be refreshed. If not specified, all port
states are refreshed.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
NotFound | |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
key P | xsd:string[] |
The network resource pool key.
Since vSphere API 5.0 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | Thrown if the name of the resource pool is invalid. |
NotFound | Thrown if the resource pool does not exist on the dvs. |
ResourceInUse | Thrown if network resource pool is associated with a network entity |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
capability P | DVSCapability |
The capability of the switch.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
healthCheckConfig P | DVSHealthCheckConfig[] |
The health check configuration.
Since vSphere API 5.1 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a Task | Returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitch used to make the method call. |
configSpec P | DVSNetworkResourcePoolConfigSpec[] |
The network resource pool configuration specification.
Since vSphere API 4.1 |
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
ConcurrentAccess | Thrown if a network resource pool is modified by two or more clients at the same time. |
DvsFault | Thrown if operation fails on any host or if there are other update failures. |
DvsNotAuthorized | Thrown if login-session's extension key does not match the switch's configured extensionKey. |
InvalidName | Thrown if the name of the resource pool is invalid. |
NotFound | Thrown if the resource pool does not exist on the dvs. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Top of page | Local Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |