Increasing the maximum number of vNetwork Distributed Switch (vDS) ports in vSphere
search cancel

Increasing the maximum number of vNetwork Distributed Switch (vDS) ports in vSphere

book

Article ID: 311026

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article provides steps to increase the maximum number of vDS ports.

Environment

VMware vCenter Server 5.1.x
VMware vCenter Server 4.0.x
VMware vCenter Server 6.0.x
VMware vCenter Server 5.5.x
VMware vCenter Server 4.1.x
VMware vCenter Server 5.0.x

Resolution

Changing the maximum number of vDS ports by using vSphere PowerCLI

Note: The maximum number of ports for the vDS is 2147483647 for vSphere 5.x

The vSphere PowerCLI can be used to automate various virtual machine tasks. It provides an easy-to-use C# and PowerShell interface to VMware vSphere APIs. For more information, see the VMware vSphere PowerCLI Documentation.

To change the maximum number of vDS ports, you can use this PowerCLI snippet:

$dvs = Get-VirtualSwitch -Distributed -Name DVSName | Get-View
$cfg = New-Object -TypeName VMware.Vim.DVSConfigSpec
$cfg.MaxPorts = 20000
$cfg.configVersion = $dvs.config.configVersion
$dvs.ReconfigureDvs_Task( $cfg )

Changing the maximum number of vDS ports by manually editing the configuration

To change the maximum number of vDS ports by manually editing the configuration:
  1. Go to: http://vCenterServer-ip-address/mob/
  2. When prompted, enter your vCenter Server username and password.
  3. Click the content link.
  4. In the left pane, search for the row with the word rootFolder.
  5. Open the link in the right pane of the row. The link is similar to group-d1 (Datacenters).
  6. In the left pane, search for the row with the word childEntity. In the right pane, you see a list of datacenter links.
  7. Click the datacenter link where the vDS is defined.
  8. In the left pane, search for the row with the word networkFolder, and open the link in the right pane. The link is similar to group-n123(network).
  9. In the left pane, search for the row with the word childEntity. You see a list of vDS and distributed port group links in the right pane.
  10. Click the vDS on which you want to change the maxPort value.
  11. In the left pane, search for the row with the word config, and click the link in the right pane.
  12. In the left pane, search for the row with the word configVersion. It is normally the first row.
  13. Note the corresponding value displayed in the right pane. (The value is a number.)
  14. Go back to the vDS page.
  15. Click the ReconfigureDvs_Task link. A new window appears.
  16. In the Spec text field, enter:

    <spec><configVersion>value</configVersion><maxPorts>20000</maxPorts></spec>

    Where value is the value you noted in step 13.

  17. Click the Invoke Method. The changes appear similar to:

    <spec>
    <configVersion>7</configVersion>
    <maxPorts>20000</maxPorts>
    </spec>


  18. Close the window.
  19. Repeat Steps 9 through 13 to verify the new maxPort value.
  20. Restart the vCenter Server service for the changes to take effect. For more information, see Stopping, starting, or restarting vCenter services (1003895).

Changing the maximum number of vDS ports for the Cisco Nexus 1000V

For more information on configuring the number of ports using the Nexus 1000v Virtual Switch Manager (VSM), see:

Notes:



Additional Information

How to stop, start, or restart vCenter Server services
Adding a virtual machine to a DVPortGroup in the vSphere Client fails with the error: No free port is available in DVportgroup PortGroupName
Increasing the maximum number of vNetwork Distributed Switch (vDS) ports designated for an ESXi 5.0/5.1 host
vSphere の vNetwork 分散スイッチ (vDS) の最大ポート数を増やす