Azure Infrastructure Series #6: Azure Virtual Machines Overview & Choosing the Right Azure VM Size

Advertisement

Azure Infrastructure Series #6: Azure Virtual Machines Overview & Choosing the Right Azure VM Size

Azure Infrastructure Zero to Hero Series – Week 6

Author: Lakshan Fernando

Category: Microsoft Azure Infrastructure

Level: Foundation to Intermediate (100)

 

Azure Virtual Machines: Everything You Need to Know and How to Choose the Right VM Size

Cloud computing has transformed the way organizations deploy applications, but not every workload can immediately move to platform as a service (PaaS) or containers. Many business applications still require full operating system control, legacy software support, custom security configurations, or specialized hardware. This is where Azure Virtual Machines (Azure VMs) become one of Microsoft's most powerful Infrastructure as a Service (IaaS) offerings.

Azure Virtual Machines provide scalable, secure, and highly available computing resources that eliminate the need to purchase, maintain, or refresh physical servers. Whether you're migrating an existing datacentre, deploying enterprise applications, building development environments, or running high-performance workloads, Azure VMs provide the flexibility to meet virtually any business requirement.

In this article, we'll explore Azure Virtual Machines from the ground up, understand how they work, examine the different VM families, and learn how to choose the right VM size for your workloads while optimizing cost and performance.

 

What is an Azure Virtual Machine?

An Azure Virtual Machine is a software-based computer running inside Microsoft's global cloud infrastructure.

Just like a physical server, an Azure VM includes:

  • CPU
  • Memory (RAM)
  • Storage
  • Network interfaces
  • Operating System
  • Applications

The difference is that Microsoft manages the physical hardware, while you manage everything inside the virtual machine.

This follows the shared responsibility model, where Microsoft is responsible for:

  • Physical datacentres
  • Hardware maintenance
  • Networking infrastructure
  • Hypervisor
  • Physical security

Customers are responsible for:

  • Operating System
  • Applications
  • Updates
  • Security
  • Antivirus
  • Data
  • User access
  • Backup configuration

Think of Azure Virtual Machines as renting powerful enterprise servers only when you need them instead of buying expensive hardware.

 

Azure VM Architecture

A typical Azure VM consists of multiple Azure resources working together.

Every component can be managed independently.

 

Components of an Azure VM

Virtual Machine

The compute resource that runs your operating system.

Examples:

  • Windows Server
  • Ubuntu
  • Red Hat Enterprise Linux
  • SUSE Linux
  • Debian

 

Managed Disks

Azure stores VM disks separately from compute resources.

Types include:

OS Disk

Contains:

  • Operating System
  • Boot partition
  • System files

Data Disk

Stores:

  • Databases
  • Application files
  • User data
  • Logs

Temporary Disk

Provides:

  • High-speed temporary storage
  • Page files
  • Cache
  • Scratch data

Important:

Temporary disks are not persistent.

Data will be lost if the VM is moved or redeployed.

 

Network Interface (NIC)

Every VM requires at least one NIC.

The NIC connects the VM to:

  • Virtual Network
  • NSGs
  • Load Balancer
  • Public IP

Multiple NICs are supported for certain VM sizes.

 

Public IP Address

Optional.

Required only if the VM needs direct internet connectivity.

Examples:

  • Bastion replacement (not recommended)
  • Testing
  • Public web servers

Best practice:

Avoid assigning Public IPs whenever possible.

Use:

  • Azure Bastion
  • VPN Gateway
  • ExpressRoute
  • Jump Servers

 

Virtual Network (VNet)

Every Azure VM belongs to a subnet inside a Virtual Network.

VNets provide:

  • Private communication
  • DNS
  • Routing
  • Isolation

 

Azure VM Deployment Models

Azure supports several deployment options.

Azure Portal

Best for beginners.

GUI-based deployment.

Azure CLI

Example:

az vm create

Azure PowerShell

Example:

New-AzVM

ARM Templates

Infrastructure as Code.

Repeatable deployments.

