Details
Solution
Use the vicfg-snmp command from the Remote CLI or vSphere CLI to enable this SNMP agent and configure trap destinations. Each time you specify a target with the vicfg-snmp command, the settings you specify overwrite all previously specified settings. To specify multiple targets, specify them in a single command, separated by commas.
-
Specify the communities and trap targets with the command:
vicfg-snmp.pl –server <hostname> –username <username> –password <password> -t <target hostname>@<port>/<community>
Note: Under ESX 4.0, you may need to use the -c <community> flag.
For example, to send SNMP traps from the host host.example.com to port 162 on target.example.com using the public community, use the command:
vicfg-snmp.pl –server host.example.com –username root –password password -t target.example.com@162/public
-
To enable the SNMP service, run the command:
vicfg-snmp.pl –server <hostname> –username <username> –password <password> –enable
-
(Optional) Send a test trap to verify that the agent is configured correctly with the command:
vicfg-snmp.pl –server <hostname> –username <username> –password <password> –test
The test trap generated is a warmStart trap.
source: http://kb.vmware.com/kb/1008065