Creating Virtual Machine on Microsoft Azure.

DeadShot
5 min readApr 9, 2021

There are many instances when you might need to use VM, short for Virtual Machine, may be you want to host your very first website or application on cloud or you just want to learn how to operate other operating system than the one you are using currently.

Whatever the case is the bottom line is you require a VM and in this article, I will show you step-by-step exactly how to create one yourself.

Azure VM
Azure Virtual Machine

The very first thing you need is an Azure subscription which you can get from here. Bear in mind that you need to give credit card details in order for you to get verified as valid user, or if you are a student with student email, then you can get your subscription without any credit card information.

Once you have a valid Azure subscription, you are ready to begin. We will be using Azure portal, which is a graphical user interface to access and use all the services Azure has to provide in much easier and friendlier way. Go to this link: https://portal.azure.com/ and sign in using your account where you have an Azure subscription. You will see this page:

Azure Home page

You can then either click on Virtual Machine option under Azure Services:

Virtual Machine option on Home page

or click on the menu toggle on the left top corner:

Virtual Machine option on Toggle menu

or if still can’t find Virtual Machine option, you can search in the search bar select Virtual Machine option from there:

Virtual Machine option from Search bar

Once you clicked on the Virtual Machine option, you will be redirected to the VM management page, where you need to press on Add → Virtual machine:

From there you will land on the page where the VM is actually created, on this page you will see a lot of options, but don’t worry I will summarize all the options one by one. Let’s go though all the option that available under Basics tab:

  • Subscription: Choose your Azure Subscription from the list, yours can be different than mine.
  • Resource group: You can either choose the existing resource group of click create new and give it any name you prefer.
Instance details
  • Virtual machine name: Give your virtual machine a name.
  • Region: Select the region where you want your virtual machine to reside in, a rule of thumb is to choose a region where most of your customers are from, or if it is for personal use, the one closest to you.
  • Availability options: You can leave this option as this is not necessary. If you are curios you can get more information here.
  • Image: Choose your preferred operating system from a big list of available options. I will be choosing Ubuntu for the sake of this tutorial.
  • Size: Choose which size best suit your need, if your virtual machine is for personal use then I would recommend to choose something lighter, as the more specs you select, the higher the price will be.
Admin account
  • Authentication type: Choose Password option as it is fairly easy as a beginner to set it up and access it. If you’re familiar with accessing machines through SSH public key, then you can choose SSH public key option.
  • Username: This will be the username of the admin account of your virtual machine.
  • Password: Give a password to the user, and DON’T FORGET IT (advice from an experienced forgetful person).
  • Confirm Password: Confirm your password.
Inbound port rules
  • Public inbound ports: Since you need to access your machine later through SSH, you need to select Allow selected ports option.
  • Select inbound ports: Select all the ports that you require, port 80 is for all the HTTP traffic, port 443 is for all HTTPS traffic, and port 22 is for SSH connections which we will use to connect to our virtual machine.

Once you have entered all the information, you can click “Review + create” and give Azure couple of seconds to review everything in your new VM settings:

Once Azure finishes reviewing your virtual machine settings, it will chow the green “Validation passed” banner along with summary of your new virtual machine for you to review it. Once you have reviewed and checked everything, you can click “Create” to create your virtual machine:

Wait for couple of minutes as Azure will gather all the resources needed for you virtual machine and create it for you. Once the deployment of your new virtual machine is complete, Azure will notify you and you will see this page:

Well that’s it, you have created your very first virtual machine. Now you can go ahead and host your website, learn new OS, or do whatever your heart desire with it.

--

--