# Managed Object - DistributedVirtualSwitchManager(vim.dvs.DistributedVirtualSwitchManager)

Property of
  ServiceContent
See also
  DistributedVirtualPortgroup, DistributedVirtualSwitch, DistributedVirtualSwitchHostProductSpec, DistributedVirtualSwitchManagerCompatibilityResult, DistributedVirtualSwitchManagerDvsProductSpec, DistributedVirtualSwitchManagerHostContainer, DistributedVirtualSwitchManagerHostDvsFilterSpec, DistributedVirtualSwitchManagerImportResult, DistributedVirtualSwitchNetworkOffloadSpec, DistributedVirtualSwitchProductSpec, DVSFeatureCapability, DVSManagerDvsConfigTarget, DVSManagerPhysicalNicsList, EntityBackupConfig, HostSystem, ManagedEntity, SelectionSet
Since
  vSphere API 4.0

## Managed Object Description

The DistributedVirtualSwitchManager provides methods that support the following operations:

- Backup and restore operations for VmwareDistributedVirtualSwitch and associated DistributedVirtualPortgroup managed objects.
- Query operations for information about portgroups and distributed virtual switches.
- Distributed virtual switch configuration update operations.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
DVSManagerExportEntity_Task, DVSManagerImportEntity_Task, DVSManagerLookupDvPortGroup, QueryAvailableDvsSpec, QueryCompatibleHostForExistingDvs, QueryCompatibleHostForNewDvs, QueryCompatibleVmnicsFromHosts, QueryDvsByUuid, QueryDvsCheckCompatibility, QueryDvsCompatibleHostSpec, QueryDvsConfigTarget, QueryDvsFeatureCapability, QuerySupportedNetworkOffloadSpec, RectifyDvsOnHost_Task

# DVSManagerExportEntity_Task(exportEntity)

Export the configuration for entities specified in the `selectionSet` parameter. You can use this method only for a VmwareDistributedVirtualSwitch and its associated DistributedVirtualPortgroup objects.

Use the DVSManagerImportEntity_Task method to restore the entity to the state represented by the exported configuration. You can also use the exported configuration to create a new switch or portgroup.

Required Privileges
  None
Since
  vSphere API 5.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
selectionSet P | SelectionSet[] | The selection criteria for a set of entities to export the configuration. Since vSphere API 5.1

P Required privilege: selectionSet

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Task | This method returns a Task object with which to monitor the operation. After successful completion, the Task.Info.result property contains the EntityBackupConfig object.

Faults

Type | Description
--- | ---
BackupBlobWriteFailure | Thrown if failed to create backup config blob.
NotFound | Thrown if entity in selectionSet doesn't exist.
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

# DVSManagerImportEntity_Task(importEntity)

Import the configuration of entities specified in EntityBackupConfig. You can restore the existing configuration to the state represented by the backup configuration. You can also use the backup configuration to create a new switch or portgroup. See EntityImportType.

Required Privileges
  None
Since
  vSphere API 5.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
entityBackup P | EntityBackupConfig[] | Configuration of one or more entities to be imported. The entity backup configuration is returned by the DVSManagerExportEntity_Task method. Since vSphere API 5.1
importType P | xsd:string | Specifies whether to create a new configuration or restore a previous configuration. See EntityImportType for valid values. Since vSphere API 5.1

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Task | This method returns a Task object with which to monitor the operation.

Faults

Type | Description
--- | ---
DvsFault | Thrown if operation fails on any host.
NotFound | Thrown if entity in key doesn't exist.
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

# DVSManagerLookupDvPortGroup(lookupPortgroup)

Returns the portgroup identified by the key within the specified VDS identified by its UUID.

Required Privileges
  System.View
Since
  vSphere API 5.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
switchUuid P | xsd:string | The UUID of the DistributedVirtualSwitch. Since vSphere API 5.1
portgroupKey P | xsd:string | The key that identifies a DistributedVirtualPortgroup. Since vSphere API 5.1

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a DistributedVirtualPortgroup |

Faults

Type | Description
--- | ---
NotFound | Thrown if the portgroup for the specified inputs was 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DVSManagerLookupDvPortGroup" type="vsan:DVSManagerLookupDvPortGroupRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DVSManagerLookupDvPortGroupResponse"> <complexType> <sequence> <element name="returnval" type="vsan:ManagedObjectReference" minOccurs="0"/> </sequence> </complexType> </element>

# QueryAvailableDvsSpec(querySupportedSwitchSpec)

This operation returns a list of switch product specifications that are supported by the vCenter Server.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
recommended* P | xsd:boolean | If set to true, return only the recommended versions. If set to false, return only the not recommended versions. If unset, return all supported versions. Since vSphere API 4.0

