NSX-T Data Center API commands to support vSphere Distributed Switch on NSX-T Data Center.

API Changes for vSphere Distributed Switch

For detailed information related to API calls, see the NSX-T Data Center API Guide.

Note: Configuration done using API commands is also possible from the vCenter Server user interface. For more information on creating a NSX-T Data Center transport node using Sphere Distributed Switch as host switch, refer to the Configure a Managed Host Transport Node topic in the NSX-T Data Center Installation Guide.
API NSX-T on vSphere Distributed Switch (VDS) Changes in API Commands for NSX-T on vSphere Distributed Switch
Create a Transport node for a Discovered node. /api/v1/fabric/discovered-nodes/<external-id/discovered-node-id>?action=create_transport_node
{
"node_id":
 "d7ef478b-752c-400a-b5f0-207c04567e5d", "host_switch_spec": {
 "host_switches": [
 {
 "host_switch_name": "vds-1",
 "host_switch_id":
 "50 2b 92 54 e0 80 d8 d1-ee ab 8d a6 7b fd f9 4b",
 "host_switch_type": "VDS",
 "host_switch_mode": "STANDARD",
 "host_switch_profile_ids": [
 {
 "key": "UplinkHostSwitchProfile",
 "value":
 "159353ae-c572-4aca-9469-9582480a7467"
 } ],
 "pnics": [],
 "uplinks": [
 {
 "vds_uplink_name": "Uplink 2",
 "uplink_name": "nsxuplink1"
 } ],
 "is_migrate_pnics": false,
 "ip_assignment_spec": {
 "resource_type": "AssignedByDhcp"
 },
 "cpu_config": [],
 "transport_zone_endpoints": [
 {
 "transport_zone_id":
 "06ba5326-67ac-4f2c-9953-a8c5d326b51e",
 "transport_zone_profile_ids": [
 {
 "resource_type": "BfdHealthMonitoringProfile",
 "profile_id": 
"52035bb3-ab02-4a08-9884-18631312e50a"
 } ] } ],
 "vmk_install_migration": [],
 "pnics_uninstall_migration": [],
 "vmk_uninstall_migration": [],
 "not_ready": false
 } 
 ],
 "resource_type": "StandardHostSwitchSpec"
 },
 "transport_zone_endpoints": [],
 "maintenance_mode": "DISABLED",
 "is_overridden": false,
 "resource_type": "TransportNode",
 "display_name": "TestTN",
}
  • "host_switch_name": "vds-1": Is not a administrator entered switch name. The host switch name field is selected from the populated list of vSphere Distributed Switches created in vSphere.
  • "host_switch_id": Is the UUID of the vSphere Distributed Switch object. The corresponding API in vSphere is vim.DistributedVirtualSwitch.config.uuid .

  • "vds_uplink_name": An uplink created in vSphere Distributed Switch, mapping uplinks to physical NICs.
  • "uplink_name": An uplink created in NSX-T that maps uplinks on N-VDS to the uplinks defined in vds_uplink_name.
  • "is_migrate_pnics": false: By default, migration of physical NICs when using vSphere Distributed Switch is not supported.
  • "transport_zone_endpoints": Not supported when the host switch type is vSphere Distributed Switch. This field is required when the host switch type is N-VDS. Transport zone endpoint IDs correspond to the host switch it is associated with.

    For more details on /api/v1/fabric/discovered-nodes/<external-id/discovered-node-id>?action=create_transport_node, refer to the NSX-T Data Center API Guide.

VM configuration vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo
  • vSphere Distributed Switch: As a vSphere administrator, ensure the BackingType parameter is set to NSX.
Note: The VNIC BackingType defaults to DistributedVirtualPortBackingInfo when the BackingType is set to OpaqueNetworkBackingInfo.
VMkernel NIC vim.dvs.DistributedVirtualPort
  • N-VDS: As an NSX-T administrator, set values to these parameters:
    • OpaqueNetworkId
    • OpaqueNetworkType
  • NSX-T on vSphere Distributed Switch: As a vSphere administrator, set values to these parameters:
    • SwitchUUID and portgroupKey
    • BackingType of the DVPG must be NSX.
Physical NIC to Uplink Mapping

API: vim.host.NetworkSystem:networkSystem.updateNetworkConfig

Property: vim.host.NetworkConfig.proxySwitch

  • To map physical NICs to uplinks for vSphere Distributed Switch by calling API command, set the maxMtu property.
MTU

API: vim.dvs.VmwareDistributedVirtualSwitch.reconfigure

Property: VmwareDistributedVirtualSwitch.ConfigSpec.maxMtu

  • To configure an MTU value for vSphere Distributed Switch by calling API command, set the maxMtu property.
    Note: MTU value defined in uplink profiles in NSX-T are not applied to the host switch.

LAG

API: vim.dvs.VmwareDistributedVirtualSwitch.updateLacpGroupConfig

Property: vim.dvs.VmwareDistributedVirtualSwitch.LacpGroupSpec

  • To configure an LAG profile for vSphere Distributed Switch by calling API command, set the LacpGroupSpec property.
NIOC

API:vim.dvs.VmwareDistributedVirtualSwitch.reconfigure

Property: vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec.infrastructureTrafficResourceConfig

  • To configure an NIOC profile for vSphere Distributed Switch by calling API command, set the infrastructureTrafficResourceConfig property.
LLDP

API: vim.dvs.VmwareDistributedVirtualSwitch.reconfigure

Property: vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec.linkDiscoveryProtocolConfig

  • To configure LLDP profile for vSphere Distributed Switch by calling API command, set the linkDiscoveryProtocolConfig property.