Virtual machines
A Virtual machinea slice of a physical server sold as a whole computer, with its own operating system that you patch and its own billing clock that runs whether it is busy or not.Full glossary entryIntroduced in Virtual machines (VM) is an isolated guest operating system environment running atop a physical server via a hypervisor. From the perspective of the software running inside it, a VM behaves like dedicated bare-metal hardware: it has virtual CPU cores, allocated memory, network interfaces, and storage controllers. As the foundational primitive of modern cloud computing, virtual machines underpin virtually every higher-level service that providers offer, from managed Kubernetes worker nodes to relational database engines.
While launching an instance takes only seconds through an API call or console click, operating virtual machines at scale requires substantial operational discipline. Unlike managed serverless platforms, raw virtual machines place the burden of guest operating system updates, kernel security patches, host configuration, monitoring agents, and backup verification squarely on your engineering team. Furthermore, standard compute billing runs continuously on a per-second or per-minute basis, accumulating costs regardless of whether an instance is processing critical workloads or sitting idle.
Sizes
Cloud providers organize virtual machines into specialized instance families designed around varying hardware ratios. General-purpose instances maintain an even balance of compute cores to memory, making them the standard starting point for web applications, build runners, and microservices. Compute-optimized instances allocate a higher ratio of CPU to memory for computationally intensive workloads like video transcoding, scientific modeling, or high-traffic API gateways. Memory-optimized instances feature massive RAM allocations relative to CPU cores, tailored for in-memory caches, search indexes, and large relational databases.
Instance naming schemes encode the family, generation, and target architecture. For example, newer generations incorporate modern processor architectures—such as custom ARM-based chips alongside updated x86 silicon—delivering improved price-to-performance over older hardware. Leaving long-running workloads on legacy instance types without periodic architectural reviews is an easy way to overpay for compute.
What is attached
In cloud architecture, a virtual machine primarily represents ephemeral compute and memory capacity. Durable persistence is provided through modular attached components:
- Persistent storage: The primary boot disk and secondary data partitions are provided by Block storagea network-attached volume that behaves as a local disk and outlives the machine it is attached to. One machine, one zone, at a time.Full glossary entryIntroduced in Virtual machines, a network-attached virtual volume that appears to the operating system as a standard block device. Because block volumes exist independently of the underlying hypervisor hardware, they persist across instance stops, reboots, and hardware migrations.
- Ephemeral local storage: Many instance types also offer direct-attached physical NVMe drives, known as ephemeral or instance store disks. While these drives deliver exceptional read/write throughput and sub-millisecond latency, their contents are lost whenever the virtual machine stops or experiences a hardware retirement event. They serve as scratch space, compilation caches, or buffer pools rather than persistent data stores.
- Network interfaces: Virtual network adapters link the instance to your virtual network, assigning private IP addresses and, when explicitly required, routable public addresses for internet exposure.
- Workload identity: Attaching a dedicated IAM identity directly to the instance allows software running on the machine to acquire short-lived authentication tokens from the local instance metadata service, eliminating the need to bake long-lived API secrets into application configuration files.
Images
Virtual machines instantiate from a base Imagea disk snapshot with an operating system and software installed, used to start new machines that need no manual setup.Full glossary entryIntroduced in Virtual machines—a point-in-time snapshot of an operating system filesystem pre-configured with bootloaders, system packages, and essential utilities. While providers supply base distributions of Linux and Windows Server, mature operations teams typically build customized machine images using automated build pipelines.
Baking dependencies, monitoring agents, and application binaries directly into immutable golden images fundamentally changes server management. Rather than connecting to running servers over SSH to apply configuration changes or update packages in place, teams replace entire instances with fresh machines launched from updated images. This immutable infrastructure pattern prevents configuration drift and guarantees that development, staging, and production environments execute identical software stacks.
Scaling
Every virtual machine has fixed hardware limits. When resource utilization approaches physical saturation, there are two scaling paths:
- Vertical scaling (scale up): Upgrading the instance to a larger tier with more cores and memory. While simple and requiring no application architecture changes, vertical scaling involves downtime during instance resizing and eventually collides with hardware and budget ceilings.
- Horizontal scaling (scale out): Distributing inbound traffic across a fleet of interchangeable virtual machines behind a managed Load balancerthe service that holds the public address and certificate and spreads incoming requests across a set of interchangeable, health-checked targets.Full glossary entryIntroduced in Virtual machines.
Horizontal elasticity requires that application instances remain stateless: user session state, uploaded media files, and transaction histories must be offloaded to external caches, databases, and object stores. Cloud providers manage fleet expansion and contraction using an Autoscaling groupa managed set of identical machines that grows and shrinks against a metric and replaces any machine that fails its health check.Full glossary entryIntroduced in Virtual machines. By evaluating target utilization metrics (such as average CPU utilization or request queue depth), the autoscaling group launches new instances during traffic surges and drains underutilized capacity during quiet periods. Crucially, the group also performs continuous health checks, automatically terminating degraded instances and provisioning healthy replacements to maintain target capacity.
Ensure new instances initialize autonomously without manual intervention.
- Bake application dependencies and configuration into the machine image so instances boot directly into a running state.
- Externalize all user session state, cached data, and uploaded assets to shared storage or managed data services.
- Assign a cloud service identity to the instance template rather than storing static API credentials on the filesystem.
- Configure deep application health checks that verify internal database connectivity and service readiness, rather than simple TCP ping responses.
What it costs
Virtual machines bill continuously while in an active running state. When an instance is stopped, compute charges pause, but attached persistent block storage volumes and static public IP reservations continue to accrue hourly fees. A major source of unnecessary cloud expenditure is abandoned development or test instances that were spun up for temporary tasks and never terminated.
Production deployments typically combine three distinct purchasing models to optimize cost:
- On-demand capacity: Pay-as-you-go pricing with no upfront commitment, offering maximum flexibility for unpredictable or experimental workloads.
- Committed use and reservations: Significant discounts (often 30% to 70%) granted in exchange for committing to a consistent baseline of compute usage over a one-year or three-year horizon.
- Spot capacitya provider's spare hardware, sold at a deep discount on the condition that it can be reclaimed at short notice. For work that can be interrupted.Full glossary entryIntroduced in Virtual machines: Idle physical server capacity sold by the provider at deep discounts (frequently up to 90%), with the caveat that the provider can reclaim the hardware on short notice (typically a 30-second to two-minute warning). Spot instances are exceptionally well-suited for resilient, fault-tolerant workloads—such as batch processing pipelines, stateless worker fleets, and containerized build systems—but are unsuitable for stateful databases or single-instance applications.
When a machine is the right answer
Deploying directly to virtual machines remains the right architectural choice when software requires access to custom OS kernels, specific device drivers, legacy enterprise dependencies, or commercial software licenses tied to virtual hardware signatures. VMs are also ideal when an engineering team requires granular control over local network interfaces, storage volume striping, or low-level hypervisor parameters.
However, for standard web applications, microservices, and background tasks, managing individual virtual machines introduces unnecessary operational overhead. Container orchestrators and serverless platforms abstract away operating system maintenance, node provisioning, and hardware lifecycle, letting teams focus on delivering application functionality.
Terms introduced
- Virtual machine: a slice of a physical server, sold as a whole computer with its own operating system.
- Block storage: a network-attached volume that behaves as a local disk and outlives the machine.
- Image: a disk snapshot with an operating system and software installed, used to start new machines.
- Load balancer: a service that spreads incoming requests across a set of interchangeable machines.
- Autoscaling group: a managed set of identical machines that grows, shrinks, and self-heals against a target.
- Spot capacity: spare provider hardware sold at a discount on the condition that it can be reclaimed.
How providers do it
Virtual machine offerings across AWS, Azure, and Google Cloud share nearly identical core capabilities, differing primarily in terminology, instance naming conventions, and compute lifecycle mechanics.
| Concept | AWS | Azure | Google Cloud |
|---|---|---|---|
| Virtual machine | Amazon EC2 instance | Azure Virtual Machine | Compute Engine VM instance |
| Sizing and families | Instance type (e.g. m7g.large) | VM size (e.g. Standard_D4s_v5) | Machine type (e.g. e2-standard-4) |
| Machine image | Amazon Machine Image (AMI) | Azure Compute Gallery or Marketplace image | Custom or public disk image |
| Persistent block storage | Elastic Block Store (EBS) volume | Azure Managed Disk | Persistent Disk, Hyperdisk |
| Ephemeral local disk | Instance store volume | Temporary resource disk | Local SSD |
| Load balancing | Application Load Balancer, Network Load Balancer | Application Gateway, Azure Load Balancer | Cloud Load Balancing |
| Autoscaling fleet | EC2 Auto Scaling group | Virtual Machine Scale Set (VMSS) | Managed instance group (MIG) |
| Machine workload identity | IAM role, via EC2 instance profile | Managed identity | Attached service account |
| Committed pricing | Reserved Instances, Savings Plans | Reserved VM Instances, savings plans | Committed use discounts (CUDs) |
| Spare spot capacity | Spot Instances | Spot Virtual Machines | Spot VMs |
| Compute billing cessation | Stop the instance | Deallocate the VM (guest OS shutdown continues billing) | Stop the VM |
Every product name and technical mapping above is confirmed against provider documentation. Specific parameters regarding spot interruption grace periods and sustained-use discounts are marked unconfirmed in the provider tabs below.
A critical operational difference lies in stop versus deallocation semantics:
- On AWS and Google Cloud, stopping a virtual machine halts compute charges immediately, leaving only attached persistent disk storage to accrue fees.
- On Azure, issuing a shutdown command from within the guest operating system leaves the VM in a
Stopped(allocated) state that continues to incur full compute charges. To completely cease compute billing on Azure, the machine must be placed into theDeallocatedstate via the Azure portal, CLI, or control plane API. Automation scripts designed to pause non-production environments overnight must account for this distinction to realize actual cost savings.
- AWS
- Azure
- Google Cloud
What this maps to: Amazon EC2 (Elastic Compute Cloud). Every other AWS compute product runs on EC2 underneath.
| Concept | On AWS | Status |
|---|---|---|
| Virtual machine | An EC2 instance | confirmed |
| Size and family | An instance type, e.g. m7g.large: family letter, generation number, size. m general purpose, c compute optimised, r memory optimised, t burstable. A g suffix means Graviton (ARM) | confirmed |
| Image | An AMI (Amazon Machine Image). Build your own with EC2 Image Builder or Packer | confirmed |
| Block storage | EBS (Elastic Block Store) volumes. Volume types trade cost against IOPS; gp3 is the general-purpose default | confirmed |
| Local disk | Instance store, on the instance types that have one. Lost on stop | confirmed |
| Load balancer | Elastic Load Balancing: Application Load Balancer (HTTP, layer 7) and Network Load Balancer (TCP, layer 4) | confirmed |
| Autoscaling group | EC2 Auto Scaling group, with a launch template naming the AMI and instance type | confirmed |
| Identity on the machine | An IAM role attached through an instance profile. Credentials come from the instance metadata service; use IMDSv2 | confirmed |
| Committed pricing | Reserved Instances and Savings Plans, for one or three years | confirmed |
| Spot capacity | Spot Instances. AWS gives a two-minute interruption notice before reclaiming one | unconfirmed; check current docs |
Their vocabulary
| Standard term | Their term |
|---|---|
| Virtual machine | Instance |
| Size | Instance type |
| Image | AMI |
| Stop billing | Stop the instance; EBS still bills. Terminate to stop both |
Where to look
The EC2 console lists instances, AMIs, and Auto Scaling groups per region. If you want to find long-running instances that nobody has looked at in a while, filter Cost Explorer to EC2.
Last verified: never.
What this maps to: Azure Virtual Machines.
| Concept | On Azure | Status |
|---|---|---|
| Virtual machine | A VM, in a region and optionally pinned to a zone | confirmed |
| Size and family | A VM size, e.g. Standard_D4s_v5: family letter, vCPU count, feature letters, version. D general purpose, F compute optimised, E memory optimised, B burstable. The s means premium storage is supported | confirmed |
| Image | A Marketplace image or your own in an Azure Compute Gallery, with versions and replication across regions | confirmed |
| Block storage | Managed disks, in Standard HDD, Standard SSD, Premium SSD, and Ultra tiers | confirmed |
| Local disk | The temporary disk, present on most sizes, lost on stop or redeploy | confirmed |
| Load balancer | Azure Load Balancer (layer 4) and Application Gateway (layer 7) | confirmed |
| Autoscaling group | Virtual Machine Scale Sets, in uniform or flexible orchestration mode | confirmed |
| Identity on the machine | A managed identity, system-assigned or user-assigned; credentials from the instance metadata endpoint | confirmed |
| Committed pricing | Reservations and the Azure savings plan for compute, one or three years. Azure Hybrid Benefit applies existing Windows and SQL Server licences | confirmed |
| Spot capacity | Azure Spot Virtual Machines, evicted on capacity or on a price cap you set | confirmed |
| Stopped state | A VM that is stopped from inside the OS still bills. It must be deallocated to stop compute billing | confirmed |
Their vocabulary
| Standard term | Their term |
|---|---|
| Size | VM size or SKU |
| Autoscaling group | Scale set |
| Stop billing | Deallocate; disks still bill. Delete to stop both |
Where to look
The Virtual machines blade lists VMs and their power state. Azure Advisor flags underused VMs.
Last verified: never.
What this maps to: Compute Engine.
| Concept | On Google Cloud | Status |
|---|---|---|
| Virtual machine | A Compute Engine VM instance, in one zone | confirmed |
| Size and family | A machine type, e.g. e2-standard-4: family, workload profile, vCPU count. e2 and n2 general purpose, c3 compute optimised, m3 memory optimised. Custom machine types let you pick CPU and memory freely on some families | confirmed |
| Image | A public or custom image, kept in an image family so new VMs get the latest | confirmed |
| Block storage | Persistent Disk and the newer Hyperdisk. Zonal or regional (replicated across two zones) | confirmed |
| Local disk | Local SSD, attached at creation, lost on stop | confirmed |
| Load balancer | Cloud Load Balancing, including a global external HTTP(S) load balancer that fronts VMs in several regions with one address | confirmed |
| Autoscaling group | A managed instance group (MIG) built from an instance template, with autoscaling and autohealing | confirmed |
| Identity on the machine | A service account attached to the VM; credentials from the metadata server | confirmed |
| Committed pricing | Committed use discounts, one or three years. Sustained use discounts apply automatically on some families for VMs running most of a month | unconfirmed; check which families still earn sustained use discounts |
| Spot capacity | Spot VMs, formerly preemptible VMs, with a short notice before reclaim | confirmed |
Their vocabulary
| Standard term | Their term |
|---|---|
| Virtual machine | VM instance |
| Size | Machine type |
| Autoscaling group | Managed instance group |
| Stop billing | Stop the VM; disks still bill. Delete to stop both |
Where to look
The Compute Engine console lists instances and MIGs per project. Recommender flags idle and oversized VMs.
Last verified: never.