In this article, I will demonstrate how to build Grid Infrastructure for Standalone using VirtualBox 6.1.
Please remember this is not recommended for a production environment as no production database is ever implemented using a virtual machine. I have put all together to help you understand the installation procedure. So, this is purely for learning purpose.
Environment overview:
Host: asmstand.oracledbashop.com (VM Guest)
OS: Oracle Linux 7.5 (Kernel: 3.10.0-862.el7.x86_64)
IP Address: 192.168.56.107
Virtual Machine Setup (VirtualBox)
I am going to setup my own Host-only networks as shown below (screenshot). This is not mandatory though. I am not using the default one which comes with 192.168.56.1 IP range. Host-only network will avoid any IP address conflict with any other existing hosts available in the network where the actual PC (host machine) is connected to.
VirtualBox Manager -> Preferences -> Network -> Host-only Networks
Create New Virtual Machine
Memory Size - In my case 3GB
Hard disk - Create a virtual hard disk now
Hard disk file type - VDI (VirtualBox Disk Image)
Storage on Physical hard disk - Dynamically allocated
Choose File location and size
Un-check Floppy
Processor - change from 1 to 2
Storage - Controller: IDE - Choose rhel ISO image.
Network - Adapter 1 - VirtualBox Host-Only Ethernet Adapter #2
Shared Folder - Choose where GridInfrastructure 19c and Database 19c present.
VirtualBox Configuration.
Start VM and choose "Install Red Hat Enterprise Linux 7.5"
Language - English
Software Selection - In my case choose Server with GUI and all Add-Ons.
Click on "Local Standard Disks" and choose "I will configure partitioning.
Click '+'
Choose Mount Point '/' root and give 10 GB.
Choose swap and give 10 GB.
Give '/u01' and allocate remaining storage. In my case 31 GB.
Partitions will be as below screen.
Accept changes.
Choose Ethernet (enp0s10) and the IP will be- 192.168.56.107 (In my case)
Begin Installation.
Choose - root password.
Installation Progress.
Installation Completed. Reboot.
Accept Licensing.
Choose Time Zone.
RHEL ready to use
Install Guest Additions
Hit run
Add SCSI Controller and Disks in VirtualBox
Add Hard disk.
Create Disk Image
Hard disk file type - VDI (VirtualBox Disk Image)
Storage on physical hard disk - Dynamically allocated.
Provide File location and Size in my case DATAC1 - 12 GB.
Click on DATAC1.vdi and Choose.
Similarly create RECOC1 with size 12 GB.
Similarly create DATAC2 with size 12 GB.
Check for Partitions
[code]
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 52428800 sda
8 1 9764864 sda1
8 2 9764864 sda2
8 3 30272512 sda3
11 0 1048575 sr0
8 16 12582912 sdb
8 32 12582912 sdc
8 48 12582912 sdd
[/code]
Partition the disks with fdisk - For each disk - In my case sdb, sdc, sdd
[code]
[root@localhost ~]# fdisk /dev/sdb
n
p
1
Enter
Enter
w
[/code]
[code]
[root@localhost ~]# fdisk /dev/sdc
n
p
1
Enter
Enter
w
[/code]
[code]
[root@localhost ~]# fdisk /dev/sdd
n
p
1
Enter
Enter
w
[/code]
Use the "oracle-database-preinstall-19c" package to perform all your prerequisite setup, issue the following command.
[code]
yum install -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
[/code]
[code]
[root@asmstand rpm]# ls -lrt oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
-rwxrwx---. 1 root vboxsf 18204 Jan 24 05:26 oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
[root@asmstand rpm]# yum install -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-19c-1.0-1.el7.x86_64
Marking oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 will be installed
--> Processing Dependency: compat-libstdc++-33 for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: ksh for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: oracle-database-preinstall-19c-1.0-1.el7.x86_64 (/oracle-database-preinstall-19c-1.0-1.el7.x86_64)
Requires: libaio-devel
Error: Package: oracle-database-preinstall-19c-1.0-1.el7.x86_64 (/oracle-database-preinstall-19c-1.0-1.el7.x86_64)
Requires: compat-libstdc++-33
Error: Package: oracle-database-preinstall-19c-1.0-1.el7.x86_64 (/oracle-database-preinstall-19c-1.0-1.el7.x86_64)
Requires: ksh
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[/code]
Pre-installation package failed with libaio-devel, compat-libstdc++-33 and ksh
Install required package and re-try.
[code]
[root@asmstand rpm]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:compat-libstdc++-33-3.2.3-72.el7 ################################# [100%]
[root@asmstand Packages]# rpm -ivh libaio-devel-0.3.109-13.el7.x86_64.rpm
warning: libaio-devel-0.3.109-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:libaio-devel-0.3.109-13.el7 ################################# [100%]
[root@asmstand Packages]# rpm -ihv ksh-20120801-137.el7.x86_64.rpm
warning: ksh-20120801-137.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:ksh-20120801-137.el7 ################################# [100%]
[/code]
Re-try
[code]
[root@asmstand rpm]# yum install -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-19c-1.0-1.el7.x86_64
Marking oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
oracle-database-preinstall-19c x86_64 1.0-1.el7 /oracle-database-preinstall-19c-1.0-1.el7.x86_64 55 k
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total size: 55 k
Installed size: 55 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : oracle-database-preinstall-19c-1.0-1.el7.x86_64 1/1
Verifying : oracle-database-preinstall-19c-1.0-1.el7.x86_64 1/1
Installed:
oracle-database-preinstall-19c.x86_64 0:1.0-1.el7
Complete!
[/code]

