I haven't done this personally, but the UpdateVirtualSwitch function all on HostNetworkSystem via the SDK should allow you to do what you want. Of course changing the number of ports will require a reboot.
Hello,
I would start with:
vmware-vim-cmd hostsvc/net/vswitch_setnumports
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354
As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization
Is there anyway I can do this remotely? I am writing a PERL script to add vswitches and I need to also be able to set the number of ports. I haven't been able to figure out how run vmware-vim-cmd remotely.
I haven't done this personally, but the UpdateVirtualSwitch function all on HostNetworkSystem via the SDK should allow you to do what you want. Of course changing the number of ports will require a reboot.
Thanks, I figured it out.