Create a Simple Oracle VM on Azure IaaS

Use the following shell script to create your Oracle VM.  I chose the following parameters to create mine:

Using Azure Cloud Shell and with persistent storage, which are linked on the github page, I uploaded the script and run it after changing the permissions.

chmod 744

Provision the VM

Run the script:


Anwser the questions from the script:

What is the name for the resource group to create the deployment in? Example: ORA_GRP
Enter your Resource Group name:

Here's the installation version urns available, including Oracle and Oracle Linux

Enter the urn you'd like to install, feel free to copy from the list and paste here:

What unique name your Oracle database server? This will be used for disk naming, must be unique.  Example: ora122db1
Enter the DB Server name:

What size deployment would you like, choose from the following: StandardSSD_LRS, Standard_LRS, UltraSSD_LRS ?  Example:
Enter the Size name from above:

Choose an Admin user to manage your server.  This is not the ORACLE user for the box, but an ADMIN user
Enter in the admin user name, example: azureuser

You must choose a location region to deploy your resources to.  The list as follows:
Enter the zone from the list above:

The script will then deploy your VM in Azure:

  "id": "/subscriptions/73aa270e-fffd-411a-b368-b44263f61deb/resourceGroups/orabkup_grp",
  "location": "westus2",


      "provisioningState": "Succeeded",
      "resourceGroup": "orabkup_grp",
      "sourceAddressPrefix": "*",
      "sourceAddressPrefixes": [],
      "sourceApplicationSecurityGroups": null,
      "sourcePortRange": "*",
      "sourcePortRanges": [],
      "type": "Microsoft.Network/networkSecurityGroups/securityRules"
  "subnets": null,
  "tags": {},
  "type": "Microsoft.Network/networkSecurityGroups"
Deployment of Oracle VM ora183db1 in resource group orabkup_grp Complete
Keys generated for authentication
Admin name is azureuser

Setup Environment

Now, log into the new VM, set your Oracle home, start the listener and SID

Create your data directory.  For this example, I’m just going to add a second directory in the /u01, but you can add a disk and place it there:

sudo mkdir /u01/data
chown oracle:oinstall /u01/data

Switch over to Oracle and start the listener:

sudo su - oracle
export ORACLE_HOME= /u01/app/product/
lsnrctl start

Create your Oracle 18c Database:

dbca -silent \
       -createDatabase \
       -templateName General_Purpose.dbc \
       -gdbname cdb1 \
       -sid cdb1 \
       -responseFile NO_VALUE \
       -characterSet AL32UTF8 \
       -sysPassword OraPasswd1 \
       -systemPassword OraPasswd1 \
       -createAsContainerDatabase true \
       -numberOfPDBs 1 \
       -pdbName pdb1 \
       -pdbAdminPassword OraPasswd1 \
       -databaseType MULTIPURPOSE \
       -automaticMemoryManagement false \
       -storageType FS \
       -datafileDestination /u01/data \

The output will look like the following:

Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
Database Information:
Global Database Name:cdb1
System Identifier(SID):cdb1
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb1/cdb1.log" for further details.

Once the database creation is complete, then a few steps can be performed to set up the TNSNAMES, etc. or you can proceed to simple log in and work with this new database using a bequeath connection.



One thought on “Create a Simple Oracle VM on Azure IaaS

Comments are closed.