Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180259

Facing issue while try to set affinity rule through VCO workflow

$
0
0

Facing issue while try to set affinity rule through VCO workflow I am try to write VCO workflow to set cluster level affinity rule but it throws  error Cannot convert ClusterComputeResource'mycluster' to com.vmware.vim.vi4.ClusterConfigSpec (Workflow:Create vm-vm affinity rule / Scriptable task (item1)#19) My workflow script is var rule = new VcClusterAntiAffinityRuleSpec(); rule.key = -30; rule.enabled = true; rule.name = ruleName; rule.userCreated = true; rule.vm = vms; var clusterSpecRules = new Array(); var clusterSpecRule = new VcClusterRuleSpec(); clusterSpecRule.operation = VcArrayUpdateOperation.add; clusterSpecRule.info = rule; clusterSpecRules.push(clusterSpecRule); var clusterSpec = new VcClusterConfigSpec(); clusterSpec.rulesSpec = clusterSpecRules; //var m = computeCluster.vimHost //spec = task = computeCluster.reconfigureCluster_Task(computeCluster, spec , true); Note: In the above code these are the input parameter computeCluster is input parameter of type VC:clusterComputeResource ruleName  is input parameter of type String --AVR


Viewing all articles
Browse latest Browse all 180259

Trending Articles



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