How to get vcVm by vcacVm using vro

get vcVm by vcacVm

var sdkConnections = VcPlugin.allSdkConnections;
System.log(sdkConnections.length + " sdk Connections found...");
for each (var sdkConnection in sdkConnections) {
  try {
  vCenterVm = sdkConnection.searchIndex.findByUuid(null, vCACVm.vmUniqueID, true, false);
  } catch(e) {System.log("Error for SDK connection " + sdkConnection.name + " : " + e);}
  if (vCenterVm != null) {
  System.log("Resolved vCenter VM " + vCenterVm.name);
  return vCenterVm;
  break;
  }

}

Comments

Popular posts from this blog

Creating Snapshots for Unmanaged VMs in Aria Automation (vRealize Automation)

Bulk import security policies into Palo Alto Networks firewalls

Automating Tag Creation & Assignment to VMs with vRA + vRO