Automation Central job to delete old snapshots is not removing snapshots from the expected set of VMs
search cancel

Automation Central job to delete old snapshots is not removing snapshots from the expected set of VMs

book

Article ID: 374123

calendar_today

Updated On:

Products

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

Issue/Introduction

  • A VCF Operations (previously Aria Operations) Automation Central job to remove 3 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 /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

 

Environment

VMware Aria Operations 8.x

VCF Operations 9.0.x

Cause

The logic for the criteria sets is incorrect.

Resolution

Tip: Use the Preview Scope button to verify the Filter Criteria is defined correctly.

Option 1 - verify a specific tag category does not exist on the VM

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

  • Define the 3 - Filter Criteria with a single criteria set with the following values:

    Tag     snapshot-no-delete     not exists

     

 

Option 2 - verify a specific tag value does not exist on the VM

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

  • Define the 3 - Filter Criteria with multiple criteria sets using the +ADD ANOTHER CRITERIA SET button to create OR logic between them

    Tag     lifecycle     is not     snapshot-no-delete
    OR
    Tag     lifecycle     not exists

    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

  • Define the 3 - Filter Criteria with a single criteria set using the +ADD button to create AND logic between the tests

    Properties     Disk Space|Snapshot|Age (Days)     is greater than     3.0
    AND
    Tag     Snapshot Retention     not exists
    AND
    Tag     Snapshots     not exists

     

Additional Information

Create Job from Automation Central

Create Job from Reclaim or Rightsizing