What is an Azure VM?
Azure Virtual Machines (VM) is a scalable, on-demand computing resource offered by Azure. Cloud users leverage VMs when they require direct control over their computing environment in the cloud.
Azure virtual machines are typically used for:
- Development and test—Azure VMs create a computing resource with the configuration needed to run an application
- Scaling applications in the cloud—demand for applications can vary, thus you can conserve costs by running an application in a VM and adding more VMs, or shutting down instances that are not needed, according to actual demand.
- Extended datacenter—you can connect virtual machines in an Azure virtual network to your organization’s network
Azure pricing for VMs is typically calculated per second of usage. However, there are several other ways to pay for a VM. These include the Azure free tier that provides free usage of specific VMs for 12 months, reserved instances that let you commit to a VM for a long period of time and receive a discount, and spot VMs that allow you to purchase unused spare capacity in Azure at a deeply discounted rate.
In this article:
- Azure VM Types
- Azure VM Pricing Models
- Azure Virtual Machine Pricing Examples
- Automating Azure Spot VMs with Spot by NetApp
Azure VM Types
Microsoft provides many different virtual machine sizes in Azure. These are collected as “series”, each of which supports a specific use case.
Azure groups VMs into five categories, detailed in the table below.
Azure VM Pricing Models
You can pay for Azure VMs using several pricing models, detailed below.
Azure Free Tier
Like other cloud services, Azure grants a free credit trial. Azure offers a free tier of $200 in Azure credits for the initial 30 days and a capped quantity of additional free services for 12 months.
You can develop services in any region that supports Azure. Also, you can develop multiple instances, making sure the total is within the specified limits.
You can receive 750 hours for B1s burstable virtual machines, every month for 12 months.
Pay As You Go
With Azure VMs, Microsoft charges you for each second a VM resource is active, so you pay only for actual use.
This option is regarded as the most flexible choice, and is suitable for instances that cannot be interrupted or short-lived workloads.
You don’t need to make a long-term commitment or pay upfront. You can decrease or increase your compute capacity according to your application’s needs and only pay the hourly rate for the instances you use. Yet, prices are typically higher than the other pricing models.
Reserved VM Instances
If you want to save money and know a VM will be needed for more than a year, you can reserve a virtual machine instance and save up to 72%. Reserving a VM puts a specific region in place for a term of 1 or 3 years.
You can return and exchange reserved instances. You can also cancel a reserved instance with an early cancellation fee, up to the yearly cap.
On the other hand, you can also use a reserved instance for other VMs such as pay-as-you-go VMs in the same resource region and group.
With the reserved VM instances model you can do the following:
- Cancel or exchange reservations as you grow
- Forecast and budget with upfront payment for a one or three year period
- Receive prioritized compute capacity in Azure regions
- Gain automated control of Azure RIs via instance size flexibility
- Pay for reserved VMs monthly, instead of upfront, at no additional cost
Typical use cases for RIs are as follows:
- Your application has steady-state usage
- Your application could require a reserved capacity
- You can lock-in using Azure VM for a period of one or three years to keep computing costs low
Related content: Read our guide to Azure reserved instances
Spot Virtual Machines
Azure VM spot pricing is a solid option if you want to save money, and don’t necessarily need 100% uptime, or you have the automation to deal with VM availability issues.
Azure data centers always have some unused capacity. To make sure data centers are being efficiently used, Azure instituted spot pricing (spot VMs), which grants discounts of up to 90% on pay-as-you-go VM pricing. There are no upfront payments or long-term commitments.
However, spot VMs are ephemeral. Azure can evict or shut down spot VMs at any time if the data center requires more computer capacity, or if the current price is more than the initial agreed-upon price. This makes it hard to run production workloads on spots.
Spot Virtual Machines are suitable for the following sorts of workloads:
- Dev/test environments, such as continuous delivery and continuous integration workloads
- Batch processing jobs, visual rendering applications, or certain high-performance computing scenarios
- Analytics, big data, large-scale stateless applications, and container-based applications
Related content: Read our guide to Azure spot pricing
Azure Virtual Machine Pricing Examples
Azure VM pricing is very complex, and it can help to get a concrete example of pricing. Let’s see pricing options for several types of Linux VMs in the West US region.
D2s v3 VM
- Hardware: 2 vCPUs, 8 GB RAM, 16 GB local storage
- Pay as you go price: $0.09600 per hour
- Spot price: $0.0497 per hour
- 3-year reserved instance price: $0.0369 per hour
D8s v3 VM
- Hardware: 8 vCPUs, 64 GB RAM, 128 GB local storage
- Pay as you go price: $0.384 per hour
- Spot price: $0.1986
- 3-year reserved instance price: $0.1474 per hour
D32s v3 VM
- Hardware: 32 vCPUs, 128 GB RAM, 256 GB local storage
- Pay as you go price: $1.536 per hour
- Spot price: $0.7942
- 3-year reserved instance price: $0.5896 per hour
D64s v3 VM
- Hardware: 64 vCPUs, 256 GB RAM, 512 GB local storage
- Pay as you go price: $3.072 per hour
- Spot price: $1.5883
- 3-year reserved instance price: $1.1792 per hour
Automating Azure Spot VMs with Spot by NetApp
If you are looking to broaden your usage of Azure spot VMs for even mission-critical workloads, Spot by NetApp’s Elastigroup and Ocean products enable you to do so for non-containerized and AKS workloads respectively.
By leveraging proprietary, predictive algorithms that consider both current spot market activity and historical trends, Spot by NetApp will spin up new replacement spot instances in advance while gracefully draining at-risk ones. If spot instances are not available, the workload will be moved to pay-as-you-go instances. In those situations, Spot by NetApp will move workloads back to spot instances as soon as they become available.