vCloud: “Failed to Start” after changing “Public Addresses” for API
This is one post of category "QuickTip" and "Lesson learned"… So I was getting hands on VMware vCloud in my HomeLab and admins who have gone through the administrative-side might know the Public Addresses
functionality (see docs).
However to note: Don’t ever think of changing the API-part to something like https://vcd.domain.tld/api
, as things go south:
If set, API requests go to https://vcd.domain.tld/api/api
, making the API requests fail with 404 - Not found
, rendering the Web UI unuseable and constantly failing with Failed to Start
:
As the Web UI was not available, I couldn’t change the setting back to revive the Web UI. After some investigation however, I found a way working around this specific issue without re-deploying or restoring a backup.
On the vCloud Linux appliance there is a cell-management
utility, allowing you to change various settings via CLI.
To retrieve the current REST-API settings:
root@vcd [ ~ ]# /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.baseUri -l
Property "restapi.baseUri" has value "https://vcd.domain.tld/api"
root@vcd [ ~ ]# /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.baseHttpUri -l
Property "restapi.baseHttpUri" has value "http://vcd.domain.tld/api"
With the same utility the same configuration options can be adjusted:
/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.baseUri -v "https://vcd.domain.tld"
/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.baseHttpUri -v "https://vcd.domain.tld"
Now the vCloud Web UI is accessible again and lesson learned.