VMware - Skip VM templates

9 votes

The vSphere Agent discovers VM templates and generates a warning service for each because templates are always powered off. VM templates should be skipped during discovery.

Similar to placeholder VMs and passive fault tolerance VMs, the vSphere Agent can also identify and skip VM templates by using the property "config.template". It already retrieves that value from vSphere API but does not use it.

Patch fetch_virtual_machines() to identify and completely skip templates, like so:

def fetch_virtual_machines(...):
for entry in elements:
if vm_data.get("config.template") == "true":

With this, VM templates will not be discovered.

Under consideration Checks&Agents Suggested by: Ringo Hartmann Upvoted: 20 Nov Comments: 7

Comments: 7