# Azure Virtual Machines (Linux)

Official pricing: https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/  
Category: hyperscaler · Isolation: vm

## Pricing regimes (raw)

- **Pay-as-you-go Linux Dsv5/Dasv5/Dlsv5/Fsv2 (East US)** (sizes): D2s_v5 2 vCPU/8 GiB $0.096/h; D4s_v5 4 vCPU/16 GiB $0.192/h; D8s_v5 8 vCPU/32 GiB $0.384/h; D16s_v5 16 vCPU/64 GiB $0.768/h; D32s_v5 32 vCPU/128 GiB $1.536/h; D2as_v5 2 vCPU/8 GiB $0.086/h
- **Pay-as-you-go Linux Dpsv5 Arm (Ampere Altra) (East US)** (sizes): D2ps_v5 2 vCPU/8 GiB $0.077/h; D4ps_v5 4 vCPU/16 GiB $0.154/h; D8ps_v5 8 vCPU/32 GiB $0.308/h; D2pls_v6 2 vCPU/4 GiB $0.062/h; D4pls_v6 4 vCPU/8 GiB $0.124/h; D8pls_v6 8 vCPU/16 GiB $0.248/h
- **B-series v2 burstable Basv2 'l' sizes, 30% baseline (East US)** (sizes): B2als_v2 2 vCPU/4 GiB $0.0376/h; B4als_v2 4 vCPU/8 GiB $0.133/h; B8als_v2 8 vCPU/16 GiB $0.266/h; B16als_v2 16 vCPU/32 GiB $0.533/h [burstable]
- **B-series v2 burstable Basv2, 40% baseline (East US)** (sizes): B2as_v2 2 vCPU/8 GiB $0.0752/h; B4as_v2 4 vCPU/16 GiB $0.15/h; B8as_v2 8 vCPU/32 GiB $0.301/h [burstable]
- **B-series v1 burstable B2s/B2ms/B4ms/B8ms (East US)** (sizes): B2s 2 vCPU/4 GiB $0.0416/h; B2ms 2 vCPU/8 GiB $0.0832/h; B4ms 4 vCPU/16 GiB $0.166/h; B8ms 8 vCPU/32 GiB $0.333/h [burstable]
- **Spot Linux Dsv5/Dasv5/Dlsv5/Fsv2 (East US, snapshot)** (sizes): D2s_v5 2 vCPU/8 GiB $0.020266/h; D4s_v5 4 vCPU/16 GiB $0.040531/h; D8s_v5 8 vCPU/32 GiB $0.081062/h; D16s_v5 16 vCPU/64 GiB $0.162125/h; D32s_v5 32 vCPU/128 GiB $0.32425/h; D2as_v5 2 vCPU/8 GiB $0.018155/h [spot]
- **Reserved VM Instance 1-year Linux D-series (East US)** (sizes): D2s_v5 2 vCPU/8 GiB $0.05925/h; D4s_v5 4 vCPU/16 GiB $0.11849/h; D8s_v5 8 vCPU/32 GiB $0.23687/h; D16s_v5 16 vCPU/64 GiB $0.47386/h; D32s_v5 32 vCPU/128 GiB $0.94772/h; D2as_v5 2 vCPU/8 GiB $0.05308/h [commit]
- **Reserved VM Instance 3-year Linux D-series (East US)** (sizes): D2s_v5 2 vCPU/8 GiB $0.03794/h; D4s_v5 4 vCPU/16 GiB $0.07584/h; D8s_v5 8 vCPU/32 GiB $0.15167/h; D16s_v5 16 vCPU/64 GiB $0.30335/h; D32s_v5 32 vCPU/128 GiB $0.60674/h; D2as_v5 2 vCPU/8 GiB $0.03398/h [commit]

## Features

