In the ESX 3.5 days, I could use esxcfg-vswtich -a vSwitch1:120 to create vSwitch1 with 120 ports. I can't find a way to do that using the vCLI on a Windows host against ESXi 4u1 with vicfg-vswitch -a. If I use the same format and do vicfg-vswitch -a vSwitch1:120, I end up with a vSwitch named "vSwitch1:120". Lame.
Message was edited by: chouse
ESX 4.0u1
>root@esx2 ~# esxcfg-vswitch -a vSwitch1:120
>root@esx2 ~# esxcfg-vswitch -l
>Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
>vSwitch1 128 1 120 1500
PortGroup Name VLAN ID Used Ports Uplinks
---
MCSA, MCTS, VCP, VMware vExpert '2009
Sorry, I'm using vCLI on windows against an ESXi 4u1 host.
According to page 37 of vSphere Command-Line Interface Installation and Reference Guide there is no such option to set number of ports.
So it works fine, you just have to reconfigure your vSwitch manually in vSphere Client to change number of ports.
---
MCSA, MCTS, VCP, VMware vExpert '2009
Yep, that's what I expected, having not seen any such option in the documentation, nor in the perl source for the script. The downside is changing the number of ports after adding a switch requires a reboot.
Thanks.
I suppose you won't change number of ports 5 times a day
---
MCSA, MCTS, VCP, VMware vExpert '2009
This was pretty simple to just update the existing esxcfg-vswitch to also support adding number of ports when creating a new vSwitch.
Take a look at this modified script:
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
tnx.... the link to http://communities.vmware.com/docs/DOC-11800 a custom esxcfg-vswitch script was the answer for me to 'change' the amount of ports for a switch without rebooting the host.... (the best option would be to use vmotion and a SAN so you can move the vm's from the host.....)
I'll write my actions down and post it to this forum... next week