Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

set host advanced settings from vco

$
0
0

Hi,

 

I want to set host advanced options with vco, but i cannot get it to work.
I took the powershell code, that is quite easy, and tried it the same way in Orchestrator.

 

Powershell:
$option = New-Object VMware.Vim.OptionValue
$option.key = $tgtkey
$option.value = $tgtvalue
$optarr += $option
$optMgr.UpdateOptions($optarr)

 

 

vCO code snippet:     
var aoValues = new Array();
configuredValue = oTargetHost.configManager.advancedOption.queryOptions("NFS.MaxVolumes");
System.log("Configured value is: " + configuredValue[0].value + ", Key: " + configuredValue[0].key);      
configuredValue[0].value="256";
aoValues.push(configuredValue[0]);
oTargetHost.configManager.advancedOption.updateOptions(aoValues);


I also tried to create a new OptionValue, like this:

 

var myVcOptionValue = new VcOptionValue() ;
myVcOptionValue.key="NFS.MaxVolumes";
myVcOptionValue.value="256";
aoValues.push(myVcOptionValue);

 

 

Both result in the same error message:
InternalError: a parameter was not correct.

 

How can I make this work?


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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