I have created a workflow that successfully deploys a new datacenter, then a cluster. Next it should add a host that is currently unmanaged by vCenter and is in maintenance mode. However, the workflow 'Add Host To Cluster' always fails with the following error (both directly and when used in my workflow):
[2017-09-27 17:46:24.407] [E] (com.vmware.library.vc.basic/vim3WaitTaskEnd) Error in (Dynamic Script Module name : vim3WaitTaskEnd#20) Task 'addHost' error: The operation is not supported on the object.
[2017-09-27 17:46:24.426] [E] Workflow execution stack:
***
item: 'Add host to cluster/item0', state: 'failed', business state: 'null', exception: 'Task 'addHost' error: The operation is not supported on the object. (Dynamic Script Module name : vim3WaitTaskEnd#20)'
workflow: 'Add host to cluster' (BD8080808080808080808080808080804EC180800122528313869552e41805bb1)
| 'attribute': name=task type=VC:Task value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:task-9563'&dunesName='VC:Task'
| 'attribute': name=progress type=boolean value=false
| 'attribute': name=pollRate type=number value=1.0
| 'input': name=cluster type=VC:ClusterComputeResource value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:domain-c766'&dunesName='VC:ClusterComputeResource'
| 'input': name=asConnected type=boolean value=true
| 'input': name=resourcePool type=VC:ResourcePool value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:resgroup-767'&dunesName='VC:ResourcePool'
| 'input': name=force type=boolean value=true
| 'input': name=hostName type=string value=host01.mylab.lan
| 'input': name=port type=number value=443
| 'input': name=userName type=string value=root
| 'input': name=password type=SecureString value=__NULL__
| 'input': name=vmFolder type=VC:VmFolder value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:group-v768'&dunesName='VC:VmFolder'
| 'input': name=license type=string value=
| 'output': name=newHost type=VC:HostSystem value=null
*** End of execution stack.
If I use the same details, I can successfully add the the host in the vSphere webclient using the same details as I use in the workflow.
Anyone have any ideas?