VMware Cloud Community
deepakmits
Contributor
Contributor

How do we get the configuration of virtual switches programmatically?

How do we get the configuration of virtual switches programmatically?

Product and product version : VC 2.0 , ESX Server 3.0.X and VI sdk2.5

Reply
0 Kudos
4 Replies
Dave_Mishchenko
Immortal
Immortal

Your post has been moved to the VI: VirtualCenter 2.x forum.

Dave Mishchenko

VMware Communities User Moderator

Reply
0 Kudos
atbnet
Expert
Expert

Is this the kind of info your after?

List all virtual switches and the port group information:



esxcfg-vswitch -l







Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 64 9 64 1500 vmnic2,vmnic0



PortGroup Name VLAN ID Used Ports Uplinks
Server Network 41 5 vmnic0,vmnic2






Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch1 64 6 64 1500 vmnic3,vmnic1



PortGroup Name VLAN ID Used Ports Uplinks
Service Console 35 1 vmnic1,vmnic3
VMkernel 35 1 vmnic1,vmnic3






Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch2 64 1 64 1500



PortGroup Name VLAN ID Used Ports Uplinks
Internal 0 0

Andy, VMware Certified Professional (VCP),

If you found this information useful please award points using the buttons at the top of the page accordingly.

Andy Barnes
VCP / VCA-DT / MCITP:EA / CCIA
Help, Guides and How Tos... www.VMadmin.co.uk

If you found this information useful please award points using the buttons at the top of the page accordingly.
deepakmits
Contributor
Contributor

Thanks alot for your response.

Yes, we're trying to retrieve exactly the same info programmatically.

Reply
0 Kudos
deepakmits
Contributor
Contributor

Closing the Question

Reply
0 Kudos