How To Create a Linux (Ubuntu) Virtual Machine in Microsoft Azure.

How To Create a Linux (Ubuntu) Virtual Machine in Microsoft Azure.

Linux Operating System also known as Ubuntu is an OS designed to support high-volume applications e.g. Web servers, database servers, file servers e.t.c

Creating a Linux virtual machine is almost like creating any other window in Azure following the same procedures but slightly different at some point.

As a prerequisite like any other resource, you must have an active subscription with which to gain access to Azure and be able to create a virtual machine and resource group.

CREATE VIRTUAL MACHINE

To create a Linux Virtual Machine, assuming that you have created an Azure account with an active subscription

a. Log into your Azure account. This can be done in three (3) ways:

i. Type virtual machine in the 'Search Resource' bar and select 'Virtual Machine from the displayed result

ii. Click on the Portal Menu' (the three vertical lines) at the top left-hand corner of the display page. Scroll down to select Virtual Machine.

iii. Or click on Virtual Machine directly on the welcome Azure main page.

b. Click on Virtual Machine.

c. Click on 'Create' and Select Azure virtual machine from the list of popped-up resources.

You will be directed to the 'Basic' section with 'Project details, Instance details, Administrator account, and Inbound port rules as the basic tools for creating your virtual machine.

Project Details

In this category, we have the 'Subscription' and 'Resource group'. Azure subscription gives you access to various services that allow you to create any resource.

a. Ensure you have a subscription running. Here, I have a subscription and show Azure Subscription 1.

b. Click on the 'Create new' resource group. Type any name as your resource group or click on the drop-down arrow to select an existing name

Instance details

In this instance details category

a. Give your Virtual Machine a name

b. Click on the drop-down arrow to choose a region from the list. You are to choose only one region.

c. Click the availability options drop-down arrow and select from the list.

d. For availability zone, it is recommended that you choose 'all three zones'

e. In the security section, select your security type

f. In the image section, simply select an Operating System. In this case, we select the Linux Operating system also known as Ubuntu. An Image is any Operating System that you want to create.

g. Size is the Virtual CPU and RAM of your selected Operating system. Click on 'See all sizes' to select from.

Administrator account

a. Select the authentication type. For the Linux operating system, the default type is SSH public key. For selecting this option, Azure will generate a public key that you can store for future use.

b. Type in a username as an administrator that you can remember.

c. Click on the drop-down arrow button on your SSH public key source and choose from the option. Leave it at Generate new key pair.

d. Create a key pair name

Inbound port rules

a. Select 'Allow selected port'

b. The inbound port for Linux is SSH (Secure Shell Protocol). You may choose to add HTTP (80)

c. Click on Next - Disk

OS DISK

a. OS Disk is on default mode.

b. Click on the drop-down arrow button and select SSD standard or any disk type of choice.

c. Select 'Platform-managed key from the drop-down arrow button

d. Click Next-Networking

e. Click Next-Management

f. Click Next-Monitoring

g. Click Next-Advanced

Tags.

This is a way to organize resources in the cloud computing environment.

a. Tag resources you have created by labeling them with identifiable names.

b. Type the value.

c. Click on Next - Review + Create. The system will validate your virtual machine configuration and certify passed.

Connection to Linux Virtual Machine

a. Click on download private key and create resource.

b. The Linux virtual machine has been deployed. Wait for the process to be complete

c. Deployment process complete. Click on 'Go to Resource' below

d. Click on Connect to connect

e. There are two options here. Select 'Native SSH and click on the Select button below.

Go over to Taskbar, at the lower left corner of your PC marked with RED color, and type Window PowerShell.

Click on this download file icon to locate the key that was generated or you go to the file folder and search for the key.

Or, click on File Explorer below and select download. Click to open and search for your key.

I found my key after opening my download files icon.

Copy the URL of the key.

Open the Window PowerShell

Type ssh -i

Tap the space button on your keyboard to create a space, then copy your PATH (key URL) and paste it

Tap the space key on your keyboard to create a space, then copy and paste your Linux Virtual Machine username

Type this special key @ immediately after your username

Then copy and paste your Public IP address from the resource group page without space and click the enter key on your keyboard

A command prompt will display asking if you want to continue. Type YES and press the Enter key to have your connection completed and the Linux Virtual Window ready for use.

I hope this content has been of tremendous help in your process of creating a Linux Virtual Machine.

Thank you.