Bicep

Microsoft's modern Infrastructure as Code language.

Cleaner than ARM JSON.

Terraform

Popular multi-cloud Infrastructure as Code tool.

VM Images

Azure Marketplace provides thousands of ready-to-use images.

Examples include:

Windows

  • Windows Server 2025
  • Windows Server 2022
  • SQL Server
  • Visual Studio

Linux

  • Ubuntu
  • Debian
  • Red Hat
  • Oracle Linux
  • SUSE

Applications

  • WordPress
  • Jenkins
  • Docker
  • Kubernetes Nodes

You can also upload your own custom images.

 

Azure VM Availability Options

Keeping applications online is critical.

Azure offers multiple options.

Availability Sets

Protect against:

  • Planned maintenance
  • Hardware failures

Uses:

  • Fault Domains
  • Update Domains

Typically provides 99.95% SLA.

Availability Zones

Separate physical datacenters within the same Azure region.

Benefits:

  • Higher resiliency
  • Fault isolation

Supports 99.99% SLA.

Virtual Machine Scale Sets (VMSS)

Automatically creates and manages multiple VM instances.

Perfect for:

  • Web servers
  • APIs
  • Application farms

Supports:

  • Auto Scaling
  • Load Balancing
  • Rolling updates

VM Storage Performance

Azure offers several managed disk options.

Disk Type

Best For

Standard HDD

Archive, Backup

Standard SSD

General workloads

Premium SSD

Production applications

Premium SSD v2

High-performance databases

Ultra Disk

Mission-critical databases

 

Azure VM Pricing

Azure VM pricing depends on:

  • VM Size
  • Operating System
  • Region
  • Storage
  • Network
  • Reserved Instances
  • Spot VM usage

Remember:

Stopping a VM inside Windows does not stop billing.

You must:

Stop (Deallocate)

from Azure Portal or Azure CLI.

Choosing the Right Azure VM Size

One of the most common mistakes organizations make is selecting the wrong VM size.

Choosing a VM that is too small causes:

  • Slow performance
  • High CPU
  • Application crashes

Choosing a VM that is too large results in:

  • Higher monthly costs
  • Wasted resources

Microsoft provides dozens of VM families, each optimized for different workloads.

Understanding VM Naming

Example:

Standard_D4s_v5

Meaning:

Component

Meaning

D

General Purpose

4

vCPUs

s

Premium SSD Support

v5

Generation

 

Azure VM Families

B-Series (Burstable)

Best for:

  • Small websites
  • Test environments
  • Development
  • Domain Controllers
  • Low CPU applications

Characteristics:

  • Low cost
  • CPU credits
  • Burstable performance

Not suitable for constant high CPU workloads.

D-Series (General Purpose)

The most commonly used VM family.

Ideal for:

  • Active Directory
  • File Servers
  • IIS
  • Business applications
  • Medium SQL Servers

Balanced CPU and memory.

E-Series (Memory Optimized)

Designed for:

  • SQL Server
  • SAP
  • Oracle
  • Redis
  • Large in-memory databases

Provides significantly more RAM.

 

F-Series (Compute Optimized)

Designed for:

  • Application servers
  • Gaming servers
  • Batch processing
  • Analytics

Higher CPU-to-memory ratio.

 

M-Series

Enterprise-scale workloads.

Examples:

  • SAP HANA
  • Large databases
  • Mission-critical systems

Supports several terabytes of RAM.

 

L-Series

Storage optimized.

Best for:

  • Big Data
  • Cassandra
  • Hadoop
  • NoSQL databases

Provides extremely high disk throughput.

 

N-Series

GPU-enabled VMs.

Used for:

  • AI
  • Machine Learning
  • Deep Learning
  • CAD
  • Rendering
  • Video Editing

Selecting the Correct VM

Start with workload requirements.

Ask yourself:

How many users?

  • 20 users
  • 200 users
  • 2000 users

 

CPU Usage

High?

Low?

Constant?

Bursting?

 

Memory Requirements