Yes: snapshots, fork/clone, pause/resume, persistent disk, volumes, ≥24 h sessions, custom image (Docker or snapshot), start from your own snapshot, full VM (own kernel), Docker inside, nested virtualization, root, systemd, SSH, public IPv4, custom domains, raw TCP inbound, egress allowlist, open internet, static egress IP, private networking, SOC 2, HIPAA, SSO, GPU, arm64, Windows, HTTP method/path egress rules, webhooks, audit logs, EU data residency, MCP server, automatic snapshots, snapshots on demand, gVisor or VM (no shared kernel), inbound access rules, firewall inside (nftables), extra volumes, shared volumes

No: memory snapshots, idle auto-stop, your own Docker/OCI image, browser, desktop GUI, computer-use API, code interpreter, browser + desktop control, anti-bot stealth, CAPTCHA solving, residential IPs, preinstalled agents, HTTPS preview URLs, self-hosting, BYOC, open source, macOS, Python, Node.js, GPU desktop, wake on request, live resize, live fork (no pause), memory fork, spend limits, agent harness API, hosted agent API (their own agent), secret proxy, secret proxy for any API

Unknown: everything else. Evidence (source + quote) per feature: https://battleships.dev/data/providers/azure-vm.json → feature_evidence

## Caveats

- All VM rates: Azure Retail Prices API (prices.azure.com, USD list, Linux rows = productName without "Windows"), eastus and swedencentral, fetched 2026-09-28; also checked westeurope (D4s_v5 $0.23) and northeurope ($0.214): Sweden Central is the cheapest EU region checked. Raw: research/raw/azure-vm-linux-retail-2026-09-28*.json.
- Billing is per full minute while the VM is running (Azure pricing FAQ example: 6 min 45 s billed as 6 min); card uses min 60 s / granularity 60 s. A VM shut down from inside the OS stays "Stopped" and keeps billing compute; only Stop (deallocate) via portal/API/CLI stops compute. Disks and static IPs bill while deallocated.
- boot_overhead_s = 45 is an estimate (typical 30-60 s Linux VM provisioning + boot), not a measurement. Plain IaaS VM, no sandbox API.
- Spot: point-in-time Spot meter prices (vary by region/capacity, up to ~80-90% below PAYG for D/F-series here), evicted with 30 s notice; B-series Spot prices shown by the API are only ~10% below PAYG and not modelled.
- Reserved Instances: 1y/3y totals from the API divided by term hours; billed whether used or not (requires_always_on). Savings plan for compute not modelled. No Fsv2 or B v1 reservation rows were returned.
- Disk: Standard SSD E10 (128 GiB) $9.60/month -> ~$0.075/GiB-month (Retail Prices API Storage, eastus, same value as the azure-windows card); billed per provisioned tier, also while deallocated. Premium SSD P10 $19.71/month. Snapshots $0.05/GB-month (Standard HDD storage), $0.132 on SSD.
- Egress (Retail Prices API, Bandwidth "Rtn Preference: MGN", eastus and swedencentral identical): first 100 GB/month free, then $0.087/GB to 10 TB, $0.083 to 50 TB, $0.07 to 150 TB, $0.05 beyond. Engine uses the first paid tier. Internet routing preference is slightly cheaper ($0.08/GB first tier per azure-windows research).
- Public IPv4: Standard static public IP $0.005/h = $3.65/month (azure-windows research); outbound-only VMs can use NAT Gateway (extra) instead.
- Free account: $200 credit for 30 days (one_time_credit) plus 750 h/month for 12 months of B1s, B2pts v2 (Arm) and B2ats v2 (AMD) Linux; these are 1-2 GiB machines, far below 4 vCPU/8 GiB, so not modelled as a mode.
- B-series baselines are % of the whole VM on Microsoft's 2024 normalised 0-100% scale: Basv2 "l" sizes 30%, Basv2 standard 40%, Bv1 B2s 20% / B2ms 30% / B4ms 22.5% / B8ms 17%. Azure B-series has no pay-for-surplus unlimited mode: above baseline it throttles when credits run out.
- Nested virtualization per Microsoft Learn size pages: Supported on Dsv5, Dasv5, Dlsv5, Fsv2; Not supported on Dpsv5 (Arm), Basv2, Bv1 (arm64 and burstable modes set false).
- Hibernation (Linux and Windows): a hibernated VM is not billed for compute; OS/data disks and IPs keep billing. Guest-OS-initiated hibernate does not count and keeps billing. 'Stopped Allocated' (OS shutdown) still bills compute.

