I will discuss here step by step how to configure a Virtual Machine with Linux OS using VM VirtualBox Manager.
- Virtual Machine Setup
- Install Linux OS on VM
- Oracle GI and Database Installation Prerequisites
- Configure Shareable Disk for ASM (for RAC setup)
- Clone VM and prepare another VM for Clusterware Node
Configure Server on VM:
Click ‘New’ on toolbar and provide the Name and select appropriate OS type and version.
![](https://alldba.com/wp-content/uploads/2020/06/Step-1-5.jpg)
Set memory values here. If you have more memory on you computer, and based on your requirement you can set memory. 2-4 GB memory is good amount for practicing.. Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/Step-2-2.jpg)
Select Hard disk type. Select ‘Create a Virtual hard disk now’ option and Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/Step-3.jpg)
Select Hard disk file type. Here I chosen VDI option.
![](https://alldba.com/wp-content/uploads/2020/06/Step-4.jpg)
Always good to select ‘Dynamically allocated’ option as it will get used space from your local hard disk. Let say if you create 80GB HD but used only 10GB, it will allocate 10GB only from your HD and later will increase based on your used.
![](https://alldba.com/wp-content/uploads/2020/06/Step-5.jpg)
Select File Location and Size and Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/Step-6-1.jpg)
Right Click on created host/server then Select Settings..
![](https://alldba.com/wp-content/uploads/2020/06/Step-7-3.jpg)
Select necessary Hardware from System. Optical and Hard Disk can be selected. All other leave as default. Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/Step-8-1.jpg)
For DVD drive, you can select the OS iso from your harddisk. then it will start booting to install the OS. Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/Step-9.jpg)
Choose Next work adapter. Select ‘Host-only Adapter’ option from drop-down for Adapter 1.
NOTE:::For RAC environment, Required two network Adapters. One is for public and another for private.
![](https://alldba.com/wp-content/uploads/2020/06/Step-11-2.jpg)
And Select Adapter 2 (Applicable for RAC)
![](https://alldba.com/wp-content/uploads/2020/06/Step-12-1.jpg)
Install Linux OS on VM: Installation
Network Setup:
From OS GUI, Select System -> Administrator -> Network
![](https://alldba.com/wp-content/uploads/2020/06/Network-01.jpg)
Configure Ethernet Device (eth0). Select Network Device and Click Edit (highlighted). Set Static IP and Click OK..
![](https://alldba.com/wp-content/uploads/2020/06/Network-02.jpg)
Select Network Device and Click Edit. Set Static IP (choose different subnet mask as it will be use as private IP for RAC) and Click OK..
![](https://alldba.com/wp-content/uploads/2020/06/Network-03-1.jpg)
Activate the device. Select Device and Click Activate from tool bar.
![](https://alldba.com/wp-content/uploads/2020/06/Network-04.jpg)
Create Shareable Disk for RAC: Using command
For Oracle RAC (Real Application Cluster), We will create shareable disk which will use for ASM. In real life, company will use either SAN or NAS storage for RAC environment. For this parctice we will create 8 disks (3 for OCR, 3 for DATA, and 2 for FRA)
Create Disk on VM
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename "C:\VM\RACDR1\asmdisk05.vdi" --size 3072 --format VDI --variant Fixed "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename "C:\VM\RACDR1\asmdisk06.vdi" --size 5120 --format VDI --variant Fixed "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename "C:\VM\RACDR1\asmdisk07.vdi" --size 5120 --format VDI --variant Fixed "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename "C:\VM\RACDR1\asmdisk08.vdi" --size 5120 --format VDI --variant Fixed
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK10-1024x265.jpg)
Connect them (disks) to Virtual Machine (Created host name racdr1)
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR1 --storagectl "SATA" --port 5 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk05.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR1 --storagectl "SATA" --port 6 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk06.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR1 --storagectl "SATA" --port 7 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk07.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR1 --storagectl "SATA" --port 8 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk08.vdi" --mtype shareable
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK11-1024x132.jpg)
Disk created as Normal Type but need to convert to Shareable for ASM.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\VM\RACDR1\asmdisk05.vdi" --type shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\VM\RACDR1\asmdisk06.vdi" --type shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\VM\RACDR1\asmdisk07.vdi" --type shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\VM\RACDR1\asmdisk08.vdi" --type shareable
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK12-1024x112.jpg)
Create Shareable Disk for RAC: Using GUI
From Setting -> Select Storage -> Controller : SATA -> Click ‘Adds Hard disk’ icon -> from popup window, Click ‘Create new disk’.
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK01.jpg)
You may select VDI from on this step.. Click Next…
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK02.jpg)
Select ‘Fixed size’ option and click Next…
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK03.jpg)
Set the location and file name and size. 4 GB for OCR or Voting Disk. Click Create…
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK04.jpg)
Storage has been created with Normal (VDI) format. But we need to change it to shareable. Click OK.
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK05.jpg)
We can make change hard disk type from Normal to Shareable two ways (GUI Or Command). I will show both in below..
Steps to change format using GUI.
Click File on VM menu and select ‘Virtual Media Manger…‘ option or Press Ctrl + D.
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK06.jpg)
Select the Disk you want to change type. Then from Attributes section Change type Shareable from drop-down list. Click Apply..
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK07.jpg)
Validate the disk type and it should now Shareable now like below highlighted.
![](https://alldba.com/wp-content/uploads/2020/06/ASM_DISK08.jpg)
Clone VM and prepare another VM for Clusterware 2nd Node
NOTE:::If you complete all steps mentioned above, then you don’t need to repeat same steps on Node2.
Shutdown VM (racdr).
Right Click on VM and Choose Clone Option.
![](https://alldba.com/wp-content/uploads/2020/06/Clone01.jpg)
Enter new VM name and select the check box. Click Next..
![](https://alldba.com/wp-content/uploads/2020/06/Clone02-1.jpg)
Select ‘Full clone’ and Click Clone
![](https://alldba.com/wp-content/uploads/2020/06/Clone03.jpg)
It will take time to complete the cloning process based on disks size.
![](https://alldba.com/wp-content/uploads/2020/06/Clone04.jpg)
Changes on new (cloned) VM
Set network IP on new VM:
To change network IP for new VM please follow the same process what has been done for first VM
Change Host name for new VM:
From VM -> Select System -> Administrator -> Network. Below Window will popup then Select DNS and enter Hostname.
![](https://alldba.com/wp-content/uploads/2020/06/Hostname_01.jpg)
Configure shareable disks for Node2:
As we have cloned the VM so its also copied all shareable disks for new VM. But same shareable disks will connect from both Nodes. So we will delete all created shareable disks from new VM and connect these disk from Node 1 location.
Remove all shareable disks from Node 2:
From Settings on Node 2 -> Select Storage -> Select disk (one be one) and Click Removes selected button highlighted in below.
![](https://alldba.com/wp-content/uploads/2020/06/SharableDisk01-1024x440.jpg)
After removed all shareable disk from node 2, it will be link below.
![](https://alldba.com/wp-content/uploads/2020/06/SharableDisk02.jpg)
Add Shareable Disks on Node 2 using command.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 3 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk03.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 4 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk04.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 5 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk05.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 6 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk06.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 7 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk07.vdi" --mtype shareable "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RACDR2 --storagectl "SATA" --port 8 --device 0 --type hdd --medium "C:\VM\RACDR1\asmdisk08.vdi" --mtype shareable
Add Shareable Disks on Node 2 using GUI.
Add Shareable disk from Node 1 Location. Select ‘Adds hard disk’ icon and it will popup another window for selecting file. Choose the disk from Node 1 location.
![](https://alldba.com/wp-content/uploads/2020/06/SharableDisk03.jpg)
It will look like below. Add all disks one by one and Click OK.
![](https://alldba.com/wp-content/uploads/2020/06/SharableDisk04.jpg)
Finally it will show attached to for both nodes (highlighted).
![](https://alldba.com/wp-content/uploads/2020/06/SharableDisk05.jpg)
1 pings
[…] 1. Configure VM for 2 Nodes RAC. Create VM […]