When deploying the Ops Manager Director via Ops Manager, it always fails during the uploading of the env.json file to datastore.
Error Message:
The error log entries from the Ops Manager are shown below:
/home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/file_provider.rb:38:in `block in upload_file': Could not upload file 'https://169.52.34.180/folder/vm-abdf114c-4120-4dde-8905-b354fbaebe9c/env.json?dcPath=DC_NewDatacenter&dsName=CloudPOC-2', received status code '400' (RuntimeError) from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:9:in `block in retry_block' from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:7:in `times' from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/retry_block.rb:7:in `retry_block' from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi-2.2.0/lib/cloud/vsphere/file_provider.rb:28:in `upload_file' from /home/tempest-web/tempest/web/vendor/bundle/ruby/2.2.0/gems/bosh_vsphere_cpi- ... Exited with 1.
The error messages from vCenter logs are the following:
2016-03-01T17:52:22.514+08:00 [02924 warning 'HTTP server'] Vmacore::Http::UnimplementedRequestHandler: HTTP method PUT not supported for URI /folder/vm-533abdc7-1c34-42c8-8273-68fbab222bd4/env.json?dcPath=datacentername&dsName=datastorename
The BOSH vSphere CPI uploads files to vSphere via REST API https://<vcenter IP>/folder/<path on datastore>/<filename>?dcPath=<datacenter name>&dsName=<datastore name>
The upload files cannot be uploaded because vCenter was not configured to enable HTTP datastore access.
Follow these steps to resolve this issue: