Getting Oracle VM VirtualBox Ready for an Oracle Database
June 16, 2010
Everyone wants to go virtual, but getting started with Oracle’s VM VirtualBox can be tricky. James Koopmann takes a quick look at installing Oracle VM VirtualBox 3.2.4, covering some of the features you as a database administrator or database developer might run across while trying to install an operating system or Oracle database.
There seems to be a constant buzz around virtualization and it seems everyone wants to be a part of it or take advantage of it within the datacenter. Virtualization, when stable VM are copied for reuse, is great for rapid deployment of a VM and Oracle instances; enabling database administrators and developers to quickly deploy complete and stable systems that can be used for testing, QA, or just investigating new features and development practices. With a VM, it literally takes only a few minutes to bring up a stable VM copy, no more wasting of days to rebuild system, database, and application software environments on physical machines.
On the Oracle front, after the acquisition of Sun, VirtualBox is giving other desktop virtualization tools a run for their money. Oracle’s VM VirtualBox is free to download and use at no cost and provides great benefits for DBAs and developers alike; giving them an opportunity to try out a variety of operating systems, configurations, and tests easily.
This paper takes a quick look at installing Oracle VM VirtualBox 3.2.4 and some of the features you as a database administrator or database developer might stumble up against while trying to install an operating system or Oracle database.
Installing Oracle’s VM VirtualBox
If you’ve been hiding yourself somewhere, now is the time to come out and dive into the world of virtualization. Oracle’s VM VirtualBox basically allows you to run different and simultaneously different operating systems on your desktop or laptop. The best place for information would be Oracle’s own Oracle VM VirtualBox website where you can also find the link for Oracle VM VirtualBox Downloads. Installing the latest release (3.2.4) is probably the simplest thing in this whole process and I’d encourage everyone to play around with it, if nothing more than just to look at the documentation in case you have a need in the future. Because this is so simple, I’m not going to elaborate on this process as it is really nothing more than clicking a few “NEXT” buttons.
Installing an Operating System for Oracle
You can choose most any operating system to get started. You can either go to a specific download site such as centos.org, Oracle’s website for Solaris or Linux. Alternatively, you might want to search and download pre-built VMs such as Solaris from the Oracle website. Installation of an operating system is just the same as when installing it on physical hardware except for telling VirtualBox where the ISO images reside on disk and answering a few questions about how you would like your host system’s resources to be distributed to the VM. That being said, I think it somewhat useful if I give you an idea of the prompts and responses I actually entered during the installation of a CentOS operating system.
Just for grins, below are the prompts and responses during my installation of the CentOS operating system:
Language Selection – English Keyboard Selection – us Warning about creating new partition – Yes Partitioning Type – Remove linux partitions on selected drives and create default layout Warning about remove all Linux partitions – Yes Review Partition Layout – Yes if you want, No to just continue Boot Loader Configuration – Use GRUB Boot Loader Boot Loader Configuration – blank for passing boot options Boot Loader Configuration – no GRUB password Boot Loader Configuration – just boot CentOS Boot Loader Configuration – install boot loader on /dev/sda Configure Network Interface – Yes to configure eth0 Network Configuration for eth0 – Activate on boot / Enable IPv4 IPv4 Configuration for eth0 – Manual address configuration 192.168.61.161/255.255.255.0 Gateway/Primary DNS/Secondary DNS – 192.168.61.1/**.**.***.**/**.**.***.** Hostname Configuration – manually/wagner Time Zone Selection – System clock uses UTC:America/Denver Root Password - ******** Package selection – Desktop/Gnome Installation to begin – OK Required Install Media – Continue
Additional VirtualBox Must-Haves for Oracle
[root@wagner ~]# uname -rp 2.6.18-194.el5 i686 [root@wagner ~]# yum install gcc -y [root@wagner ~]# yum install kernel-devel-2.6.18-194.el5 -y [root@wagner ~]# yum install kernel-xen-devel-2.6.18-194.el5 –y [root@wagner ~]# export KERN_DIR=/usr/src/kernels/2.6.18-194.el5-i686
[root@wagner ~]# cd $HOME [root@wagner ~]# cp /media/VBOXADDITIONS_3.2.4_62467/VBoxLinuxAdditions-x86.run $HOME [root@wagner ~]# ./VBoxLinuxAdditions-x86.run
Note: if you perform updates to the system, the Guest Additions probably won’t be rebuilt. You will have to, after the updates are done, re-execute VBoxLinuxAdditions-x86.run and restart your VM.
[root@wagner ~]# mkdir /media/share [root@wagner ~]# mount -t vboxsf oracle11gr2 /media/share [root@wagner ~]# cd /media/share [root@wagner share]# ls -l total 2227301 -rwxrwxrwx 1 root root 1285396902 May 20 00:16 linux_11gR2_database_1of2.zip -rwxrwxrwx 1 root root 995359177 May 19 23:52 linux_11gR2_database_2of2.zip [root@wagner share]# unzip linux_11gR2_database_1of2.zip [root@wagner share]# unzip linux_11gR2_database_2of2.zip
Install Oracle and You’re done
At this point, your system will look just like many other systems you’ve installed Oracle on. At this point you may wish to export the appliance through the export wizard. This would allow you, if for some reason the Oracle installation failed or you corrupted your VM, to get back to a stable system just before the Oracle installation began. I usually take an export at this point but also after I’ve installed my Oracle database. That way I can always just use the copy to have a fresh VM at any time. Hopefully at this point you can see the benefit of using VMs. VMs provide great flexibility to DBAs and developers; allowing them to easily test new features yet have the flexibility to revert to a stable environment.