PowerCLI – Warning! New-VirtualSwitch without the –NumPorts parameter defaults to 56 ports!

Written by Sam McGeown
Published on 28/8/2013 - Read in about 1 min (165 words)
Published under VMware #PowerCLI

PowerCLI LogoThere’s not a lot more to say than the title of this post – if you create a new Virtual Switch using PowerCLI without specifying the NumPorts parameter, it defaults to 64 ports. This strikes me as odd when the default for a standard switch is 120.

You can see in the screenshot below that when I create a Virtual Switch without the parameter, it creates it with 64 ports. Once you minus the 8 reserved for physical NIC ports (uplinks), CDP traffic, and network discovery it leaves you with 56 ports available for VMs.


Obviously this isn’t something that everyone will run into, 56 VMs on a host is a high consolidation ratio! But it caught us out this week with Virtual Machines and some weird network problems! Since changing a vSwitch’s number of ports requires a reboot I’ll be migrating these to a Distributed Switch (which I should have done a while ago anyway!) which will fix the problem with zero further downtime.

Share this post