Creating a host profile from an ESXi host results in “argument of type NoneType is not iterable” error message.


Here’s an interesting one – all of a sudden my hosts started showing as “Unknown” on Host Profile Compliance screen. Error message that I was presented with reads as – “Unexpected error checking compliance: argument of type NoneType is not iterable”. Screenshot to complete the picture:


Trying to create a new host profile from the affected host was not successful either with similar error message:

After some time had passed (and me trying to troubleshoot this issue of course..) I came to a conclusion that SNMP was at fault and the sole reason for errors on the host profile compliance screen. In particular snmp.xml file that sits in /etc/vmware was updated with incorrect information/formatting by a colleague of mine (don’t ask..) Not working snmp.xml file with areas of interest highlighted:


and a working counterpart that passes host profile compliance checks:


As you can see if you split the section into separate subsections called <communities></communities> and <port></port> this will not work in ESXi 5.5. Trick here is to include all info under <targets></targets> in this format:

<targets>ip_address_of_snmp_receiver@port_number community_name</targets>

which should have no negative impact on compliance checks.

So there you have it, working SNMP as well as host profiles!

Lesson learnt – don’t use outdated scripts to set SNMP values which worked on ESXi 4.x and 5.x, they might negative impact on the latest version of ESXi.

Leave a Reply

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