DEV Community

Cover image for Creating a Virtual Machine in Azure: A Step-by-Step Guide for Beginners
Henrietta Takor
Henrietta Takor

Posted on

Creating a Virtual Machine in Azure: A Step-by-Step Guide for Beginners

Do you want to create a virtual machine (VM) in Azure but are unsure of where to begin? Fear not, we will walk you through a quick and simple step so you can follow along.

The digital equivalent of a physical computer is known as a virtual machine (VM). In essence, a virtual machine is a computer that runs on another computer. This virtual machine can be configured to run a variety of operating systems, software, and configurations.

So, how do you create a virtual machine in Azure? Here are the steps to take:

Step 1: Sign up / log in to Azure

If you haven't signed up for an Azure account yet, you can easily create one using this link follow the steps on the website and log in to the Azure portal.

Step 2: Create a new Virtual machine

Click on Virtual Machine (VM) from the home page of the portal.

Image description

If you can't find it on the portal's home page, type virtual machine into the search box. Select Virtual machine from the Azure services menu.

Click on Create and select Azure virtual machine from the drop down menu

Image description

This will lead you to a configuration screen for your virtual machine

We have the option to create a new resource group by clicking on Create new.

Image description

We will give our resource group a name called marchload.

At this stage, you can give your VM a name and we will call our VM henriettavm. You can select your preferred Region and Availability zone from the drop down menu.

Image description

Step 3: Choose your operating system

Under instance details, select your operating system from the Image drop down menu. Azure provides a wide range of operating systems, including multiple versions of Windows and Linux.
We will be selecting Windows Server 2019 Datacenter - x64 Gen 2 as shown in the image below.

Image description

Step 4: Choose your VM size

Enter the size of your virtual machine from the Size option. This will be determined by your requirements, such as the amount of RAM and CPU power required.

Image description

Step 5: Create a username and password

Under the Administrator account section, create a username and password. This will be used to log in to your virtual machine.

Image description

Under inbound port rule choose Allow selected ports and select HTTP (80) and RDP (3389) from the drop down menu.

Image description

After you've finished all of the steps, click on the Review + Create button at the bottom of the page. You will see a message saying Validation passed.

Image description

After the validation passes, go through your settings and change the monitoring and select Disable (you can also keep the default setting under monitoring)

Image description

Click the "Create" button

Image description

Azure will then begin the process of constructing your virtual machine, which could take a few minutes

Image description

After deployment has been completed, click on Go to resource

You have now successfully created a virtual computer on Azure!

To connect to the VM, click on Connect and then the RDP option on the overview page of Virtual Machine.

Image description

Download the RDP file

Image description

Open the downloaded RDP file and click Connect when prompted

Image description

Input your credentials you created under the Administrator account section

Image description

Congratulations you have created your first Virtual Machine!

Image description

You may now use it for whatever reason you require!

Top comments (0)