In This Article discuss about Configure External Access to vCloud Director Database. Below Procedure defines access vCloud director database from PGAdmin4 GUI tool.
A VMware Cloud Director deployment based on VMware Cloud Director appliances can replace your current VMware Cloud Director environment that uses an external PostgreSQL database.
PGAdmin 4 simplifies creating, maintaining and using database objects through a powerful graphical interface.
Source is windows machines (172.20.100.6) which pgAdmin 4 is installed. Destination is primary vcloud director cell.
Source IP: 172.20.100.6 running with pgAdmin4 default port is 5432.
From Windows Machines PGAdmin 4 GUI mode need to access vCloud director database.
Procedure Configure External Access to vCloud Director Database:
Below is the procedure to access to the VMware Cloud Director Database from windows machine using PGAdmin4 GUI tool.
- Login as a root user into the vCloud Director primary cell.
Verify VMware Cloud Director database name as mentioned below path as parameter database.username= “XXX”
cat /opt/vmware/vcloud-director/etc/global.properties
NOTE: IN my scenario database.username= “vcloud”
- Now Navigate to the database directory as mentioned below path and Copy README file
/opt/vmware/appliance/etc/pg_hba.d
In the README file, you will find the following information:
Create a new file vi postgres and append the file with below shown entry.
root@vcloudcell1 [ /opt/vmware/appliance/etc/pg_hba.d ]# cat postgres host all all 172.20.100.6/32 md5
Now change the permissions and ownership to the new file (postgres)
chown vcloud:vcloud postgres chmod 777 postgres
- Appended newly added IP address is to the config file updated pg_hba.conf file
"/var/vmware/vpostgres/10/pgdata/pg_hba.conf" # TYPE DATABASE USER ADDRESS METHOD host all all 172.20.100.6/32 md5
Check Firewall Rules for vCloud Director Database:
- In order to configure IPtables, you must examine the existing rules, modify the rule to log events, and assign a log identifier that can be identified to your IPtables rule.
iptables -S
updated the vCloud director cell to allow PGAdmin port 5432
iptables -A INPUT -p tcp -m tcp --dport 5432 -j ACCEPT
- Restarted the three cells (not all at once, but one by one) to make them available. For more information check out VMware KB
# service vmware-vcd restart
you can check the services progress by using below command
tail -f /opt/vmware/vcloud-director/logs/cell.log
It was then configured to allow the PG admin with the primary cell IP to access the DB with the DB and username as “vcloud” and updated the password to make it work successfully.
Summary PGAdmin4 Access to vCloud Director Database:
Configure External Access to vCloud Director Database has been configured successfully. Able to access vcloud Director database from PGAdmin 4 GUI (Windows Machine)
If you have any questions about this topic, please leave a comment.