*Need not be set P Required privilege: recommended

Return Value

Type | Description
--- | ---
DistributedVirtualSwitchProductSpec[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryAvailableDvsSpec" type="vsan:QueryAvailableDvsSpecRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryAvailableDvsSpecResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DistributedVirtualSwitchProductSpec" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryCompatibleHostForExistingDvs(queryCompatibleHostForExistingDvs)

This operation returns a list of hosts that are compatible with the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
container P | ManagedObjectReference to a ManagedEntity | Where to look for hosts. Supported types of objects for this parameter are Datacenter, ComputeResource and Folder. Since vSphere API 4.0
recursive P | xsd:boolean | Whether to search for hosts in the subfolders, if applicable. In the case when container is a Datacenter, the recursive flag is applied to its HostFolder. Since vSphere API 4.0
dvs P | ManagedObjectReference to a DistributedVirtualSwitch | Search the host based on the specification published in the compatibleHostComponentProductInfo of a DistributedVirtualSwitch. If not set, it is assumed to be the specification that a DistributedVirtualSwitch would have if it is created with the default DistributedVirtualSwitchProductSpec. Since vSphere API 4.0

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference[] to a HostSystem[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleHostForExistingDvs" type="vsan:QueryCompatibleHostForExistingDvsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleHostForExistingDvsResponse"> <complexType> <sequence> <element name="returnval" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryCompatibleHostForNewDvs(queryCompatibleHostForNewDvs)

This operation returns a list of hosts that are compatible with the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
container P | ManagedObjectReference to a ManagedEntity | Where to look for hosts. Supported types of objects for this parameter are Datacenter, ComputeResource and Folder. Since vSphere API 4.0
recursive P | xsd:boolean | Whether to search for hosts in the subfolders, if applicable. In the case when container is a Datacenter, the recursive flag is applied to its HostFolder. Since vSphere API 4.0
switchProductSpec* P | DistributedVirtualSwitchProductSpec | The productSpec of a DistributedVirtualSwitch. If not set, it is assumed to be the default one used for DistributedVirtualSwitch creation. Since vSphere API 4.0

*Need not be set PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference[] to a HostSystem[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleHostForNewDvs" type="vsan:QueryCompatibleHostForNewDvsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleHostForNewDvsResponse"> <complexType> <sequence> <element name="returnval" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryCompatibleVmnicsFromHosts(queryCompatibleVmnicsFromHosts)

This operation returns a list of vmnics which are compatible with the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View
Since
  8.0.0.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
hosts* P | ManagedObjectReference[] to a HostSystem[] | The array of hosts on which the query is to be made to fetch valid PhysicalNics on each host. Since 8.0.0.1
dvs P | ManagedObjectReference to a DistributedVirtualSwitch | The distributed virtual switch on which the query is to be made. Since 8.0.0.1

*Need not be set PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
DVSManagerPhysicalNicsList[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleVmnicsFromHosts" type="vsan:QueryCompatibleVmnicsFromHostsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryCompatibleVmnicsFromHostsResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DVSManagerPhysicalNicsList" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryDvsByUuid(querySwitchByUuid)

This operation returns a DistributedVirtualSwitch given a UUID.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
uuid P | xsd:string | Since vSphere API 4.0

P Required privilege: uuid

Return Value

Type | Description
--- | ---
ManagedObjectReference to a DistributedVirtualSwitch |

Faults

Type | Description
--- | ---
NotFound | Thrown if a switch with the UUID doesn't exist.
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsByUuid" type="vsan:QueryDvsByUuidRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsByUuidResponse"> <complexType> <sequence> <element name="returnval" type="vsan:ManagedObjectReference" minOccurs="0"/> </sequence> </complexType> </element>

# QueryDvsCheckCompatibility(checkCompatibility)

This operation returns a list of compatibility results. Each compatibility result is an object that has a host property and optionally a fault which would be populated only if that host is not compatible with a given dvsProductSpec. All filters in hostFilerSpecs are ANDed to derive the intersection of hosts against which compatibility is checked. If caller did not have view privileges on the host entity in an element of the CompatibilityResult array, then that entire element would be removed from the CompatibilityResult array. Typical uses:

- For the createDVS situation, hostFilterSpec is of type HostDvsFilterSpec and DvsProductSpec will have newSwitchProductSpec set.
- For the Add-Host-To-DVS situation, you can use either HostDvsFilterSpec or HostDvsMembershipFilter with inclusive being false, and pass the DVS in DvsProductSpec.
- For the Upgrade-DVS situation, you can use either HostDvsFilterSpec or HostDvsMembershipFilter with inclusive being true, and pass the new desired ProductSpec for DVS in newSwitchProductSpec.

Required Privileges
  System.View
Since
  vSphere API 4.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
hostContainer P | DistributedVirtualSwitchManagerHostContainer | The container of hosts on which we check the compatibility. This container can be a datacenter, folder, or computeResource. We can also include all the hosts in the hierarchy with container as root of the tree. Since vSphere API 4.1
dvsProductSpec* P | DistributedVirtualSwitchManagerDvsProductSpec | The productSpec of a DistributedVirtualSwitch. If not set, it is assumed to be the default one used for DistributedVirtualSwitch creation for current version. Since vSphere API 4.1
hostFilterSpec* P | DistributedVirtualSwitchManagerHostDvsFilterSpec[] | The hosts against which to check compatibility. This is a filterSpec and users can use this to specify all hosts in a container (datacenter, folder, or computeResource), an array of hosts, or hosts that might or might not be a DVS member. Since vSphere API 4.1

*Need not be set PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
DistributedVirtualSwitchManagerCompatibilityResult[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsCheckCompatibility" type="vsan:QueryDvsCheckCompatibilityRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsCheckCompatibilityResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DistributedVirtualSwitchManagerCompatibilityResult" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryDvsCompatibleHostSpec(queryCompatibleHostSpec)

This operation returns a list of host product specifications that are compatible with the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
switchProductSpec* P | DistributedVirtualSwitchProductSpec | The productSpec of a DistributedVirtualSwitch. If not set, it is assumed to be the default one used for DistributedVirtualSwitch creation. Since vSphere API 4.0

*Need not be set P Required privilege: switchProductSpec

Return Value

Type | Description
--- | ---
DistributedVirtualSwitchHostProductSpec[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsCompatibleHostSpec" type="vsan:QueryDvsCompatibleHostSpecRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsCompatibleHostSpecResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DistributedVirtualSwitchHostProductSpec" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryDvsConfigTarget(queryDvsConfigTarget)

This operation returns the DistributedVirtualSwitch or DistributedVirtualPortgroup configuration target on a host.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
host* P | ManagedObjectReference to a HostSystem | The host on which the query is to be made. If called directly on the host this parameter need not be specified. Since vSphere API 4.0
dvs* P | ManagedObjectReference to a DistributedVirtualSwitch | The distributed virtual switch on which the query is to be made. If unspecified the config target will encompass all the distributed virtual switches available on the host. Since vSphere API 4.0

*Need not be set PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
DVSManagerDvsConfigTarget |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsConfigTarget" type="vsan:QueryDvsConfigTargetRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsConfigTargetResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DVSManagerDvsConfigTarget"/> </sequence> </complexType> </element>

# QueryDvsFeatureCapability(queryFeatureCapability)

This operation indicates which version-specific DVS features are available for the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View
Since
  vSphere API 4.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
switchProductSpec* P | DistributedVirtualSwitchProductSpec | The productSpec of a DistributedVirtualSwitch. If not set, it is assumed to be the default one used for DistributedVirtualSwitch creation. Since vSphere API 4.1

*Need not be set P Required privilege: switchProductSpec

Return Value

Type | Description
--- | ---
DVSFeatureCapability |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsFeatureCapability" type="vsan:QueryDvsFeatureCapabilityRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QueryDvsFeatureCapabilityResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DVSFeatureCapability" minOccurs="0"/> </sequence> </complexType> </element>

# QuerySupportedNetworkOffloadSpec(querySupportedNetworkOffloadSpec)

This operation returns a list of network offload specifications that are compatible with the given DistributedVirtualSwitch product specification.

Required Privileges
  System.View
Since
  8.0.0.1

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
switchProductSpec P | DistributedVirtualSwitchProductSpec | The productSpec of a DistributedVirtualSwitch. Since 8.0.0.1

P Required privilege: switchProductSpec

Return Value

Type | Description
--- | ---
DistributedVirtualSwitchNetworkOffloadSpec[] |

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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QuerySupportedNetworkOffloadSpec" type="vsan:QuerySupportedNetworkOffloadSpecRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="QuerySupportedNetworkOffloadSpecResponse"> <complexType> <sequence> <element name="returnval" type="vsan:DistributedVirtualSwitchNetworkOffloadSpec" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# RectifyDvsOnHost_Task(rectifyHost)

Update the Distributed Switch configuration on the hosts to bring them in sync with the current configuration in vCenter Server.

Required Privileges
  System.Read
Since
  vSphere API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DistributedVirtualSwitchManager used to make the method call.
hosts P | ManagedObjectReference[] to a HostSystem[] | The hosts to be rectified. Since vSphere API 5.0

P Required privilege: hosts

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