result = Server.findAllForType("VC:VirtualMachine", "xpath:name='" + VM_name + "'");The vCenter caching behaviour has changed through these versions to help scalability and prevent OOM errors.
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: