VMware - Skip VM templates

14 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":
continue
...


With this, VM templates will not be discovered.

Released Checks&Agents Version 2.4 Version 2.5 Suggested by: Ringo Hartmann Upvoted: 30 Sep, '24 Comments: 10

Comments: 10
OldestNewestMost likesFewest likes