Back to: Oracle DBA Tutorials
Creating Virtual Machine in Virtual Box and Installing Linux
In this article, I am going to discuss Creating a Virtual Machine in Virtual Box and Installing Linux. Please read our previous article where we discussed How to download Oracle Linux Image. This is our third step toward the Oracle Installation. At the end of this article, you will understand How to Create a Virtual Machine in Virtual Box and Installing Linux step by step.
Create a Virtual Machine in Virtual Box and Installing Linux:
Here, I should specify how much RAM, Hard disk I need to give for this virtual machine because we are creating a new computer so it needs RAM and storage
- Storage: Minimum 500 MB free disk space for installation, 10 GB recommended because we will add lots of programs and features.
- Memory: Minimum 1 GB physical memory, 4 GB recommended and the system should be 64bit. If you don’t have 64-bit you cannot continue to install this software.
Open Oracle Virtual Box software. The first step we are going to do is open Virtual Box software. After opening, we need to create a new virtual machine. Click on the machine and click new.
After clicking new we will get a popup where you need to provide details to create a new virtual machine. Please give the name of the virtual machine. We are using Oracle 19c. You can use any other name or you can continue with this name. The type should be Linux. The version should be Oracle(64-bit).
Note: Generally, some users face issues with the Version. They already have a 64 – bit computer but in the version of the virtual o=box, it doesn’t show the option of 64- bit. In this case, you need to update the bios information. You can search on YouTube for how to update bios information (or) you can search on any other website. Click next after making changes.
You need to mention how much RAM is required for the virtual machine. My System has 8 GB of RAM. We need to allocate half of your memory for this virtual machine. So I am providing 4 GB of RAM. So the 4GB of memory you need to give 4096MB in the dialog box. Then Click Next.
Note: This memory will be released after you shut down this Virtual box. Once you open the Virtual box it takes 4 GB of memory from 8 GB present in my system.
Keep this Option as it is present. This creates a hard disk virtually for your virtual machine. Click Create.
Up next you will see the hard disk type. You need to select VDI (Virtual Disk Image) and then click Next. This is given by default.
Then You will get Storage on Physical Disk. You need to select Dynamically Allocated. This option is best for space consumption. This takes the storage which is necessary for the virtual machine. Then click Next.
Now File Location and size. For File location choose any drive where you have enough space of 30 to 40GB.After choosing the drive and the location name the file as oracle19c.vdi or any name that you would like. After setting the path give the value for hard disk storage. You can allocate 30GB because installing oracle and Linux requires approximately 30G. We have chosen E:\Oracle\oracle19c.vdi After that click on Create.
Now your virtual machine will be created. But this machine doesn’t have anything. It has only a hard disk and RAM. We need to install the software on this machine. Below is the image of the virtual machine.
We need to install the software into this virtual machine. Before installing software we need to make some changes to this virtual machine. Right-click on the virtual machine.
Click on setting and open Network settings.
After opening the network setting click on Adapter 1 and select options for Attached to and select Bridge Adapter. This defines the bridge adapter that uses the driver present in the original computer for network purposes(internet and intranet).
Then Go to System Settings and click on pointing device and click on USB Tablet. Actually, there would be many problems in pointing the mouse in oracle virtual machine 6.0. In order to avoid those kinds of issues, we are selecting this option. In a simple, it can be used to reduce mouse pointer problems.
After this Go to General Settings and click on advanced and change the options for Shared Clipboard and Drag/ Drop to Bidirectional. This is to copy and paste and drag& drop the items from your local computer to this virtual machine and vice versa. These options work only after installing the guest additions. Click OK.
Go to Setting again.
Select Storage settings. Please click on the circled option which is mentioned as Adds Optical Drive
After clicking on Adds Optical Drive option you can see a popup dialog box where it allows you to add the disk image that we have downloaded. After clicking that you will get a dialog box where you need to select Choose Disk and then the below popup appears.
Once you click on Add disk Image it popups for selecting an iso image that we have downloaded. So go to the location where you have saved the iso image and select the image. Now the virtual machine will start looking for the iso image file.
After clicking open you will be back to the Virtual Box and the below image appears. You need to have a similar kind of setting after uploading the iso image. Then click OK.
So all the settings have been done. Now you need to start your virtual machine. So In the below image Click Start
After clicking the start it will go under process click enter and complete the prerequisites. The prerequisites should complete 100%. After that, the OS will do some checking as well. You need to wait for some time until it completes.
So after the prerequisites are completed there will be a popup to set up Language and further selection. Select English Language and click Continue.
After clicking continue you will see the whole setup process of the Oracle Linux. You need to complete each and every step to complete the installation summary.
There is no particular order. You can choose any order. As of now, we are selecting Time and Date. We are located in India. You can either select on the map or else you select from the boxes below. Click Done.
After setting time and select the Keyboard setting and make any changes if necessary or else keep it as English(US) and click continue.
After setting up the Keyboard. We selected the Language setting and selected English(US). We have already done this but doing again for confirmation.
After clicking Done. We have selected Software Selection, We have selected a Server with GUI which will have a nice graphical layout something like windows. You can select the below options for other add-ons which are recommended for running GUI.
Select the Security Policy, and then Disable the Security policy, and Click Done.
After finishing this, Select Network & Host Name. After opening Please turn on the Ethernet connectivity. There you can see the I.P Address for this machine. It would be different for different machines. In my case, the I.P Address is 192.168.0.8/24
Go to Host Name and enter your own hostname. We are using oracletest.com. You can give any other name. After entering the hostname click apply.
After clicking apply the current hostname will appear as below. This hostname is very important from a database point of view.
After finishing this setting. Click on Installation Destination and check if there is a tick mark in the Storage option.
Click on the Root Password and enter as per the requirement for the root user. The root user (or) root password is the highest level in Linux. In Simple words, the root user is a special user who can make any changes to Linux. The details of the root user will be discussed later. Click done after entering the password.
After this Create a user that will be used to login to the Linux. This is the user that is used to log in to Linux. Give the password to the user as well.
After setting this up. You will be able to use the option to begin the installation. Once you click on Begin installation. It starts installing packages to Linux. This will take some time. After finishing installing packages you will be prompt to reboot the system.
After you click on the reboot system it will take some time to reboot your system and then It will prompt the login page with the user that you have created above asking password to enter. We have created a user as Jaya and created a password for it. So, enter the password for this user so that you can log in.
After logging into Linux make sure to turn off the privacy location services off. In most of the Linux versions, we don’t find a setup after installing Linux. If you find any setup just follow the process. In my version, we didn’t get any setup tour. Below is the home screen of Linux.
On the left side, you can find Activities where you can see your current homepages and applications. On the right side, you can see connectivity and battery percentage, and the sound settings. Below is the Activities Image. There is a rounded in the image. That is called Terminal. In the terminal, you can write commands. Mostly we would be performing all the operations in Terminal. We will discuss Terminal and Commands in further topics.
If you click on it terminal will open as below. If you see in the terminal there is a command line jaya@oracletest. Jaya is the username that we have created and oracletest is the hostname that we have given during the setup process.
If you want to close the virtual box, simply click on the close button in the virtual box window.
Just click on close and it will open a popup window. You need to select the below option every time because it shut down the virtual box and releases the RAM of your computer. Your entire virtual box will shut down.
If you want to start again open the virtual box and click start as below.
After clicking start it will take some time to boot up and opens up the logging page of the user in Linux as below.
In the next article, I am going to discuss Installing Guest Additions for Oracle Linux. Here, in this article, I try to explain How to Create a Virtual Machine in Virtual Box and Installing Linux and I hope you enjoy this Creating Virtual Machine in Virtual Box and Installing Linux article.