Hi Rajesh,
I am facing similar issue in orchestrator workflow, when I am trying to convert VCD vApps vm to vCenter vm . When I try to run the getVMVimRef() function (off a VM) it throw error “Vim Object Reference Not Found”.
Any ideas as to what could cause a VM to not have a Vim reference?
My workflow code is as listed below
var vcVms = new Array();
System.log("Vms passed in: " + vms.length);
for (var i in vms) {
var moref = vms[i].getVMVimRef().moRef;
var XPath = "xpath:id='"+ moref +"'";
var VMs = VcPlugin.getAllVirtualMachines(null, XPath);
var vm = VMs[0];
var vmName = vm.name;
vcVms[i] = vm;
}
--AVR