Aug 1

ESXi doesn’t include a lot of the management functions that the licensed product carries (see my previous post on doing backups in ESXi) but most of those functions are already installed, just disabled.   Here is how to enable SNMP queries and traps on an ESXi server.

  1. Enable ssh on your server
  2. I’m assuming you have already licensed your server, we’re going to need to back that out so ssh to the server as root
  3. run the following commands
  4. mv /etc/vmware/vmware.lic /etc/vmware/vmware.lic.orig
    mv /etc/vmware/license.cfg /etc/vmware/license.cfg.orig
    services.sh restart

  5. That will temporarily put you back into an eval license, you will be disconnected from your vsphere client while the services restart
  6. Now you need access to the ESX remote command line. You can do that by either downloading and installing the appliance or you can install it locally on your machine.
  7. Configure SNMP for your environment. -c is the snmp community you want to set for queries and -t is the trap destination
  8. vicfg-snmp.pl –server 192.168.1.1 -c public -t 192.168.1.2@162/public

  9. enable snmp
  10. vicfg-snmp.pl –server 192.168.1.1 -E

  11. Test your new snmp config
  12. vicfg-snmp –server 192.168.1.1 -T

  13. and lastly, download the snmp MIBs for your management platform
  14. Now move your license keys back
  15. mv /etc/vmware/vmware.lic.orig /etc/vmware/vmware.lic
    mv /etc/vmware/license.cfg.orig /etc/vmware/license.cfg
    services.sh restart

And that's it, you have snmp queries and traps on your ESXi server now.

5 Responses

  1. jasyro Says:

    ” Here is how to enable SNMP queries and traps on an ESXi server.”
    You can read more?

  2. jason Says:

    Not following you, what’s the question?

  3. ESXiTech Says:

    Tried this on a server running ESXi 4.1u1 free edition. The vicfg-snmp.pl commands all fail with this error:

    Error connecting to server at ‘https://localhost/sdk/webService’: Perhaps host is not a vCenter or ESX server

    Are there additional steps on ESXi 4.1?

    Thanks.

  4. jason Says:

    nope, should work the same. I’ll try on a 4.1 machine that I have around here somewhere, but it should be identical.

  5. ESXiTech Says:

    Were you able to try this out on a 4.1 server?

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.