## How this provider charges


These are plain IaaS VMs: full kernel, root and SSH, no sandbox API. A Linux VM is usually usable about 30-60 s after the create call. That is an estimate we did not measure; the card uses `boot_overhead_s` = 45.

Every VM price below comes from the official **Azure Retail Prices API** (`prices.azure.com`, list USD), queried on 2026-09-28. Linux rows are the ones whose productName does not contain "Windows"; Cloud Services and Low Priority rows are excluded. The raw data is in `raw/azure-vm-linux-retail-2026-09-28*.json`.

Regions:
- US: `eastus`.
- EU: `swedencentral`, the cheapest EU region we checked. For D4s_v5: swedencentral $0.204, northeurope $0.214, westeurope $0.23.

## Regime table

| # | Regime | When it applies | How billed | Numbers ($/h, eastus → swedencentral) | Source |
|---|---|---|---|---|---|
| 1 | Pay-as-you-go, x86 D/F v5 | Default | Per full minute while running (Azure FAQ: 6 min 45 s is billed as 6 min) | **F4s_v2 4/8 0.169 → 0.194**; **D4ls_v5 4/8 0.170 → 0.182**; D4as_v5 4/16 0.172 → 0.184; D4s_v5 4/16 0.192 → 0.204; D8s_v5 0.384 → 0.408; D2ls_v5 2/4 0.085 | Retail Prices API (Virtual Machines) |
| 2 | Pay-as-you-go, Arm Dpsv5 | arm64 workloads | same | D2ps_v5 2/8 0.077; D4ps_v5 4/16 0.154 → 0.164; D8ps_v5 0.308 → 0.328 | same |
| 3 | B-series v2 burstable (Basv2) | Low average CPU | Same meter; CPU credits | "l" sizes (2 GiB/vCPU), 30% baseline: B2als_v2 0.0376, **B4als_v2 4/8 0.133 → 0.138**, B8als_v2 0.266. Standard sizes (4 GiB/vCPU), 40% baseline: B2as_v2 0.0752, B4as_v2 4/16 0.150 → 0.156 | same + MS Basv2 size docs |
| 4 | B-series v1 | Legacy burstable | same | B2s 2/4 0.0416; B2ms 2/8 0.0832; B4ms 4/16 0.166 → 0.173; B8ms 0.333. Baselines: B2s 20%, B2ms 30%, B4ms 22.5%, B8ms 17% | same + MS Bv1 docs |
| 5 | Spot | Interruptible work | Variable price, 30 s eviction notice, evicted VMs deallocate or delete | D4s_v5 0.0405 → 0.0377 (−79%); **D4ls_v5 0.0359 → 0.0336**; F4s_v2 0.0372 → 0.0359; D2as_v5 0.0182 | Retail Prices API Spot meters (snapshot) |
| 6 | Reserved VM Instance, 1 year | Always-on | Every hour of the term, used or not | D4s_v5 0.1185 → 0.1259 (−38%); D4ls_v5 0.1049 → 0.1074; D4as_v5 0.1062; B4als_v2 0.0785 | Retail Prices API Reservation (term price ÷ 8,760 h) |
| 7 | Reserved VM Instance, 3 years | Always-on | same | D4s_v5 0.0758 → 0.0806 (−61%); **D4ls_v5 0.0672 → 0.0692**; B4als_v2 0.0506 | same (÷ 26,280 h) |
| 8 | Stopped vs deallocated | Shutdown | OS shutdown leaves the VM "Stopped" and **still billed**; Stop (deallocate) stops compute | — | Azure VM pricing FAQ |
| 9 | Managed disks | OS/data disks | Per provisioned tier per month, also while deallocated | Standard SSD E10 128 GiB $9.60/mo (~$0.075/GiB); Premium SSD P10 $19.71 | Retail Prices API (Storage) |
| 10 | Snapshots | Disk snapshots | GB-month | $0.05 (standard), $0.132 (SSD) | same |
| 11 | Internet egress | Microsoft-routed | First 100 GB/month free, then tiered | $0.087/GB up to 10 TB, $0.083 up to 50 TB, $0.07 up to 150 TB, $0.05 beyond (identical in eastus and swedencentral) | Retail Prices API (Bandwidth, Rtn Preference: MGN) |
| 12 | Public IPv4 | Standard static IP | Per hour | $0.005/h = $3.65/month | Retail Prices API (Virtual Network) |
| 13 | Free account | New subscriptions | $200 credit for 30 days + 750 h/month for 12 months of B1s / B2pts v2 / B2ats v2 (1-2 GiB sizes) | not a 4/8 option | azure.microsoft.com/free |

