First of all its been awhile since my laste port and for that I apologize.
Maximum vDS ports per host
Some settings are just left default, maybe because it seems to be of no use/harm, maybe because it seems sufficient and some are just left default as the consequences of changing them are unknown.
Well I guess this is just one of the problems where all of the above fit right in. You may know that there are some limitations of whats supported by different vSphere components – and this is were the problem in question comes to play. When you add a host to the vDS it will be created with 256 port by default, this means that if you plan to have more than 256 vNics on a host, this needs to be changed. This can be done when the host is added to the vDS and it can also be change after the host has been put into production, it will how ever require a reboot of the host to take effect.
Unfortunate I haven’t been able to find this setting as part for host profil or any other automated way, so as of now there seems to be only two ways to get this done.
If you should choose to do it when adding a host to the vDS, please read VMwares KB article for more information, here
The scripting way
Well as you have now continued reading I’m assuming you want to know how it can be done via scripting.
So here it is, there is not much to say about it. It does what is need to change the maximum number of ports. The code should be pretty straightforward, Change the $VDSName and $Portnum to the vDS switch you need and the wished port numbers. Lastly execute, thats all.