Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Vim Object Reference Not Found

$
0
0

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


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>