How to Create Virtual Machine in Azure – 2024

Introduction

How to create Virtual Machine in Azure is the question in your mind and you are looking for an answer. I am here to guide you on how to create vm in Azure. Before you start creating a Virtual Machine, you need to have a Virtual Network created. So make sure you have a VNET or virtual network created.

how to create virtual machine in azure

Step 1: How to Create Virtual Machine in Azure – Azure Subscription

To create a VM in Azure, you must have an Azure subscription. This article will focus on creating virtual machines, so if you want to know the Azure Account Creation Guide, then check out this tutorial here.

Step 2: Login to Azure Subscription

Now, I am assuming you are already login to Azure Portal. Link https://portal.azure.com

There are different ways to create Virtual machine. I will show you all the possible methods to Create Virtual machine.

Step 3: Create a Resource

Once you are on the dashboard, you will see Create a Resource. Click on it.

Azure services

Click on Virtual Machine.

How to create virtual machine in azure - virtual machine

Once you click on the virtual machine, you will see the Create a Virtual Machine page. Here, you will need to fill in the details to create an Azure VM.

In the Basics tab, you will see the below-selected parameters. Fill them in or select from the drop-down list.

For my VM, I selected the below parameters.

Step 4: Select Subscription

Subscription: Pay-As-You-Go. But if you are creating a VM in your organisation, then you need to select the specific subscription name. If you are doing practice, then select a pay-as-you go subscription, or you can create your own subscription as well.

create a virtual machine

Step 5: Create or Select Resource Group

You can create a new resource group or select an already created resource group. Normally, in organisations, resource groups are already created with some automations, like Terraform or Powershell. You can check out here how to create a resource group with automation. 

In the below image, you can see that I have created some of the resource groups for testing purposes. So I will select one of them.

select resource group to create a virtual machine in azure

Step 6: Virtual Machine Name

Now, it’s time to give VM Name to the virtual machine we are creating. Use testVM001 or whatever naming convention your organisation follows.

select instance name to create virtual machine in azure

Step 7: Select a Region

As of now Azure has 60 regions, so you can select the region nearby your users location. Users who will be accessing the server. Most organisations select regions nearby to their location, so that they will get good performance. 

For example, if you are deploying this VM for Application and users are based in US region, so there is no point to deploy VM in APAC region. VM should be deployed in the US region only.

So, select the region near to users location. I selected Central US.

select region to create vm in azure

Step 8: Availability Zone

Select it if you want to use the Availability zone. Otherwise, select No infrastructure redundancy required.

select AV zone to create VM in azure

You can select multiple zones as well for the same VM, and the VM will be deployed in multiple selected zones. Otherwise you can create VMSS and then deploy the VM.

How to create Virtual Machine in Azure

Step 9: Select Security

Select the Security as Standard or you can select Trusted Launch virtual machine for more secure VM.

How to create Virtual Machine in Azure
How to Create Virtual Machine in Azure - 2024 30

Step 10: Select OS Image

Azure has multiple operating system images; select the desired OS image. You can have your own custom image to deploy VM’s in Azure. I will create tutorial to Create Custom Image in near future.

How to create Virtual Machine in Azure

and then select VM architecture

How to create Virtual Machine in Azure

Step 11: Username, Inbound Port,Licensing

Now, give username, password, Inbound port rules and select Licensing option. For inbound port rules, if you are creating VM in organisation then make sure to check if you can do so, because organisations do not wants to give public access to Virtual Machine so easily. They can have different FW rules to give public access.

VM Size:  By Default, Azure will suggest you one of the VM size which has lower specs and costing. You can click on the See all Sizes

How to create Virtual Machine in Azure

Step 12: Select VM Size,Licensing

You can select or search the VM size from the list and select your desired VM size. I will keep default VM size.

How to create Virtual Machine in Azure

How to create Virtual Machine in Azure

For licensing, you can click on the check box if you already have licences and are using any KMS server for licensing, or else do not click on the checkbox.

Step 13: Select Disk Size to Create Virtual Machine in Azure

Click on Next:Disks: here we need to configure disks size.

How to create Virtual Machine in Azure

Here, select the type of the OS disk. It depends on your architecture, but it’s always good to have SSD disks. Premium SSD disks are more expensive than the other 2 types of disks. So, select disks cautiously.

How to create Virtual Machine in Azure

Additional Disks:  If you plan to add additional disks during creation, then you can click on Create and attach a new disk or if you already have an existing disk, then you can attach it to the VM. Check out on how to create a new disk and add an existing disk to the VM.

How to create Virtual Machine in Azure

Step 14: How To Add Virtual Machine in Network: – Networking Tutorial

Networking is the most important step and without having the correct networking setup Virtual Machine can not be accessed.

Virtual Network

In the networking tab, you need to select Virtual Network. VNET or Virtual Network needs to be created before you create a virtual machine.

How to create Virtual Machine in Azure

Select the VNET, and then it will show all the subnets from that VNET. Select correct subnet to add VM and get IP from the subnet range.

How to create Virtual Machine in Azure

Select Public IP if required otherwise select None.

How to create Virtual Machine in Azure

Select Network Security Group, for now you can select Basic.

How to create Virtual Machine in Azure

But if you really want to secure a VM, then click on Advanced and select NSG with specific rules.

How to create Virtual Machine in Azure

If your organisation has a certain way to take RDP, then select none for public inbound ports. If you are creating VM in your testing environment, then select port 3389 to take RDP.

How to create Virtual Machine in Azure

You can skip Management tab settings for now.

How to create Virtual Machine in Azure

Monitoring Tab settings will be important if you want to monitor the VM performance or diagnose VM in future.

Select Enable with custom storage account and then select the storage name to store logs and diagnostic information.

How to create Virtual Machine in Azure

Step 15: Adding Tags to Virtual Machine in Azure

Organizations want to manage VM’s with the help of tags. Tags play an important role in Billing. So use tags for all virtual machines.

How to create Virtual Machine in Azure

Finally, we can Review and Create Virtual Machine.

How to create Virtual Machine in Azure

I hope this guide was helpful.

Conclusion

By following this guide, you will be able to create virtual machine using GUI interface. In the upcoming guide, I will create VM using Powershell, Terraform, Azure CLI and also using custom image.

How can we create a virtual machine in Azure?

This guide is very easy to follow to create a virtual machine in Azure. So, follow the guide and try to create a virtual machine in Azure.

How many ways can you create a virtual machine in Azure?

We can create an Azure virtual machine by using Azure CLI, Powershell, ARM template, Manage Image, and Custom Image.

Nilesh Kamble is Certified in Microsoft & GCP, having 13+ Years of Experience in IT Industry. As a Senior IT Employee, having vast experience on Windows Server, Windows Client, Powershell, Cloud Technologies. Passionate about Laptop, Mobiles & Other emerging Technologies.