Applications like SQL Server require significant RAM.

 

Storage Performance

Does the workload require:

  • HDD
  • SSD
  • Premium SSD
  • Ultra Disk

Network Throughput

Some applications require:

  • High bandwidth
  • Low latency

 

Future Growth

Always leave room for scaling.

Azure allows resizing VMs later.

 

Common VM Recommendations

Workload

Recommended VM Family

Active Directory

B-Series or D-Series

DNS

B-Series

File Server

D-Series

IIS Web Server

D-Series

SQL Server

E-Series

SAP

M-Series

AI Training

N-Series

Jenkins

D-Series

Dev/Test

B-Series

Azure DevOps Agent

B-Series

 

Rightsizing Best Practices

Never select VM sizes based only on guesswork.

Instead:

  • Monitor CPU utilization
  • Monitor Memory usage
  • Analyze Disk IOPS
  • Review Network throughput
  • Enable Azure Monitor
  • Review Azure Advisor recommendations

Azure Advisor can identify:

  • Oversized VMs
  • Underutilized VMs
  • Cost-saving opportunities
  • Performance recommendations

 

Vertical vs Horizontal Scaling

Vertical Scaling

Increase VM size.

 

Simple but may require a restart.

 

Horizontal Scaling

Add more VMs behind a Load Balancer.

 

Provides:

  • Better scalability
  • Higher availability
  • Fault tolerance

Often implemented using Virtual Machine Scale Sets.

Cost Optimization Tips

Reduce Azure VM costs by following these practices:

  • Stop and deallocate unused VMs.
  • Use Azure Advisor recommendations.
  • Select the correct VM family.
  • Choose reserved instances for long-running workloads.
  • Use Azure Hybrid Benefit if you have eligible Windows Server licenses.
  • Use Spot VMs for interruptible workloads such as testing, CI/CD, or batch processing.
  • Regularly review performance metrics and resize underutilized VMs.
  • Use Autoscale with VM Scale Sets for dynamic workloads.

 

Security Best Practices

Protect Azure Virtual Machines by implementing:

  • Microsoft Defender for Cloud
  • Just-in-Time (JIT) VM Access
  • Azure Bastion instead of Public IPs
  • Network Security Groups (NSGs)
  • Azure Disk Encryption
  • Managed Identities
  • Azure Backup
  • Automatic OS patching
  • Microsoft Entra ID authentication where applicable
  • Least privilege using Azure RBAC

 

Monitoring Azure Virtual Machines

Continuous monitoring helps maintain performance and availability.

Use Azure Monitor to track:

  • CPU utilization
  • Memory usage (via Azure Monitor Agent)
  • Disk latency and IOPS
  • Network throughput
  • Boot diagnostics
  • Guest OS metrics
  • Event logs
  • Performance trends

Integrate with Log Analytics and Azure Alerts to proactively detect issues before they impact users.

 

Final Thoughts

Azure Virtual Machines remain one of the most versatile and widely used services in Microsoft Azure. They provide organizations with the flexibility to migrate existing applications, host enterprise workloads, and build scalable cloud infrastructure without investing in physical hardware.

However, deploying a VM is only the beginning. Selecting the appropriate VM family and size is equally important for achieving the right balance between performance, availability, and cost. By understanding workload characteristics, leveraging Azure Advisor recommendations, monitoring resource utilization, and applying Azure best practices, organizations can maximize the value of their Azure investments.

As your cloud environment evolves, regularly revisit your VM sizing strategy. Azure makes it easy to scale resources up or down, allowing you to adapt to changing business requirements while maintaining operational efficiency and controlling costs.

 

Lakshan Fernando

Lakshan Fernando

System Engineer Following cloud computing technologies. Microsoft Azure AZ-900 , AZ-104, AZ-800, AZ-80, SC-900 & AZ-700

Comments (0)

Success!
Your comment has been submitted successfully. It will appear once approved by an admin.
Men Avatar Woman Avatar

No comments yet. Be the first to share your thoughts!