Filtering VMs by Tag Criteria in Automation Central Snapshot Deletion Job - VMware Aria Operations.
search cancel

Filtering VMs by Tag Criteria in Automation Central Snapshot Deletion Job - VMware Aria Operations.

book

Article ID: 374123

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite) VCF Operations

Issue/Introduction

This article explains how to correctly configure Automation Central jobs to delete old snapshots while excluding specific Virtual Machines (VMs) using filter criteria. Incorrect filter configuration is the most common cause for unexpected snapshot deletion or job failure.

  • A VCF Operations (previously Aria Operations) Automation Central job to remove x day old snapshots is not working correctly.  
  • Attempting to configure a job to ignore VMs that have a specific tag or tag category. For example:
    • tag category='Snapshot Retention' with tag value='Snapshot Retention'
    • or tag category='Snapshots' with tag value:'Snapshot Retention' 
    • This is expected to eliminate all VMs or only wants to delete the VMs with the tag.

The "Preview Scope" returns no Virtual Machines (VMs) because the exclusion filter logic (does not contain) fails to evaluate assets that lack the specified tag category completely.

The /storage/log/vcops/log/analytics-[uuid].log contains entries like

[com.vmware.vcops.analytics.action.schedule.ActionScheduler.launchAction] - There are no VMs to run under the custom job

ACTION_NEVER_STARTED

There are no vms with reclaimable snapshot

Environment

  • VMware Aria Operations 8.x
  • VCF Operations 9.x

Cause

The filter evaluation logic inside the criteria sets handles missing properties incorrectly, leading to unexpected asset exclusion.

Resolution

Use the Preview Scope button to verify the Filter Criteria is defined correctly.  The Scope will provide each VM that will be affected by the Reclaim Job.  Any additional criteria will filter additional VM's into the scope of the Reclaim Job.

Option 1 - verify a specific tag category does not exist

Example: Delete aged snapshots unless the VM has a tag category of snapshot-no-delete

  1. Define the 3 - Filter Criteria with a single criteria set with the following values:
  2. Select Tag > snapshot-no-delete > not exists

Option 2 - verify a specific tag value does not exist (using OR logic)

Example: Delete aged snapshots unless the VM does not have a tag value of snapshot-no-delete in the tag category called lifecycle

  1. Define the Filter Criteria with multiple criteria sets using the +ADD ANOTHER CRITERIA SET button to create OR logic.
  2. Set the first condition: Tag > lifecycle > is not > snapshot-no-delete OR Tag lifecycle not exists
  3. Note: VMs that do not have a tag with the tag category of lifecycle will not match the first test



Option 3 - use multiple criteria in a single criteria set with AND logic

Example: Delete snapshots older than 3 days on all VMs that do not have the Snapshot Retention or Snapshots tag categories

  1. Define the 3 - Filter Criteria with a single criteria set using the +ADD button to create AND logic between the tests
  2. Properties Disk Space|Snapshot|Age (Days) is greater than 3.0
  3. AND Tag Snapshot Retention not exists AND Tag Snapshots not exists

Additional Information