How to enable Remote Connection to vRA Postgres Database from Specific vDIM Hosts for Tenant Migration
search cancel

How to enable Remote Connection to vRA Postgres Database from Specific vDIM Hosts for Tenant Migration

book

Article ID: 341967

calendar_today

Updated On:

Products

VMware VMware Aria Suite

Issue/Introduction

This article provides information on how to enable  Remote Connection to vRA Postgres Database from Specific vDIM Hosts for Tenant Migration.

Environment

VMware vRealize Suite Lifecycle Manager 8.x
VMware Identity Manager 3.0

Resolution

Steps to enable Remote Connection to vRA Postgres Database:
  1. If the vIDM setup is cluster i.e more than one node in the cluster , All the vIDM should be able to access the Postgres Database on the vRA 7.5/7.6 Master Host Machine remotely.
Example: 
vIDM node 1 IP : 10.10.10.10
vIDM node 2 IP : 10.10.10.11
vIDM node 3 IP : 10.10.10.12
  • On vRA master Host Machine ( Example : [master] vRA-MasterHost), update the below and restart the Postgres service.
[master] vRA-MasterHost:~ # echo "host all all 10.10.10.10/32 trust" >> /var/vmware/vpostgres/current/pgdata/pg_hba.conf
[master] vRA-MasterHost:~ # echo "host all all 10.10.10.11/32 trust" >> /var/vmware/vpostgres/current/pgdata/pg_hba.conf
[master] vRA-MasterHost:~ # echo "host all all 10.10.10.12/32 trust" >> /var/vmware/vpostgres/current/pgdata/pg_hba.conf
  • Restart the vpostgres service, run the command:
[master] vRA-MasterHost:~ # /etc/init.d/vpostgres restart
Stopping VMware vPostgres service
Starting VMware vPostgres service
Last login: Thu Oct 9 12:24:33 UTC 2018 on pts/0
  1. If the vIDM setup is standalone i.e a single node , Only the vIDM node should be able to access the Postgres Database on the VRA 7.5/7.6 Master Host Machine remotely

Example :
vIDM node IP : 10.10.10.10

  • On vRA master Host Machine(Example : [master] vra-bmanthal-760ga) , update the below and restart the Postgres service.

[master] vRA-MasterHost:~ # echo "host all all 10.10.10.10/32 trust" >> /var/vmware/vpostgres/current/pgdata/pg_hba.conf

  • Restart the vpostgres service, run the command:

[master] vRA-MasterHost:~ # /etc/init.d/vpostgres restart

Stopping VMware vPostgres
Starting VMware vPostgres
Last login: Thu Oct 8 19:42:17 UTC 2020 on pts/1
  1. validating the steps 1 OR 2, check Remote Connection from vIDM hosts to Postgres database of vRA host
    Run the below database query from the vIDM hosts to get the list of Tenants from vRA Postgres Database , if the Query run Successfully and returns the list of Tenants , we have enabled the remote database connection successfully and we are good to Run the Tenant Migration.
    Example : /opt/vmware/vpostgres/current/bin/psql -U postgres -h vRA-MasterHost.domain.com -d vcac -At -c "select \"saas\".\"Organizations\".\"strOrganization\" from \"saas\".\"Organizations\";"
Query Result :
VSPHERE.LOCAL
TENANT1