Jumat, 29 April 2011

How to configure SNMP on Esxi 4.1

SNMP on ESxi 4.1
1. Enable ssh at Esxi server
2. SSH to Esxi server
3. edit file snmp.xml (don't forget backup before edit)
   # cp /etc/vmware/snmp.xml /etc/vmware/snmp.xml.org
   # vi /etc/vmware/snmp.xml


4. Download remote CLI here

5. Extract and install remote CLI at PC or NB :

   $ tar -zxvf VMware-vSphere-CLI-4.1.0-254719.i386.tar.gz  
   $ cd VMware-vSphere-CLI-4.1.0-254719.i386
   $ ./vmware-install.pl

6. Configure SNMP Esxi from CLI:

   $ cd /VMware-vSphere-CLI-4.1.0-254719.i386/bin
   $ sudo vicfg-snmp --server (ip_esxi_server) -p 161
   $ sudo vicfg-snmp --server (ip_esxi_server) -c communities
   $ sudo vicfg-snmp --server (ip_esxi_server) --enable
   $ sudo vicfg-snmp --server (ip_esxi_server) -t ip_trap@161/communities 
   $ sudo vicfg-snmp --server (ip_esxi_server) -s 
   $ sudo vicfg-snmp --server (ip_esxi_server) -T

-p = port
-c = communities
-E = enable
-t = target
-s = show config
-T = test config

7. if you get this error :

   Failed: A general system error occured. Load persistant store failed

Causes :
   File /etv/vmware/snmp.xml is corrupt or bad sytax

Solution :

1. Rename /etc/vmware/snmp.xml to snmp.xml.rev
        mv /etv/vmware/snmp.xml /etc/snmp.xml.rev

2. Create new snmp.xml file
       vi /etc/vmware/snmp.xml

3. Paste the following command :

  ciayo ;)


0 komentar: