Virtual Machines Overview
What Is a Virtual Machine?
A virtual machine is Azure's core Infrastructure as a Service (IaaS) compute offering — it gives you the raw resources to run applications, the same way a physical server would, but provisioned and managed through Azure instead of hardware you own. This post covers what a VM actually is and how to think about sizing, redundancy, and cost. VM disks and virtual networking get their own dedicated posts, and so does the more advanced configuration territory: scale sets, availability sets, update and fault domains, Azure Bastion, and load balancers.
Sizing a Virtual Machine
VM size is the selection of CPU cores, RAM, and other resources allocated to the VM, and different sizes are optimised for different kinds of workload — general purpose, compute-intensive, memory-intensive, and so on.
| Classification | Description | Scenarios |
|---|---|---|
| General purpose | Designed to have a balanced CPU-to-memory ratio. | Testing and development; small to medium databases; low to medium traffic web servers |
| Compute optimised | Designed to have a high CPU-to-memory ratio. | Medium traffic web servers; network appliances; batch processes; application servers |
| Memory optimised | Designed to have a high memory-to-CPU ratio. | Relational database servers; medium to large caches; in-memory analytics |
| Storage optimised | Designed for high disk throughput and I/O. | Virtual machines running databases |
| GPU | Specialised virtual machines targeted for heavy graphics rendering and video editing. | Model training and inferencing with deep learning |
| High performance compute | The fastest and most powerful CPU virtual machines, with optional high-throughput network interfaces — the "H" series on the portal. | Workloads that require fast performance; high traffic networks |
A few series are worth calling out specifically.
DS-series VMs are optimised for disk-intensive workloads and support Premium SSDs, which are capable of delivering high IOPS — Premium SSD (Gen 1) scales up to 20,000 IOPS depending on the disk and VM size. DS-series VMs also support Accelerated Networking (SR-IOV), which enables low-latency, high-throughput network performance — a factor that matters for database workloads. Worth knowing: Accelerated Networking isn't unique to DS-series today — it's available on most general-purpose and compute-optimised VM sizes with two or more vCPUs. What DS-series specifically brings to the table is Premium SSD support, which is why it remains a solid, cost-effective choice for SQL Server workloads that need both disk performance and network throughput.
NC-series VMs are designed for GPU-intensive compute workloads, such as machine learning and AI model training. These VMs are more expensive and aren't optimised for disk IOPS or database workloads, making them a poor fit for SQL Server. NV-series VMs are optimised for graphics-intensive applications, such as remote visualisation, using GPU acceleration.
Regions and Redundancy
An Azure region is a geographical area on the planet that contains at least one, but potentially multiple, datacentres nearby and networked together with a low-latency network. Azure intelligently assigns and controls resources within each region to keep workloads appropriately balanced.
An availability set is a logical grouping of virtual machines within a single Azure region that protects against hardware failures within a datacentre, by distributing VMs across multiple fault domains (racks) and update domains — so a rack failure or an update rollout doesn't take out every VM at once. There's no scaling involved; it's purely for redundancy, and an availability set can't protect VMs from a datacentre-level failure — only availability zones can do that. An availability set supports up to 3 fault domains and 20 update domains. Using two or more VMs in an availability set is what actually earns you the 99.95% SLA; a single VM in an availability set on its own doesn't provide that redundancy. There's no extra cost for the availability set itself — you only pay for the VM instances you create — and availability sets give you lower VM-to-VM latency than availability zones, since the VMs sit in closer physical proximity.
An availability zone is a physically separate location within an Azure region, with independent power, networking, and cooling. Deploying VMs across multiple availability zones protects against an entire datacentre failing, giving you stronger isolation than availability sets provide.
Beyond its regular regions, Azure also operates sovereign regions — isolated instances of Azure you might need for compliance or legal reasons. The US Government regions (US DoD Central, US Gov Virginia, US Gov Iowa, and others) are physically and logically network-isolated instances of Azure for U.S. government agencies and partners, operated by screened U.S. personnel with additional compliance certifications. The China regions (China East, China North, and others) are available through a partnership between Microsoft and 21Vianet, under which Microsoft doesn't directly operate the datacentres.
Scaling
A Virtual Machine Scale Set extends availability sets and zones with auto-scaling: VMs can be automatically added or removed based on demand. Scale sets work within a single zone or across multiple zones, and provide load balancing and health monitoring out of the box. They're designed for stateless workloads, combining the redundancy of availability sets and zones with the ability to automatically scale the number of VMs as demand changes.
Cost and Deployment
Azure Hybrid Benefit lets you apply on-premises Windows Server (and eligible Red Hat or SUSE Linux) licences you already own to Azure VMs, reducing the cost of running them in the cloud.
Spot instances are discounted VMs that use unused Azure capacity, letting you provision VMs at a reduced cost. The trade-off is that Azure can evict a Spot VM when it needs the capacity back for pay-as-you-go workloads, or when the spot price exceeds the maximum price you've set — so they suit non-critical workloads that can tolerate interruption, not anything you need running continuously.
Azure is also built for fast deployment: pre-configured images and on-demand resource allocation mean a new VM can be up in seconds rather than minutes, without building one from scratch.
Hibernation saves a VM's memory state to disk, letting it resume quickly later — potentially saving on compute costs while it's not actively in use, since you're not paying for a fully running VM in the meantime.
A subscription is billed two separate costs for every virtual machine: compute and storage. Separating these lets you scale them independently and only pay for what you actually need. Compute is priced on a per-hour basis but billed on a per-minute basis — if a VM is deployed for 55 minutes, you're only charged for 55 minutes of usage, and you're not charged for compute capacity once you stop and deallocate the VM. Storage works differently: the VM's power status has no bearing on the Azure Storage charges for its disks, so you're always billed for any storage the disks use, running or not.
Connecting to a VM
Remote Desktop Protocol (RDP) lets you remotely access and control another computer over a network connection, and it's the standard way to administer and troubleshoot a Windows VM. The Azure portal provides a ready-made RDP file for the VM: download it, open it, provide the VM's user credentials, and accept the certificate warning, and you're connected to the VM's desktop.