Thursday, February 28, 2008

VirtualBox on Mac saved me !!

Recently I quit Oracle and therefore I re-imaged my MacBook Pro to get rid of VMWare and few other such baggages I was carrying along with I lost my virtual machines with Oracle 10g database installed.

Renny was stuck with some Oracle Stored Procedure issue and she wanted to get Oracle 10g running on my laptop. And I had 0 time to get it going. There have not been any Mac releases of Oracle Database lately. So I am momentarily stuffed.

My options were to get VMWare Fusion, Q.app (qemu for Mac) or VirtualBox. Last time I tried VirtualBox I was getting error when I startup the guest OS. But thought will it a try ...

There comes VirtualBox to wrap Ubuntu Gutsy Gibbon, Oracle XE 10g. All took about 30 minutes to get started, incl. downloads. I preferred to run only the database from within the guest OS and run Eclipse, SQL Developer etc from Host OS which is Mac OS X in this case. Now the stumble was with the networking in VirtualBox which by default is NAT/NAPT. So no IP Address assigned to host OS so that I can make a TCP connection from host to guest (whereas vice-versa works fine).

Bit of a Googling and the VirtualBox User Manual introduces me to VBoxManage using which you can add port forwarding to guest OS settings whereby a port connection on host is forwarded to mapped port on guest. So using following commands I was able to set this up for TNS listener and worked like a charm when tested with SQL Developer running on host.

VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/Protocol" TCP
VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/GuestPort" 1521
VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/HostPort" 1521


All is good that ends good .. And they lived happily ever after !!

2 comments:

Anonymous said...

whoah this weblog is great i really like reading your articles.
Stay up the good work! You understand, a lot of persons are
looking round for this info, you can help them
greatly.

My site: Voyance gratuite

Anonymous said...

It's very trouble-free to find out any matter on net as compared to books, as I found this paragraph at this web site.

Feel free to visit my blog post; voyance par telephone

I am well fed with these !!