Azure virtual machines that run on unused Azure capacity at a discount and can be evicted when Azure needs the capacity back, suited to interruption-tolerant workloads.
Title graphic: Azure Spot Virtual Machines (Product)
Relationships
Azure Spot Virtual Machines is a product and part of Microsoft Azure.
Description
Azure Spot Virtual Machines are Azure virtual machines that run on unused Azure capacity at a discount. In exchange for the lower price, Azure can evict them whenever it needs the capacity back. The product is part of Microsoft Azure and is documented on Microsoft Learn. Because eviction can occur at any time, Spot VMs are meant for workloads that tolerate interruption, such as batch processing, dev/test environments and stateless processing. Microsoft advises standard virtual machines where capacity is needed immediately.
The central design decision with Spot VMs is how to handle eviction. Two eviction policies exist. With the deallocate policy, which is the default, the VM is kept in a stopped-deallocated state after eviction. Redeployment is not guaranteed, and while the VM sits in that state its disks still incur storage cost and its cores still count against quota. With the delete policy, both the VM and its disks are removed. Which policy fits depends on whether the workload needs to keep its state or can be rebuilt from scratch.
Price handling is the second control. A maximum price can be set in US dollars per hour. A value of minus one means the VM is never evicted for price reasons, although it can still be evicted when Azure needs the capacity. Changing the max price requires deallocating the VM. Price and eviction-rate history is visible in the portal and through Azure Resource Graph, which helps when comparing sizes and regions before committing a workload. Scheduled events can provide a best-effort warning shortly before eviction, giving an application a short window to save progress or shut down cleanly.
Several limits apply. Spot VMs have no SLA or availability guarantee. They draw on their own quota pool rather than the standard VM quota. B-series and promo sizes are unsupported, and a VM cannot be converted between Spot and standard, so the choice has to be made when the machine is created. Spot VMs are offered under several agreement types, including Enterprise Agreement, pay-as-you-go and Cloud Solution Provider.
In practice, Spot VMs fit tasks that can be paused, retried or distributed across many short-lived machines. Designing for interruption usually means keeping state outside the VM, making jobs restartable and handling eviction notices. Because the workloads are disposable and often created in bulk, they pair naturally with automated provisioning.
That link to automation is the focus of the M365.FM episode "Azure Infrastructure as Code and DevOps with Maik van der Gaag [MVP]". The episode discusses cost optimization through Infrastructure as Code, saying that IaC gives control over every resource, makes it possible to track usage and adjust capacity, and helps avoid paying for unused services. In that context it describes building fault-tolerant workloads with Azure Spot Virtual Machines, stating that these machines cost much less than standard ones and that savings of up to 90% are possible when workloads can handle interruptions. The episode adds that IaC allows such environments to be set up quickly and keeps the architecture resilient, and that Azure Reservations and Savings Plans can also be managed with IaC. The savings figure comes from the episode; the Microsoft Learn documentation describes the discount only as a reduced price on spare capacity, so actual savings depend on size, region and current conditions.
Overview compiled with AI from M365.FM episodes and the facts on this page. You can improve it with the edit button below.
Large batch jobs often stall because one exact VM size has no capacity when it is needed. This episode is for Azure architects and platform teams running simulations, rendering, testing or data processing at scale. You learn how Azure Compute Fleet, Spot VMs…
Articles about Azure Spot Virtual Machines (1)
Articles in which Azure Spot Virtual Machines is a topic:
Questions marked with AI were written with AI from the facts on this page.
What happens to a Spot VM when Azure needs the capacity back? (AI)
Azure evicts the VM. Under the default deallocate policy the VM stays in a stopped-deallocated state, with disks still billed and cores still counted against quota, and redeployment is not guaranteed. Under the delete policy the VM and its disks are removed.
Which workloads suit Azure Spot Virtual Machines? (AI)
Interruption-tolerant workloads such as batch processing, dev/test environments and stateless processing. Microsoft advises standard VMs where capacity is needed immediately, since Spot VMs carry no SLA or availability guarantee.
Can a standard VM be converted to a Spot VM? (AI)
No. A VM cannot be converted between Spot and standard, so the choice must be made when the VM is created. Spot VMs also use their own quota pool and do not support B-series or promo sizes.
Related topics in brief
Topics linked to Azure Spot Virtual Machines, each briefly explained:
Short info above, community knowledge below: add practical tips, examples or corrections. New contributions are reviewed first; trusted members publish directly.
Experts and companies for this topic
Nobody has listed this topic yet. Add it to your profile.
Experts on related topics
Experts on topics related to Azure Spot Virtual Machines, each with the topic that connects them: