I've been having some issues recently with the vCenter plugin for vCO, specifically for one SDK Connection (I have three in total).
During my provisioning workflow, I try to convert a vCloud Director VM to a vCenter VM, using the vCenter plugin, so I can use the VIX plugin to perform some scripts in the VM.
However, when I try to do the conversion, the vCenter plugin isn't returning anything.
Script:
var arrVMs = new Array();
arrVMs = System.getModule("com.vmware.library.vc.vm").getAllVMsMatchingRegexp(VclVM.name); //VclVM is type vCloud:VM
var VcVM = arrVMs[0];
However, I don't get anything in arrVMs. I've tried doing it in a test workflow:
var arrVMs = new Array();
arrVMs = SDKConnection.getAllVirtualMachines(); //SDKconnection is type VC:SdkConnection
System.log("Number of VMs: " + arrVMs.length);
I ran it and I get "Number of VMs: 0" in the log.
I find this weird because I'm able to find all the VMs I need in the inventory view, it just doesn't work with scripts.
If I restart the vCO service through the configuration page, it DOES work temporarily, for a few minutes, then it goes back to this.
The SDK connection does have a large number of VMs (over 1200). Would that cause a memory issue? I even tried querying using xpath syntax (xpath:name[starts-with(.,'" + VM.name + "')]) so I wouldn't have the server return ALL the vms and then parse through them all, and I still got nothing.
Any ideas?