Travis Quinnelly bio photo

Travis Quinnelly

vTechify is my home to talk about all things virtualization. Here I share things learned in lab and production environments both for my documentation and others to stumble upon for reference.

Twitter Google+ LinkedIn Instagram Github Last.fm

A few days ago an issue arose that caused me to not be able to vMotion to and from a particular host. Not only would typical vMotions not work, but storage vMotion would also fail at around 33%. Each of these errors hinted to the file system being full because the host could not update or create log or journal files.

After poking around, I found that the /var/spool/snmp directory had thousands, upon thousands of files in it. SNMPd was running and the host had all the valid settings necessary for it to be able to send traps to the SNMP server, yet it was queueing them up in this directory.

Deleting them solved the issue, but only temporarily…

I then found KB 2040707 which explains that this issue is a known issue affecting ESXi 5.1.

Here’s the work around:

  1. Find out if your directory is full of .trp files
ls /var/spool/snmp | wc -l
  1. Delete said .trp files
  2. Backup the snmp.xml file
mv /etc/vmware/snmp.xml /etc/vmware/snmp.xml.bak
  1. Create a new snmp.xml file and place it in the /etc/vmware directory Below is the contents of the file needed:
<?xml version="1.0" encoding="ISO-8859-1"?>
<config>
<snmpSettings><enable>false</enable><port>161</port><syscontact></syscontact><syslocation></syslocation>
<EnvEventSource>indications</EnvEventSource><communities></communities><loglevel>info</loglevel><authProtocol></authProtocol><privProtocol></privProtocol></snmpSettings>
</config>
  1. Reconfigure SNMP on the host by running the command:
esxcli system snmp set --enable=true