Azure Virtual Machine Tutorial

In this comprehensive guide, I will walk you through everything you need to know about Azure VMs. We’ll cover the core concepts, deep-dive into the technical configurations, and I’ll lead you through a step-by-step tutorial on how to deploy your first instance.

Azure Virtual Machine Tutorial

What is an Azure Virtual Machine?

Technically, an Azure VM is an Infrastructure as a Service (IaaS) offering that provides on-demand, scalable computing resources.

Unlike physical hardware that requires space, power, and maintenance in a local office, Azure VMs run on Microsoft’s global hardware. You get to choose the operating system (Windows or Linux), the processing power, the memory, and the storage. You own the OS and the software, while Microsoft handles the physical “metal” underneath.

Why Choose Azure VMs in 2026?

As we move further into 2026, the cloud landscape has evolved. We aren’t just “moving to the cloud” anymore; we are optimizing for it.

  • Total Control: You have administrative access to the OS. If you need to install custom drivers or specific legacy software that won’t run in a container, a VM is your only choice.
  • Scale: I can go from a single 1-core machine for testing to a 416-core beast for high-performance computing (HPC) with a few clicks.
  • Hybrid Integration: With tools like Azure Arc, I can manage my VMs in the East US region alongside my on-premises servers in my Chicago data center through a single pane of glass.

Different Types of Azure Virtual Machines

Here are the different types of Azure Virtual Machines:

Compute-Optimized

This type of VM has a high memory-to-CPU ratio. It is great for medium-traffic web servers, application servers, and network equipment. 

General Purpose

General purpose boasts a balanced memory-to-CPU ratio. It is mostly suitable for the deployment of databases for small or medium-sized organizations. 

Storage-Optimized

This VM possesses high IO and disk throughput, which is excellent for NoSQL databases, Big Data, SQL, big transactional databases, and data warehousing. 

Memory-Optimized

This type of VM leans towards a high memory-to-CPU ratio. It is ideal for medium-to-large caches, memory analytics, and relational database servers. 

High-Performance Compute

These VMs are the most powerful and the fastest VMs that are equipped with RDMA (high-throughput network interfaces).

GPU

It is a specialized VM type that targets video editing and heavy graphics rendering. It can also be used for differencing with deep learning and modern training. Users can either have multiple GPUs or a single GPU.

Workloads

In cloud computing, the workload is the amount of processing time a computer gives to complete a certain task. The workload has application programs being processed on the computers. Some users also connect to and interact with the computer’s applications. The workload in the Azure Virtual Machine is divided into two categories.

Unsuitable Workloads

The services or applications not suitable for Azure VM workload IaaS are:

  • Controlled environment workloads that are unable to move to the cloud due to the rules
  • Small businesses that can run the service at a lower cost compared to using the cloud

Suitable Workloads

The services and applications suitable for Azure VM workloads are:

  • Workloads such as online commercial stores
  • Businesses with an unpredictable growth rate, such as a short-term increase in sales and development in the organization 
  • Workloads for retail sales during festival holidays

Key Concepts to Master Before You Deploy

1. VM Sizes and Families

Azure categorizes VMs into “families” based on their hardware optimization. Choosing the right one is the most important decision you’ll make.

FamilySeriesBest For…
General PurposeD-Series, B-SeriesWeb servers, small databases, development/test environments.
Compute OptimizedF-SeriesBatch processing, web servers with high traffic, analytics.
Memory OptimizedE-Series, M-SeriesIn-memory caches (Redis), large relational databases (SQL Server).
Storage OptimizedL-SeriesNoSQL databases (Cassandra, MongoDB), data warehousing.
GPU OptimizedN-SeriesVideo editing, AI/Machine Learning training, 3D rendering.

2. Azure Regions

Azure has data centers all over the world. For my users in the USA, I typically recommend choosing regions like East US, West US 2, or Central US to minimize latency.

3. Networking (VNets and Subnets)

Your VM needs a home. A Virtual Network (VNet) is your private network in the cloud. I always suggest segmenting your network into subnets (e.g., a “Web” subnet and a “Database” subnet) to improve security.

4. Storage Disks

You aren’t just picking “a hard drive.” You have options:

  • Standard HDD: Good for backups and infrequent access.
  • Standard SSD: A solid balance for web servers.
  • Premium SSD: My default recommendation for production workloads.
  • Ultra Disk: For the most demanding IOPS (Input/Output Operations Per Second) requirements.

Step-by-Step Tutorial: Deploying Your First Azure VM

Now, let’s get our hands dirty. In this tutorial, I’m going to walk you through the process of creating a Windows Server 2022 VM in the East US region. I’ll assume you already have an Azure account. If not, Microsoft offers a free trial that includes $200 in credits.

Step 1: Initialize the Process

Log into the Azure Portal (https://www.google.com/search?q=portal.azure.com). In the search bar at the top, type “Virtual Machines” and select it. Click on + Create and then select Azure virtual machine.

Step 2: Configure the Basics

This is the “Project Details” section.

  • Subscription: Choose your active subscription (e.g., “Pay-As-You-Go”).
  • Resource Group: I like to keep things organized. Click “Create new” and name it something like RG-Tutorial-USA.
  • Virtual Machine Name: Let’s name this WebSrv-NYC-01.
  • Region: Select (US) East US.
  • Availability Options: For this tutorial, select “No infrastructure redundancy required.” However, for production, I always use Availability Zones to ensure 99.99% uptime.
  • Image: Select Windows Server 2022 Datacenter: Azure Edition.

Step 3: Select Your Size

Click “See all sizes.” For a basic tutorial, the Standard_D2s_v5 (2 vCPUs, 8 GB RAM) is a fantastic, balanced choice. It’s powerful enough to handle most tasks without breaking the bank.

Step 4: Administrator Account

This is where you set your login credentials.

  • Username: Avoid generic names like “admin.” Let’s use CloudArchJohn.
  • Password: Use a complex password. Azure requires at least 12 characters.

Step 5: Inbound Port Rules

Since we want to connect to this machine later, we need to open a “door.”

  • Public inbound ports: Select “Allow selected ports.”
  • Select inbound ports: Choose RDP (3389).

Expert Tip: In a real-world scenario, I would never leave RDP open to the entire internet. I would use Azure Bastion for a secure, browser-based connection. But for this tutorial, we’ll stick to basic RDP.

Step 6: Disks and Networking

You can usually leave the Disks tab as default (Premium SSD).

In the Networking tab, Azure will automatically create a new Virtual Network and a Public IP for you. This is perfect for our purposes. Ensure the “NIC network security group” is set to Basic.

Step 7: Review and Create

Click the Review + create button. Azure will run a validation test to make sure your settings are compatible. Once you see “Validation passed,” hit Create.

It usually takes about 2 to 4 minutes for the deployment to finish. You can track the progress in the “Notifications” (bell icon) at the top right.

Check out the complete steps with screenshots on How to Create Azure VM (Virtual Machine).

Post-Deployment: Connecting and Managing

Congratulations! Your server is now running in a data center somewhere on the East Coast. But a server is useless if you can’t talk to it.

Connecting via RDP