8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Vm » Here

Oracle Cloud Infrastructure (OCI) : Create a Compute VM

This article shows how to create a compute virtual machine under Oracle Cloud Infrastructure (OCI).

Related articles.


This article assumes you've already defined a Virtual Cloud Network (VCN) in the same compartment as the compute VM you are about to create. You can see how to do that here.

Create SSH Key

Before you start, you are going to need a key pair for authentication to your service.

$ ssh-keygen -b 2048 -t rsa -f myOracleCloudKey
$ chmod 600 myOracleCloudKey*

Enter and confirm the passphrase when prompted. You will be asked to upload the public key during the service creation.

If you have any problems, or need instructions for using PuTTYgen on Windows, check out the documentation here.

Create a Compute VM

Log into the Oracle Cloud and navigate to the Oracle Cloud Infrastructure (OCI) console. You can click the link "Create a VM instance" link on the console.

Oracle Cloud Infrastructure : Console

Alternatively, you can use the "Compute" menu option.

Oracle Cloud Infrastructure : Compute Menu

Select the compartment of interest and click the "Create Instance" button on the compute dashboard.

Oracle Cloud Infrastructure : Compute Dashbaord

Fill in the instance details. The content should be self explanatory. When you are ready, click the "Create Instance" button.

Oracle Cloud Infrastructure Console

Wait for the instance to be provisioned.

Oracle Cloud Infrastructure Console

After a few minutes you will have a running VM, with the public IP address listed on the detail page.

Oracle Cloud Infrastructure Console

Connecting to the VM using SSH

Connect to the "opc" operating system user by specifying your private key and the public IP address from your DB Systems page.

$ ssh -i ./myOracleCloudKey opc@

[opc@obvm1 ~]$

Once connected, you can run commands using "sudo", or switch to "root".

[opc@obvm1 ~]$ sudo su -
Last login: Sat Oct 20 13:59:49 GMT 2018 on pts/1
[root@obvm1 ~]#

For more information see:

Hope this helps. Regards Tim...

Back to the Top.