OCI, Create Virtual Machine in oracle cloud

How to create Viirtual Machine in Oracle Cloud?

Oracle Virtual Machine

From menu select Compute/Instances

OCI Virtual Machine - Menu to select Compute/Instances

Click Create Insatnce

Create instance
Create Instance

Enter Instance Name

Select Compartment where you want this machine.

Detail form to create insance

Click on Networking/Edit to edit the network setting

Select Virtual Cloud Network
Select Subnet – Public Subnet
Select Public Ip

Enter private IP – IP needs to be in the range defined for the public subnet. If you don’t enter, the process will assign IP from the available range.
Enter hostname

VM - networking setting

Add SSH key. I have pregenerated RSA key pair and I paste my public key. If you don’t have you can use function to generate a key pair – make sure you save that key in your PC – you will not see it second time.

vm - public key

Click Create

After a couple of minutes, the instance will be provided and available for you to log in.
On the instance page, you will see a public IP address. This IP is assigned dynamically when the instance is created. When you create new instance this IP will change.

Oracle provides an option to have persistent IP – it is a topic of another post.

VM - status page

Login to instance using SSH connection.

You can use putty to connect to your server, default user is OPC user. This user has a sudo access that now after you connect you can configure your server as needed.

Add new user,
Install required application like apache, MySQL

Login to server using ssh opc@IP

Leave a Reply

Your email address will not be published. Required fields are marked *