## Gotchas

1. **An OS-level shutdown does not stop billing.** Deallocate through the portal, API or CLI.
2. **B-series has no paid "unlimited" mode** (unlike AWS t3). Once the banked credits run out, the VM is throttled to its baseline. A 30%-CPU workload on a 30%-baseline B4als_v2 sits exactly at the limit.
3. **Spot on D/F-series is ~80% below PAYG** in these regions. B-series Spot is only ~10% below PAYG.
4. **Reservations bill for the whole term.** They are only cheaper when the VM would run more than ~62% (1y) or ~39% (3y) of the hours.
5. The API returns **no reservation rows for Fsv2 or B v1**. Dlsv5 is the 4 vCPU / 8 GiB size that can be reserved.
6. Microsoft's 2024 docs express the B-series baseline as a percentage of the whole VM (0-100% scale), not per vCPU.
7. Disks keep billing at the provisioned tier while the VM is deallocated. Delete the VM and snapshot the disk to stop paying for it.

## Worked example

Workload: 4 vCPU / 8 GiB, 50 concurrent × 8 h/day × 22 days (8,800 VM-hours), 30% CPU, 50 GiB snapshots, 100 GiB egress. Region: eastus.

Assumptions: VMs are deallocated between sessions. Each VM keeps an E10 OS disk and a Standard static IPv4 all month. Boot overhead is ignored.

| Regime | Compute | Disks (50 × E10) | Snapshots | Egress | IPv4 (50) | **Monthly** |
|---|---|---|---|---|---|---|
| F4s_v2 PAYG ($0.169) | $1,487.20 | $480.00 | $2.50 | $0 (100 GB free) | $182.50 | **$2,152.20** |
| D4ls_v5 PAYG ($0.170) | $1,496.00 | $480.00 | $2.50 | $0 | $182.50 | **$2,161.00** |
| B4als_v2 burstable ($0.133), 30% baseline = workload's 30% CPU | $1,170.40 | $480.00 | $2.50 | $0 | $182.50 | **$1,835.40** |
| D4ls_v5 Spot ($0.035887, snapshot) | $315.81 | $480.00 | $2.50 | $0 | $182.50 | **$980.81** |
| D4ls_v5 1y reserved × 50, all month ($0.10491 × 730 h) | $3,829.22 | $480.00 | $2.50 | $0 | $182.50 | $4,494.22 (reservations do not pay off at 8 h/day) |

Sources: https://prices.azure.com/api/retail/prices (Virtual Machines, Storage, Bandwidth; eastus, swedencentral, westeurope, northeurope) · https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/ · https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/basv2-series · …/bsv2-series · …/bv1-series
