I requred direct access to the DB, so I could create my own queries, and came up with this. It’s a bit messy, but got me on and enabled me to directly query the DB.
In the Oracle VM Manager, map port 8888 to 5432 on the VM box and ensure port 2222 is mapped to 22. (right click, ‘settings’, ‘network’, ‘advanced’, ‘port forwarding’)
Then SSH to localhost:2222 (This uses the rule above and connects you to the VM.) Login to VM using credentials from the site and run the following:
sudo chmod -R 777 /etc/postgresql/*/main
sudo su postgres -c "echo \" listen_addresses = '*' \" >> /etc/postgresql/*/main/postgresql.conf"
sudo su postgres -c "echo \" host all all 10.0.2.2/24 md5 \" >> /etc/postgresql/*/main/pg_hba.conf"
sudo /etc/init.d/postgresql restart
By default the DB does not accept ‘external’ connections, this changes that and allows connections from the VM network.
You can then use pgadminIII to connect to localhost:8888 using VM user account and have full DB access.