create_vm
' stepError: Unknown CPI error 'Unknown' with message 'The operation is not allowed in the current state of the host.' in 'create_vm'
--cpi
flag, the following errors will be presented:Error running task 'VirtualMachine.clone'. Failed with message 'The operation is not allowed in the current state of the host.' and fault message ''.
Error in creating vm: The operation is not allowed in the current state of the host
This problem occurs due to connectivity failures from vCenter to the hostd daemon on the ESXi host on which the backing Bosh Stemcell is registered. While there are numerous causes for host to vCenter connectivity, KB 318013 provides one example of an issue that can impact hostd in a way that leaves the host in a state that doesn't appear degraded in vCenter.
NOTE: This condition may occur when the host in the vSphere cluster hosting the stemcell required for deployment is placed in Maintenance Mode. Ensure all hosts in the vSphere cluster are NOT in Maintenance Mode to avoid this error.
bosh task <TASK_ID> --cpi | grep "stemcell"