snmp

VMWare ESXi 4 = SNMP via RCLI

In VmWare ESXi 4, VMWare Inc has apparently restricted Remote Command Line Interface (RCLI) administration of the free version of ESXi. The write permission are not possible since we need to upgrade it to full licensed one. This simple tuto is to enable the snmp via rcli

The VSphere Client 4.0 cannot enable/configure snmp on the VmWare ESXi 4. I’ve found that we can enable/configure snmp on Vmware ESXi 4 through the RCLI (remote command line) that are available on Windows and Linux.

Download the RCLI application from the vmware site and install it.

After that, open the Vmware Vsphere CLI.
To start configure, type in the console(in this example, my ESXi IP is 192.168.117.116, destination is 192.168.117.115:

vicfg-snmp.pl –server 192.168.117.116 -c public -t 192.168.117.115@162/public

insert the esxi username and password.

To enable it type:

vicfg-snmp.pl –server 192.168.117.116 -E

To show config:

vicfg-snmp.pl –server 192.168.117.116 -s

To test configuration:

vicfg-snmp –server 192.168.117.116 -T

I have encountered issue with free licensed esxi since it gaves me this error in the first attempt. This is because the write permission has been disabled on the free version:

“Failed : fault.RestrictedVersion.summary”

But, there is a trick where we can write the configuration file:

Go to VMWare Vsphere Client -> Configuration -> Licensed Features -> Edit-> Change to evaluation mode, No License key (if u have not registered/no license, this shouldnt be a problem).

When you have change it, go back to RCLI and try again the first command. This should settle the read/write permission and you can set/configure snmp on Vmware esxi4.

p/s: if error still occur, try rebooting the hosts.

Example below are the configuration:
C:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl –server 192.168.117.116 -s
Enter username: root
Enter password:********
Current SNMP agent settings:
Enabled : 1
UDP port : 161

Communities :
public

Notification targets :
192.168.117.115@162/public
——————————————————————
then, try to snmpwalk from another host:

$snmpwalk -v1 -c public 192.168.117.116
SNMPv2-MIB::sysDescr.0 = STRING: VMware ESX 4.0.0 build-181792 VMware, Inc. x86_ 64
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.6876.4.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (15501613) 1 day, 19:03:36.13
SNMPv2-MIB::sysContact.0 = STRING: not set
SNMPv2-MIB::sysName.0 = STRING: VMserver.localdomain
SNMPv2-MIB::sysLocation.0 = STRING: not set
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
————-more————-

After we have finished setting up the snmp, we can insert back in the VMware VSphere Client our licensed that have been registered with the VMWare ESXi 4.

vmware-esx-snmp-trial
done.

By salawank on October 20, 2009 | Uncategorized | 15 comments
Tags: , ,

6 visitors online now
6 guests, 0 members
Max visitors today: 11 at 11:25 am GMT-8
This month: 11 at 09-09-2010 11:25 am GMT-8
This year: 21 at 03-24-2010 06:49 pm GMT-8
All time: 43 at 10-20-2009 08:17 am GMT-8

salawank is Digg proof thanks to caching by WP Super Cache