How To Create a Linux Virtual Machine In Microsoft Azure

How To Create a Linux Virtual Machine In Microsoft Azure

Welcome! We will be exploring the steps involved in setting up a Linux Virtual Machine using Ubuntu Server poco a poco, in this blog post. As a newbie to the functionalities of MS Azure, you should know by default that SSH (Secure Shell Protocol is a cryptographic network protocol for operating network services securely and over an unsecured network) access to virtual machines often relies on Public Key Authentication for enhanced security. But in this blog, we will use Password-based Authentication

Furthermore, herein we will learn how to prevent unexpected SSH disconnections due to idle sessions, this is pertinent to extend the idle timeout for your IP address because this prevents unexpected logouts always initiated automatically by the Portal

Let's get Started!!

FIRST SIGNUP OR SIGNIN TO AZURE PORTAL

To carry out all that we will be doing as a prerequisite, you need an Azure subscription. Go to www.portal.azure.com to sign up by creating a Free Account if you do not already have one.

By now you should have created your Azure subscription.

To get started sign in to the Azure portal using your e-mail and password

A type of Interface below ensues showing the name of your subscription mine is MARTADVISORY

LET’S CREATE YOUR VIRTUAL MACHINE

There are several ways of starting out and getting into the “Create Virtual Machines” interface in Azure:

  1. By Clicking Create Resource “+” sign

  2. By using the search Bar

  3. By Clicking Virtual Machines directly on your portal.

I will be using methods 1 and 2 in my explanations.

Method 1. By Clicking the Create Resource “+” sign.

a. In your Portal Click the Large “+” sign you see tagged “Create A Resource”

b. On the “Create A Resource page” that ensues search for and Click on "Virtual Machine” when seen.

Method 2. By using the Search Bar

a. On the search bar, type "Virtual Machine"

b. From the search results, select "Virtual Machines" from the list of resources shown

Methods 1 and 2 takes us directly to the same page which is the “ Create a Virtual Machine Basics Page”

Which is depicted by the diagram below

Project Details

In the project details category, we have the subscription and resource group;

a) Subscription

The subscription means what gives you access or the right to use Microsoft Azure. This subscription can be reckoned as membership of Microsoft Azure community of Users which is dependent upon your kind of membership. This actually gives you a free opportunity and to make preliminary choices as you navigate the portal which allows you an opportunity to investigate and try different things with Microsoft Azure before you have paid membership.

b) Resource Group

A Resource Group in Azure can be likened to somebody with a briefcase that allows you gather and have access to various Assets or Resources such as Virtual Machines, Blob Storage and Data Sets in the Azure cloud that you will be using.

Envision you have a room with various things dissipated out of control. It becomes testing to find what you want when everything is topsy turvy. In this situation, the room addresses your Azure cloud climate, and the assets are the things in the room. Presently, imagine you choose to clean up and organize your things where they are at first intended to be. Every compartment keeps related things coordinated and makes it simpler to find what you really want which is the work of a Resource Group.

In the how-to guide, select your Resource Group or click on "Create new" to create a new Resource Group.

In the box that pops up, type your preferred Name for Your Resource Group, then choose okay to save the name

Instance Details

a) Create a name for your virtual machine.

b) At the region section, select the Geographical Location you want your Virtual Machine to be.

c) Next, click on the drop-down to select your availability option and availability Zone.

A Region alludes to a particular geological area with server farms that have framework and administrations. Every area works freely and is intended to be independent, with its own arrangement of assets and foundation.

In Azure, a Region can comprise of three availability zones, known as Zone 1, Zone 2 and Zone 3. Each zone has at least one server farms These server farms are furnished with autonomous power, systems administration, and cooling framework to limit the effect of disappointments and interruptions. What truly connects these server farms together is Fiber Optic Link. Fiber optic innovation takes into account rapid information transmission over significant distances while keeping up with low dormancy and high transfer speed capacities.

Inbound Port Rules

a) In this category, select SSH (22) as your inbound port to connect to the Linux server

.

b) Click "Next: Disk>" to direct you to the disk page

b) Leave the networking, management, monitoring and advanced pages as default

Leave as default

.

Leave as default

Leave as default.

Skip to the Tag page.

Tag

Tags are a way to label and organize resources in cloud computing environments. The purpose of tags is to provide metadata or additional information that helps in managing, organizing, and tracking resources within a cloud infrastructure.

a) Give your tag a name

b) Next, click on Review+create Review the summary of your virtual machine configuration

Click on the "Create" button to begin the deployment process

d)Once the deployment is complete, click on "Go to resource"

.

CONNECT TO YOUR VIRTUAL MACHINE

a) Click on the connect button to SSH to your Virtual Machine

In the diagram above Under Native SSH we 1. Configure Prerequisites for Native SSH

2. At this Juncture your launch Windows PowerShell on your desktop

3. Copy and Execute SSH command. and run the example Command below to connect to your VM (inadvertently not captured here)

showing [ssh-i<PrivateKey Path>martinsadvisory@20.82.7.148]. You are to create a new formular deleting entire private key path to connect to your VM using Powershell as below:

ssh.username@ipaddress

ssh.martinsadvisory@20.82.7.148

Enter the command above and press enter.

You would be asked if you want to continue connecting, type "yes" and press enter

I can see it has been a very simple journey to create our Linux Virtual machine. Please keep coming to my Blog to get the latest in Tech.