VMware Cloud Community
RattusXanthurus
Contributor
Contributor
Jump to solution

finding certain settings from the command line

Hi,

Does anyone know a way to look up the following settings using the esxcfg* command line commands?

Promiscuous Mode setting on all Port Groups

Mac Address Changes setting (reject/accept)

Forged Transmissions setting (reject/accept)

We've had problems with the VI-Perl API trashing a certain essential Perl CPAN module (http://communities.vmware.com/thread/186321) so I'm hoping to avoid having to install that on all our ESX servers to be able to use a script to make sure those settings are set the way we want.

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

This can be accomplished using vimsh

@ the vSwitch level:

[root@himalaya backup_test]# vmware-vim-cmd hostsvc/net/vswitch_info | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'
      name = "vSwitch0",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch1",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch5",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,

@ the portgroup level:

vmware-vim-cmd hostsvc/net/config | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'

Also, you shouldn't install any perl modules on the ESX host to use the VI API, they're already exposed using WSDL.

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

--William

VMware ESX/ESXi scripts and resources at:

View solution in original post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager
Jump to solution

This can be accomplished using vimsh

@ the vSwitch level:

[root@himalaya backup_test]# vmware-vim-cmd hostsvc/net/vswitch_info | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'
      name = "vSwitch0",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch1",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch5",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,

@ the portgroup level:

vmware-vim-cmd hostsvc/net/config | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'

Also, you shouldn't install any perl modules on the ESX host to use the VI API, they're already exposed using WSDL.

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

--William

VMware ESX/ESXi scripts and resources at:

0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

This is a good document explaining the various commands and options you can do with vimsh

http://knowledge.xtravirt.com/white-papers/scripting.html

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos