PostgreSQL 8.3 Appliance based on OpenSolaris using VirtualBox

Based on Alex Eremin's blog entry on minimal script and some of my own hacking,  I have a script that should allow to create a basic PostgreSQL 8.3 Appliance using OpenSolaris 2008.11 Kernel  in Virtualbox easily with an image which is not bloated (No X, Gnome, etc).

Here is how to try it out:

  • For the time being this requires the  OpenSolaris 2008.11 CD image (650+ MB) only to execute my script which is about 6KB. Bear with me till I solve this problem and play along :-)
  • Download Virtualbox and install it
  • Create a New Virtual Box VM with following parameters in the Wizard Screen
    • Call it PostgreSQL 8.3 Appliance
    • Select OS Type "OpenSolaris" 
    • Base Memory  768MB or increase it to 1GB if you can spare your RAM for it
    • Create a New Dynamic Expanding Image with exactly 16.00 GB (Any other wise may not work)
  • Once the VM is created, immediately  click the blue Network link and modify it to select a "Host Based Network"  (in the setup make sure it is connected to the active host interface - wired or wireless depending on the host system)
  • Also Click the CD-ROM image and point it to the osol-200811.iso image that you downloaded earlier
  • Boot up the VM and select the first LiveCD option in the Grub Menu options
  • Select through the defaults to get the full Gnome Desktop
  • Open Firefox in the VM and make  sure your VM  has internet access
  • Open a terminal window and execute the following commands in sequence
    • wget ""
    • pfexec sh -x
    • pfexec reboot
  • At this point stop the VM and disconnect the CD image connected to the VM and boot again or  select the  grub entry
    • Boot from Hard disk
  • Once the VM boots from the hard disk, select the  grub menu item
    • PostgreSQL 8.3 Appliance based on OpenSolaris 2008.11
  • The Operating system boots up to give a login prompt. Login as root/opensolaris
  • The PostgreSQL database server is already running with PGDATA in /var/postgres/8.3/data
  • Modify postgresql.conf  to add  listen-address='\*' parameter
  • Modify pg_hba .conf to  allow your clients in pg_hba.conf
  •  Restart the postgresql server instance as follows:
    • svcadm restart postgresql_83:default_32bit
  • Now the PostgreSQL Appliance is ready to be connected from your clients.
  • Remember to take snapshots of rpool/VOSApp/var so you can always revert back to earlier copies if you ever need it.
Image of Grub Menu

Note: In a trial installation on a MacBook Pro the script executed in  about 11 minutes which  includes the time it takes to download packages from  I thought that was fantastic.

Maybe I should also create a minimized LiveCD just to execute the script on Virtualbox.  If you have problems executing the script let me know.


With VirtualBox and using ZFS, could you create a base appliance, and then distribute diffs like Postgresql 8.3 as filesystem snapshot deltas?

Posted by Mikael Gueck on December 16, 2008 at 09:15 PM EST #

Jignesh Shah shares his recipe for making a PostgreSQL 8.3 appliance based on OpenSolaris using VirtualBox.
-- Log Buffer #128:

Posted by Dave Edwards on December 23, 2008 at 03:42 AM EST #

Hey Jignesh:

I don't know if you saw my comments on the other post, but I am suggesting that SUN let the public rent some T5440 systems for scalability testing.(And charge them acceptable hourly rates like 10-25 dollars an hour in 15 minute increments.)

It is a shame that MySQL doesn't scale past 8 cores(or argurably 4 cores even) and PostgreSQL seems to stopped at around 32 cores. Most of the time, the reason is that the developers don't have access to 256 core machines.

With Intel's Nehalem-EX coming out(64 threads), it is expected that by 2010, Intel will probably have 128 threads+ machines in the oven. And people like MySQL/Percona/Drizzle/PostgreSQL/EnterpriseDB would want to scale to 256 threads. I don't see a better testing bed than the T5440, except that awful entry price for that server. So can you talk to say Jonathan Swartz and see if people can rent the T5440 by the quarter hour to develop software? Possibly on Solaris 10 ;)



Posted by TS on February 28, 2009 at 12:15 PM EST #

Post a Comment:
Comments are closed for this entry.

Jignesh Shah is Principal Software Engineer in Application Integration Engineering, Oracle Corporation. AIE enables integration of ISV products including Oracle with Unified Storage Systems. You can also follow me on my blog


« June 2016