Enable and Configure SNMP on ESXi VMWARE 6.7

SNMP is not enabled by default on ESXi VMWARE server so you need to enable and configure it before start service snmp on vsphere.

If you try to start SNMP for ESXi on vSphere you will probably get this error:

An error occurred during host configuration

To Start SNMP you need to

open vSphere  > select the esxi involved > Configure > Services

Then select SNMP and Click to Start

snmp vmware esxi error

As you can see we get an error.
The reason is that we have to enable and configure SNMP on VMWare ESXi before start it from vsphere.

To do it we need SSH access to ESXi. and we need to run the following commands:

Current SNMP Status: esxcli system snmp get

[root@host01:~] esxcli system snmp get
   Authentication:
   Communities:
   Enable: false
   Engineid:
   Hwsrc: indications
   Largestorage: true
   Loglevel: info
   Notraps:
   Port: 161
   Privacy:
   Remoteusers:
   Syscontact:
   Syslocation:
   Targets:
   Users:
   V3targets:

As you can see SNMP is Disabled and Communities is not configure. So we need the following commands:

Enable SNMP: esxcli system snmp set –enable true
Configure Community SNMP: esxcli system snmp set –communities public

[root@host01:~] esxcli system snmp set --enable true
[root@host01:~] esxcli system snmp set --communities public
[root@host01:~] esxcli system snmp get
   Authentication:
   Communities: public
   Enable: true
   Engineid: 00000063000000a100000000
   Hwsrc: indications
   Largestorage: true
   Loglevel: info
   Notraps:
   Port: 161
   Privacy:
   Remoteusers:
   Syscontact:
   Syslocation:
   Targets:
   Users:
   V3targets:
[root@host01:~]

Now you can start SNMP from vsphere without error:

snmp vmware esxi running

In case you need to disable SNMP again:

Disable SNMP: esxcli system snmp set –disable true

 

Environment

I tested this configuration on VMWARE vSphere 6.7

Links and Official Documentation

Official Documentation

 

Disclaimer

It’s not my responsibility if, following this tutorial, you destroy your server, loose your data, damage your company, exterminate whales in the ocean or you will have any issue for yourself or other. Take care.  

One Comment

  1. Pingback: Habilitar SNMP no ESXi 6.5 – Blog do Abreu – TI/Experiências/Desafios etc

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.