Friday, March 3, 2017

Creating a new Oracle Linux Virtualbox Virtual Machine for personal use

I'll take you though creating an Oracle Linux 6.5 VM on a Windows PC. This was the latest Linux available at the time.
Creating a VM gives you all the benefits from my earlier post. Also, you can build your own image from latest linux builds and configure it the way you want to.

Install latest VirtualBox and its guest additions on your local PC from its website.
Download the OS Image Oracle Linux 6.5 from edelivery site https://edelivery.oracle.com/linux/ . It will be in an ISO File.

In Oracle VM VirtualBox Manager, File -> Preferences -> General -> Choose Correct Default Machine Folder. Example, E:\OVM , especially if you’re creating VMs on a different disk.

In Oracle VM VirtualBox Manager ,choose New

Create a NEW machine, enter a name you want to give


Allocate enough memory to VM as needed. Typically 2GB should be good enough for many tasks in Linux, but if you want to develop in NetBeans for example you should give around 4GB.

 Choose do not add a virtual hard drive yet. We’ll add those later. Hit Create. On the listed newly created VM, select it and choose Settings, to modify its settings.

In Settings go to Storage options first and near Controller:SATA hit the icon to add disk.

Choose VDI file type. This format has benefit of compacting files and resizing.

 On next screen choose “Dynamically Allocated” physical hard drive.
Next,  choose file location and size. Give a good name (name_DATA) and location and select around 100 GB or as seen necessary for your work.
Add another disk (name_SWAP) for swap partition on linux. Allocate 8 gb file. I chose dynamically allocated for swap, but if performance is of concern you can choose fixed type for better performance. You’d have to wait for the big file to be created though.
Next In  Settings -> storage ->  Controller:IDE , CD/DVD Drive. Load up the ISO by clicking the cd icon next to drop down.

Hit OK. Start the VM by double clicking or hitting Start.
Virtual Box starts up the Linux installation process.

Hit Ok on this message, once you get Linux fully installed it won’t affect you.
  Follow the upcoming menus
  Choose ntp time server
  Choose Create Custom Layout  option, instead of use all space option, so that you can layout swap in other 6gb partition.


Create standard partition on the large 30gb hard drive, give its mount point as /


 On other drive choose swap as the file system type and click fill to maximum allowable size.

Choose Software Development Workstation installation option; Note that basic server option doesn't give gui and is useful for server class systems; desktop option also had issues in installing VB guest additions.


Create group dba, user oracle by using advance user creation option.

  Reboot your VM
You should Install guest additions as it gets rid of the mouse locking , help resize your window automatically .
Once the Linux VM is up, do an  yum update ; repeat if needed. You’re now all set to install your favorite software on it.

Please let me know if you found this useful, It took me some time to figure this out even with help of a good reference as mentioned below..

Author: Dhiraj Soni
Date: Feb 4, 2014

References:
VirtualBox - Creating a Base OEL Image, by Jim Fisher   Nov 4, 2010

No comments: