12 May 2009

JeOS, Oracle XE and VMware on MacOS X

Last week I installed Ubuntu JeOS (Just Enough Operating System) on VMWare Fusion. JeOS is a slimmed-down version of Ubuntu specifically made for installation in a virtual machine so that it has a much smaller footprint than the normal Ubuntu distribution. Anyway, I did this so that I'd have a VM with a smaller footprint that I can use on my MacBook Pro for development and testing.

After setting up JeOS, I installed Oracle XE, a slimmed down version of Oracle that is free for development and distribution. I used these instructions for installing Oracle XE on Ubuntu but there were some catches, namely that by default the web application for Oracle XE was bound to the localhost, i.e., I couldn't see the web app from Firefox in MacOS X. This was easily remedied via this comment on a blog post about this very topic:

Set up the environment on JeOS to use sqlplus:


export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=${PATH}:${ORACLE_HOME}/bin


Now use the Oracle sqlplus command-line utility to alter a setting that disables local-only access to Apex. Below is the command to run:


$ sqlplus system@xe
Enter password: SYSTEM_password

SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);


Now that I could access the Apex webapp (http://127.0.0.1:8080/apex) that is installed with Oracle XE and I was able to use Apex create a user for myself. After this, I could access Oracle XE from MacOS X.

This setup has been working very well for me until today. For no apparent reason, the networking in JeOS went flaky and I could not access the outside world at all. I switched between NAT and host-only networking in VMWare multiple times, rebooting the VM each time - no dice. I upgraded to the latest VMWare Fusion - no dice. I could SSH into the VM from MacOS but that was it. No commands from JeOS would reach the outside world. So on a whim, I reran the vmware-install.pl script again and after that the networking seems to work again. I still have no idea why this happened which is a bit troubling. I don't want to just blindly keep running the install script again with no idea why it's fixing this networking issue.

Update

I guess the networking issue is common enough that Fusion provides a script to restart everything underneath of Fusion, e.g.:


/Library/Application\ Support/VMware\ Fusion/boot.sh --restart


Also, there's a good document available for Understanding Networking in VMware Fusion if you're interested. It's brief and to the point.

3 comments:

  1. See here:

    http://thefinerstuff.posterous.com/fix-restart-networking-when-using-vmware-fusi

    ReplyDelete
  2. Your setup basically creates layers over layers of threads... I think you should use a more efficient vmware monitoring system to manage the complexity.

    ReplyDelete
  3. This is only for development purposes, so the layers of threads are not a central concern.

    ReplyDelete