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?