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.
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
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
This is a good document explaining the various commands and options you can do with vimsh
http://knowledge.xtravirt.com/white-papers/scripting.html