Create other user groups and user 'grid'
[code]
[root@asmstand rpm]# groupadd -g 54327 asmdba
[root@asmstand rpm]# groupadd -g 54328 asmoper
[root@asmstand rpm]# groupadd -g 54329 asmadmin
[root@asmstand rpm]# useradd -g oinstall -G dba,asmadmin,asmdba,asmoper grid
[root@asmstand rpm]# usermod -a -G oper,asmdba oracle
[root@asmstand rpm]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@asmstand rpm]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[/code]
[code]
[root@asmstand rpm]# su - oracle
Last login: Tue Jan 28 23:19:38 CST 2020 on pts/0
[oracle@asmstand ~]$ id
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backuunconfined_t:s0-s0:c0.c1023
[oracle@asmstand ~]$ exit
logout
[root@asmstand rpm]# su - grid
Last login: Tue Jan 28 23:19:46 CST 2020 on pts/0
[grid@asmstand ~]$ id
uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54327(asmdba),54328(asmoper),54329(asmadmin) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[/code]
Setting up the .bash_profile for both 'grid' and 'oracle' user.
[code] [grid@asmstand ~]$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH ORACLE_SID=+ASM; export ORACLE_SID JAVA_HOME=/usr/bin/java; export JAVA_HOME ORACLE_BASE=/u01/app/grid; export ORACLE_BASE ORACLE_HOME=/u01/app/12.1.0/grid; export ORACLE_HOME ORACLE_TERM=xterm; export ORACLE_TERM TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin PATH=${PATH}:/usr/bin:/bin:/usr/local/bin export PATH export TEMP=/tmp export TMPDIR=/tmp umask 022
[/code]

