Hi,
I am trying to convert VCD vApps vm to vCenter vm trough orchestrator workflow by following code, 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 liste 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