VMware Cloud Community
Capital20111014
Contributor
Contributor

Change Default ports on new vSwitch

Hi,

Does anyone know if it's possible to change the default ammount of ports when you create a vSwitch, default is set to 120

Many thanks

Pieter

Reply
0 Kudos
7 Replies
arturka
Expert
Expert

Capital wrote:

Hi,

Does anyone know if it's possible to change the default ammount of ports when you create a vSwitch, default is set to 120

Hi

Never heard about such a possibility, BTW why do you wanna change it ?

VCDX77 My blog - http://vmwaremine.com
Reply
0 Kudos
Capital20111014
Contributor
Contributor

We auto deploy new servers\switches\port groups etc, and we have hit the hard limit on our server 4088 ports per esx host, yes i know i can manualy change the ammount of ports per switch but the whole process is automated. So if we can set the system to only assign 32 ports per vSwitch it would be a lot easier.

The other alternative is when we create the switch's (with the API) we set it there, if thats possible.

Cheers anyway

Piet

Reply
0 Kudos
Rubeck
Virtuoso
Virtuoso

The PowerCLI CMDLET "Set-VirtualSwitch" can set it..

http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Set-VirtualSwitch.html

.. so can the ESX command "vmware-vim-cmd" and ESXi using the vim-cmd command.

But Im not sure if you can add the vSwitch and set the number of ports in a one- liner.. I believe the vSwitch needs to already exists before setting the number of ports..

/Rubeck

Reply
0 Kudos
Capital20111014
Contributor
Contributor

hi Rubeck,

i know how to change the number of ports, but i was trying to find out if it's possible to change the default from 120 to a smaller number, so when a vSwitch is created it will have less ports assigned to it.

But thanks anyway

Piet

Reply
0 Kudos
BenConrad
Expert
Expert

[Bash - 2 commands]

esxcfg-vswitch -a vSwitch1

vmware-vim-cmd /hostsvc/net/vswitch_setnumports vSwitch1 256

[ PowerCli - 1 command]

New-VirtualSwitch -Name test1 -VMHost YourHost -NumPorts 256 -Mtu 9000

Ben

Reply
0 Kudos
Capital20111014
Contributor
Contributor

Hi Ben,

Thanks for your reply, but unfortunatley all that does is set the number of ports on vSwitch1 to 256, it doesn't change the "Defaults".

I'm looking for a way to set the default property, so when you add a new switch, it will creat it with the default ammount of ports i specify.

Cheers

Piet

Reply
0 Kudos
mcowger
Immortal
Immortal

I believe that value is hardcoded.

--Matt VCDX #52 blog.cowger.us
Reply
0 Kudos