This post will walk through defining datacenter locations for VMware vRealize Automation 7.2. The primary two use cases for additional datacenter locations are to allow users to select a datacenter for service deployments, or for the administrator to specify a set datacenter when configuring a blueprint. We will cover both scenarios below.
Adding Datacenter Locations
Datacenter locations are defined in an xml file on the IaaS server(s). If you have multiple IaaS servers then we must perform the change on each server individually, and disable it from the load balancing configuration before commencing. If you are only using a single IaaS server, such as in a lab environment, then obviously this is not necessary. For vRA installations using NSX as a load balancer you can follow the brief steps below, otherwise refer to the documentation for your load balancing solution.
- Log into the vSphere web client as a user with NSX administrative privileges, select Networking & Security.
- Click NSX Edges and then double click the NSX Edge containing the load balancing configuration.
- From the Manage tab select Load Balancer and Pools. Select the pool configured for the IaaS web servers and click Edit.
- Select one of the nodes in the Members table and click the edit symbol. Untick Enable Member and click Ok.
- The server is now disabled from the load balancing configuration and you can go ahead and make the change outlined below. Once complete enable the member and disable the next node, repeating the process for each member of the pool.
When the IaaS server node has been disabled in the IaaS Web load balancing pool (if applicable) navigate to C:\Program Files(x86)\VMware\vCAC\Server\Website\XmlData, or replace with the installation directory as appropriate. Edit the DataCenterLocations.xml file, entering your datacenter names in the CustomDataType body, in place of London and Boston.
Save and close the file, then restart the VMware vCloud Automation Center Service.
If you removed the IaaS from the load balancer remember to add it back in, you’ll then need to repeat the process for each instance. Once the change has been made on each IaaS node we can assign the locations to compute resources.
Log into the vRA tenant portal as a fabric administrator, you may need to clear your browser history to show the updated datacenters in the xml file we changed earlier. Open the Infrastructure tab and browse to Compute Resources, Compute Resources. Move the mouse pointer over the compute resource and click Edit, from the drop-down Location menu select the site to associate with the compute resource, click Ok. Repeat this for each compute resource requiring an assigned datacenter location.
Selecting Datacenter Locations
Now that we have available locations assigned to our compute resource we can specify this using a blueprint. Log into the vRA tenant portal as a tenant administrator, from the Design tab select Blueprints. Select the blueprint to edit and click Edit. The main 2 options we are concerned with for datacenter locations are:
- Allow the user to select the datacenter location.
- From the General tab select the Display location on request tickbox. Click Save and Finish. Assuming the blueprint is published with appropriate catalog entitlements then when the user requests the catalog item they can select from the drop-down Location menu in the vSphere machine General tab.
- Set the datacenter location in the blueprint, and do not allow the user to change the location. This option is useful for when the administrator wants to set where certain blueprints are deployed.
- Check the setting mentioned above is unticked. Navigate to the Properties tab and select Custom Properties. Click New to add a new property. In the Name field enter Vrm.DataCenter.Location, in the Value field enter the site name, matching one of the site names we added previously, click Ok. Click Save and Finish. When the user requests the catalog item it will be deployed at the datacenter defined by the blueprint custom property.