We have recently updated vCloud Director from 10.1 to 10.2 and when we view Organization VDCs, the Site name is listed as: ‘ Site name undefined (Site ID: e228c64d-b92e-4c9f-9bf8-f5e8b2680309)’
To resolve this issue we followed VMware’s KB https://kb.vmware.com/s/article/79349 which describes the cause of the problem and how to fix it.
Apply Fix using Postman
Install and access Postman
- Download Postman from https://www.getpostman.com/
- Open Postman application and select the + to open a new request
Configure Basic Authentication
- In the new Untitled Request window, select the Authorization panel
- Change TYPE to Basic Auth
- Enter a username and password: username@system
Get vCloud API Supported Version
- Make an API versions request to VMware Cloud Director to obtain the VMware Cloud Director API login URL. This request has the following form:
Example GET http://vcloud.example.com/api/versions
Scroll down to the bottom of the body and view the available API versions. We used version=33.0 to resolve our issue
Configure Version Header
- Go to Headers Tab and enter the following values:
- KEY: Accept
- VALUE: application/*;version=33.0
Add vCloud Authorization and Access Token headers
- To generate the headers, send the following request
Example POST http://vcloud.example.com/api/sessions
- Copy two keys and values from the response headers and paste then into the request header
- Keys and values from response header
- x-vcloud-authorization
- X-VMWARE-VCLOUD-ACCESS-TOKEN
- Keys and values from response header
Paste the the keys and values as follow:
Use Bearer Token for authentication
- Copy the value of X-VMWARE-VCLOUD-ACCESS-TOKEN
- Go to Authorization
- TYPE: Bearer Token
- Paste Value of X-VMWARE-VCLOUD-ACCESS-TOKEN in Token text area
Change the Site name of a Cloud Director instance
Procedure
- Login as System Administrator following the steps detailed before
- Perform a GET against the localAssociationData URL for this Cloud Director instance:
Request:
GET https://cloud.example.com/api/site/associations/localAssociationData
Request Headers:
Accept: application/*+xml;version=33.0;multisite=global
Authorization: Bearer eyJ…Adw
- In the response you will find a href URL for this Cloud Director Site similar to the following:
Link rel="edit" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+xml"/>
- Perform a GET Request against the href URL from step 3. to retrieve the configuration including the current Site name:
Request:
GET https://cloud.example.com/api/site/associations/e228c64d-b92e-4c9f-9bf8-f5e8b2680309
Request Headers:
Accept: application/*+xml;version=33.0;multisite=global
Authorization: Bearer eyJ…Adw
In the XML response you will see a <SiteName> entry with the current setting similar to the following:
<ns5:SiteName>Site name undefined (Site ID: 9dcbcd04-4e80-42e3-a91f-82daa0962aef)</ns5:SiteName>
5. To change the Site name to the desired friendly name, edit the XML response retrieved before and change the value address in the <SiteName> section to the desired value:
<ns5:SiteName>New Zealand Site 1</ns5:SiteName>
6. Send the entire XML with the new Site name back to the href URL used in step 4. to retrieve the current setting
Request:
PUT https://cloud.example.com/api/site/associations/e228c64d-b92e-4c9f-9bf8-f5e8b2680309
Request Headers:
Accept: application/*+xml;version=33.0;multisite=global
Authorization: Bearer eyJ…Adw
Content-Type: application/*+xml
Request Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns5:SiteAssociationMember xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns5="http://www.vmware.com/vcloud/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ns9="http://www.vmware.com/vcloud/versions" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+xml">
<ns5:Link rel="edit" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+xml"/>
<ns5:Link rel="edit" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+json"/>
<ns5:Link rel="remove" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+xml"/>
<ns5:Link rel="remove" href="https://bakingclouds.cloud.local/api/site/associations/9dcbcd04-4e80-42e3-a91f-82daa0962aef" type="application/vnd.vmware.admin.siteAssociation+json"/>
<ns5:Link rel="up" href="https://bakingclouds.cloud.local/api/site/associations" type="application/vnd.vmware.admin.siteAssociations+xml"/>
<ns5:Link rel="up" href="https://bakingclouds.cloud.local/api/site/associations" type="application/vnd.vmware.admin.siteAssociations+json"/>
<ns5:RestEndpoint>https://bakingclouds.cloud.local</ns5:RestEndpoint>
<ns5:BaseUiEndpoint>https://bakingclouds.cloud.local</ns5:BaseUiEndpoint>
<ns5:SiteId>urn:vcloud:site:9dcbcd04-4e80-42e3-a91f-82daa0962aef</ns5:SiteId>
<ns5:SiteName>New Zealand Site 1</ns5:SiteName>
</ns5:SiteAssociationMember>
7. In the Cloud Director UI when logged in a System Administrator you should see an Updated Site task. Confirm that this task shows a Succeeded status
8. Reload the Cloud Director UI to confirm that the Site name has changed as desired for example when viewing Organizations or Organization VDCs.