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:
- Go to: http://vCenterServer-ip-address/mob/
- When prompted, enter your vCenter Server username and password.
- Click the content link.
- In the left pane, search for the row with the word rootFolder.
- Open the link in the right pane of the row. The link is similar to group-d1 (Datacenters).
- In the left pane, search for the row with the word childEntity. In the right pane, you see a list of datacenter links.
- Click the datacenter link where the vDS is defined.
- 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).
- 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.
- Click the vDS on which you want to change the maxPort value.
- In the left pane, search for the row with the word config, and click the link in the right pane.
- In the left pane, search for the row with the word configVersion. It is normally the first row.
- Note the corresponding value displayed in the right pane. (The value is a number.)
- Go back to the vDS page.
- Click the ReconfigureDvs_Task link. A new window appears.
- In the Spec text field, enter:
<spec><configVersion>value</configVersion><maxPorts>20000</maxPorts></spec>
Where value is the value you noted in step 13.
- Click the Invoke Method. The changes appear similar to:
<spec>
<configVersion>7</configVersion>
<maxPorts>20000</maxPorts>
</spec>
- Close the window.
- Repeat Steps 9 through 13 to verify the new maxPort value.
- 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: