Special characters in the community string for SNMP traps are not retained
search cancel

Special characters in the community string for SNMP traps are not retained


Article ID: 306736


Updated On:


VMware vCenter Server VMware vSphere ESXi


  • When configuring an ESX 4.0 or 4.1 host for SNMP traps with a community string containing special characters, such as a hyphen or an ampersand, the string is truncated.
  • Characters including and beyond the special characters are deleted.
  • The command appears to complete successfully.
  • You are using vSphere Management Assistant (vMA) 4.0.0 or vSphere CLI 4.0.
  • If you try to edit the snmp.conf file manually, you see the error:

    Failed : A general system error occurred: Load persistent store failed


VMware vSphere CLI 4.0
VMware vSphere Management Assistant 4.0.x
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Embedded
VMware ESXi 4.0.x Embedded
VMware ESXi 4.1.x Installable
VMware ESX 4.1.x
VMware ESX 4.0.x


The issue with hyphen (-) character is resolved in vMA 4.1 and vCLI 4.1. To download the latest version of vMA and vCLI, see the VMware Download Center.
To workaround this issue when you do not want to upgrade or if the issue is related to the ampersand (&) or at sign (@) character, try modifying the perl script or use a community string without special characters.
To modify the perl script:
  1. Search for the line similar to:

    if ($item =~ /(\w[\w\.-]*)(@(\d+)){0,1}\/(\w+)/) {

    Note: This is usually line 156 or 157, depending on the version.

  2. Replace this line with:

    if ($item =~ /(\w[\w\d\.:-]*)(@(\d+)){0,1}\/([\x21-\x7e]+)/) {

Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box
SNMP 陷阱的团体字符串中的特殊字符不会保留