VMware Cloud Community
thakala
Hot Shot
Hot Shot
Jump to solution

DVS config backup

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);

Tomi http://v-reality.info
0 Kudos
1 Solution

Accepted Solutions
thakala
Hot Shot
Hot Shot
Jump to solution

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.

Tomi http://v-reality.info

View solution in original post

0 Kudos
7 Replies
thakala
Hot Shot
Hot Shot
Jump to solution

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?

Tomi http://v-reality.info
0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

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.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
thakala
Hot Shot
Hot Shot
Jump to solution

Thanks!

I have SR # 14457828503 open regarding this issue.

Tomi http://v-reality.info
0 Kudos
thakala
Hot Shot
Hot Shot
Jump to solution

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.

Tomi http://v-reality.info
0 Kudos
probo
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
probo
Enthusiast
Enthusiast
Jump to solution

To test I created a workflow with a scriptable task that just does the following

var myVcTask = new VcTask() ;

This still throws an error.

0 Kudos
thakala
Hot Shot
Hot Shot
Jump to solution

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.

Tomi http://v-reality.info
0 Kudos