VMware Cloud Community
JimmyDean
Enthusiast
Enthusiast

Changing default switch num of ports.

Hey all,

I have a scripted install of ESX and everything is working great. I wanted to add something in my script to change the number of port from 24 to 256. On the default Switch. The below command works for making new switches.

Create new vSwitch:

esxcfg-vswitch -a vSwitch1:256

I was thinking i might have to delete the default switch and recreate it. Since I'm efficient (lazy) I was hoping not to have to do that. I have done some searching but no luck.

Thankx all!

J

0 Kudos
5 Replies
lamw
Community Manager
Community Manager

I believe you need to delete it and re-create it, I know you can only change the number of ports using the vSphere Client for certain numbers but I think from the CLI you'll need to issue a delete and re-create it with the number of ports

=========================================================================

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".

JimmyDean
Enthusiast
Enthusiast

Thankx William.You don't by chance have a script to do what your talking about do you?

Just wondering.

J

0 Kudos
lamw
Community Manager
Community Manager

Please close this thread, duplicated at:

=========================================================================

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".

0 Kudos
JimmyDean
Enthusiast
Enthusiast

Its the same thread.

0 Kudos
lamw
Community Manager
Community Manager

np.

Nope, it's pretty simple and it depends on what you need to configure.

For deleting a vSwitch, just add this line:

esxcfg-vswitch -d vSwitchX

to add vSwitch:

esxcfg-vswitch -a vSwitchX:YYY

and then you'll add lines to add portgroups and associate VLAN ID's with the portgroup names/etc.

Take a look at this example by Mike Laspina of ks.cfg that you can use to configure your host: http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations

=========================================================================

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".

0 Kudos