[code]
[oracle@asmstand ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
ORACLE_SID=oradb; export ORACLE_SID
ORACLE_UNQNAME=oradb; export ORACLE_UNQNAME
JAVA_HOME=/usr/bin/java; export JAVA_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1;export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/local/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
[/code]

Ensure resource limits are set as below (/etc/security/limits.conf)
[code]
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728
[/code]
Install required rpm's to configure ASM.
ASMLib Packages:
kmod-oracleasm
oracleasm-support
oracleasmlib
[code]
[root@asmstand Packages]# rpm -ivh kmod-oracleasm-2.0.8-21.el7.x86_64.rpm
warning: kmod-oracleasm-2.0.8-21.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:kmod-oracleasm-2.0.8-21.el7 ################################# [100%]
[root@asmstand rpm]# rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
warning: oracleasmlib-2.0.12-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:oracleasmlib-2.0.12-1.el7 ################################# [100%]
[root@asmstand rpm]# rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm
warning: oracleasm-support-2.1.11-2.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:oracleasm-support-2.1.11-2.el7 ################################# [100%]
[/code]
Configuring ASM
[code]
[root@asmstand rpm]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[/code]
fdisk -l
[code]
[root@asmstand dev]# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b98d0
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 19531775 9764864 83 Linux
/dev/sda2 19531776 39061503 9764864 82 Linux swap / Solaris
/dev/sda3 39061504 99606527 30272512 83 Linux
Disk /dev/sdc: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd5eb4e32
Device Boot Start End Blocks Id System
/dev/sdc1 2048 25165823 12581888 83 Linux
Disk /dev/sdb: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x3aa4ceea
Device Boot Start End Blocks Id System
/dev/sdb1 2048 25165823 12581888 83 Linux
Disk /dev/sdd: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x2e23d031
Device Boot Start End Blocks Id System
/dev/sdd1 2048 25165823 12581888 83 Linux
[/code]

Now we are ready to create the ASM disks...
[code]
[root@asmstand rpm]# oracleasm createdisk DATAC1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@asmstand rpm]# oracleasm createdisk DATAC2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@asmstand rpm]# oracleasm createdisk RECOC2 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[/code]
[code]
[root@asmstand dev]# ls -l /dev/oracleasm/disks/*
brw-rw----. 1 grid asmadmin 8, 17 Jan 30 00:24 /dev/oracleasm/disks/DATAC1
brw-rw----. 1 grid asmadmin 8, 33 Jan 28 23:36 /dev/oracleasm/disks/DATAC2
brw-rw----. 1 grid asmadmin 8, 49 Jan 28 23:36 /dev/oracleasm/disks/RECOC2
[/code]
Create the directory structures and set ownership and permissions
[code]
[root@asmstand ~]# mkdir -p /u01/app/19.0.0/grid
[root@asmstand ~]# mkdir -p /u01/app/grid
[root@asmstand ~]# mkdir -p /u01/app/oracle
[root@asmstand ~]# chown -R grid:oinstall /u01
[root@asmstand ~]# chown oracle:oinstall /u01/app/oracle
[root@asmstand ~]# chmod -R 775 /u01/
[/code]
Now we are almost set ready to start the installation... I'm going to unzip the grid software.
[code]
unzip LINUX.X64_193000_grid_home.zip -d /u01/app/grid/software_grid
[/code]
Install cvuqdisk rpm before starting grid installation
[code]
[root@asmstand grid]# cd /u01/app/grid/software_grid/cv/rpm
[root@asmstand rpm]# ls
cvuqdisk-1.0.10-1.rpm
[root@asmstand rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm
Preparing... ################################# [100%]
Using default group oinstall to install package
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]
[/code]
GRID Setup
[code]
[root@asmstand ~]# xhost +
access control disabled, clients can connect from any host
[root@asmstand ~]# su - grid
Last login: Wed Jan 29 23:09:29 CST 2020 on pts/1
[grid@asmstand ~]$ cd $ORACLE_BASE
[grid@asmstand grid]$ cd software_grid/
[grid@asmstand software_grid]$ export DISPLAY=:0.0;
[grid@asmstand software_grid]$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...
[/code]
Create ASM Disk Group - In below screen "Disk DiscoveryPath: '/dev/sd*' and no disks detected.
Our Disk Discovery Path is "/dev/oracleasm/disks"
Now we can see DISKS
Specify ASM Password
Specify Management Options - Register if we have
Manage Groups - Privileged Operating System Groups
Specify Installation Location - ORACLE_BASE
Create Inventory - Inventory Directory
Root script execution configuration
Perform Prerequisite Checks - We need to fix all Prerequisite Checks
Since its a warning i just ignored and proceeded - We can increase VM RAM once installation finished.
Summary
Install Product
Finished Installation.

[code]
The response file for this session can be found at:
/u01/app/grid/software_grid/install/response/grid_2020-01-29_11-10-34PM.rsp
You can find the log of this install session at:
/tmp/GridSetupActions2020-01-29_11-10-34PM/gridSetupActions2020-01-29_11-10-34PM.log
You can find the log of this install session at:
/u01/app/oraInventory/logs/UpdateNodeList2020-01-29_11-10-34PM.log
Moved the install session logs to:
/u01/app/oraInventory/logs/GridSetupActions2020-01-29_11-10-34PM
[code]
[grid@asmstand bin]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@asmstand bin]$ crsctl status resource -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATAC1.dg
ONLINE ONLINE asmstand STABLE
ora.asm
ONLINE ONLINE asmstand Started,STABLE
ora.ons
OFFLINE OFFLINE asmstand STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE asmstand STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE asmstand STABLE
--------------------------------------------------------------------------------
[/code]

Create new disk group