Server.findAllForType() function in Aria Orchestrator workflows fails to find existing VM and returns null
search cancel

Server.findAllForType() function in Aria Orchestrator workflows fails to find existing VM and returns null

book

Article ID: 438935

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • Using Orchestrator VC plugin 8.2.x versions, vRO intermittently fails to find existing template objects in the inventory, even though they are present and visible when searched manually.
  • The following is example code which may return null instead of finding the VM:
    • result = Server.findAllForType("VC:VirtualMachine", "xpath:name='" + VM_name + "'");
  • In earlier versions, this was expected to find the VM consistently

Environment

  • VMware Aria Orchestrator 8.18.1 including patched versions
  • VMware Aria Orchestrator vCenter plugin 8.2.x 

Cause

The vCenter caching behaviour has changed through these versions to help scalability and prevent OOM errors.

Resolution

It is recommended to use the PropertyCollector, which the workflow "Get virtual machines by name" found in "Library > vCenter > Virtual Machine management > Basic" makes use of.

Incorporate this workflow as a stage in your workflow or examine its code to replicate this behaviour within another workflow.

 

More information: