Hi,
I try to set the restart priority for a VM in a cluster. I worked along the
to create this script:var myVcClusterDasConfigInfo = new VcClusterDasConfigInfo() ; var myVcClusterDasVmConfigSpec = new VcClusterDasVmConfigSpec() ; myVcClusterDasVmConfigSpec.operation = VcArrayUpdateOperation.add; var myVcClusterDasVmConfigInfo = new VcClusterDasVmConfigInfo() ; myVcClusterDasVmConfigInfo.key = VM; myVcClusterDasVmConfigInfo.restartPriority = VcDasVmPriority.high; myVcClusterDasVmConfigSpec.info = myVcClusterDasVmConfigInfo; var myVcClusterDasVmConfigSpecArray = new Array() ; myVcClusterDasVmConfigSpecArray.push( myVcClusterDasVmConfigSpec ); var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ; myVcClusterConfigSpecEx.dasConfig = myVcClusterDasConfigInfo; myVcClusterConfigSpecEx.dasVmConfigSpec = myVcClusterDasVmConfigSpecArray; Cluster.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );
Where Cluster and VM are objects from the WF input.
The scripts runs thought, however in VC I get the error "The setting of {entry.@enum.InvalidDasConfigArgument.EntryForInvalidArgument} is invalid for cluster"
It is properly simple....but I just cant work it out.
Thanks guys