[COLUG] Postgres / VMWare
Mark Erbaugh
mark at microenh.com
Fri Dec 28 11:27:17 EST 2007
I admit I don't understand all the startup details of my Ubuntu Gutsy
system. I ran into a problem and think I've solved it, but want to make
this into a learning opportunity, so I would appreciate feedback on
different approaches.
Here's the problem. I want to be able to access the Postgres server
which is running on my computer from a virtual machine on the same
computer running under VMWare server. I use a host-only network between
the virtual machine and the local computer. That way I don't have to
worry about protecting the VM from the outside world.
I have determined that VMWare gives my host computer the IP address of
192.168.201.1 so that the VM can use to communicate with it. I want to
set up the Postgres server to listen on that address, but don't want it
listening on all IP addresses. Thus in postgresql.conf, I set
listen_addresses to '192.168.201.1,localhost'.
The problem is that in the normal startup sequence, Postgres is started
before VMWare. When Postgres tries to start, the 192.168.201.1 network
doesn't exist because VMware hasn't been started, so the startup fails.
In my etc/rc2.d directory, the links to start Postgres and VMware are:
S90vmware and S19postgresql-8.2. My solution was to change the
Postgresql link to be S91postgresql-8.2 so that it would start after
VMWare. This seems to work, so I think that none of the other startup
processes are dependent on Postgres being started.
Mark
More information about the colug432
mailing list