Hello Fellows,
I am banging my head against a wall here with trying to figure out how to export DVS config using vSphere API from VCO. Calling dVSManagerExportEntity_Task method results in nothing, I suspect my selectionSet may not be correct and this is why task is not being executed. Below is my JavaScript which I am working with at the moment, any ideas what I might be doing wrong with selectionSets or
dVSManagerExportEntity_Task in general?
var dvsManager = sdkConnection.dvSwitchManager;
var dvsConfigTarget = dvsManager.queryDvsConfigTarget(host, dvs);
var dVPortgroupSelection = new VcDVPortgroupSelection();
dVPortgroupSelection.dvsUuid = dvsConfigTarget.distributedVirtualSwitch[0].switchUuid;
dVPortgroupSelection.portgroupKey = new Array();
var selectionSet = new Array();
selectionSet.push(dVPortgroupSelection);
task = dvsManager.dVSManagerExportEntity_Task(selectionSet);
I can confirm that this is/was a bug in vCenter Server plugin for VCO 5.5. This issue is fixed in vCenter Server plugin build 5.5.1.1730087 which I received today from VMware support.
I set VCO logging level to debug and noticed that dVSManagerExportEntity_Task method throws an VimFault, what ever that might be..
[WorkflowExecutorPool-Thread-80] DEBUG {x@x:Backup vDS config:11d805e8-e1e7-4303-94ec-ce6ed4a552d0:ff80808144fa54d70144ff21c7ac03a0} [WrappedJavaMethod] Calling method : public com.vmware.vmo.plugin.vi4.model.VimTask com.vmware.vmo.plugin.vi4.model.VimDistributedVirtualSwitchManager.dVSManagerExportEntity_Task(com.vmware.vim.vi4.SelectionSet[]) throws com.vmware.vim.vi4.VimFault,com.vmware.vim.vi4.RuntimeFault,org.apache.axis.AxisFault
Could this be bug in VCO 5.5.1 vCenter Server plugin?
Hmm.. I tried similar in my lab and was unable to get a task object from the method.. I have passed this thead on to our internal community to see if anyone can get this figured out/resolved.
Thanks!
I have SR # 14457828503 open regarding this issue.
I can confirm that this is/was a bug in vCenter Server plugin for VCO 5.5. This issue is fixed in vCenter Server plugin build 5.5.1.1730087 which I received today from VMware support.
Does this impact VCO 5.1? I'm running 5.1.2 with the latest update and I'm seeing a similar result when I try and run a task:
2014-07-08 01:13:24.722+0000 DEBUG [DynamicFunction] End action (DynamicFunction) 'org.didata.vc.vm/applyStorageDRSRecommendation'
2014-07-08 01:13:24.723+0000 INFO [SCRIPTING_LOG] Unable to create object : VcTask : com.vmware.vmo.plugin.vi4.model.VimTask
2014-07-08 01:13:24.724+0000 DEBUG [WorkflowScriptRunner] Execute exception
org.mozilla.javascript.EvaluatorException: Unable to create object : VcTask : com.vmware.vmo.plugin.vi4.model.VimTask
To test I created a workflow with a scriptable task that just does the following
var myVcTask = new VcTask() ;
This still throws an error.
Yes, this issue is in vCenter Server plugin shipped with VCO 5.1.
I have not yet tested publicly released vCenter Server plugin version 5.5.2-1869849 if this bug is fixed in it, the one I got from VMware support still had bug in data it received from vCenter Server. DVS config backup data should be uuencoded string but instead of that I got garbage.