Azure VM Sizes: B, D, E and F Series

Choosing Azure VM sizes is where most of your cloud bill gets decided. Go too small and the app crawls, go too big and you’re paying for idle CPUs every hour of every day. Remember from Lesson 1 that two VMs with the same 2 vCPUs can differ by 15 times in price.

Size names like Standard_E4-2ads_v5 look like a secret code at first, but each letter has a meaning, and once you can read them you’ll shortlist the right family in seconds and be able to explain your choice to a manager.

In the lab you’ll decode size names with a small script, compare four families, resize web01 safely while it’s deallocated, and run into the two resize errors that trip people up most often.

TimeYou needCostBy the end you can
About 40 minutesweb01 from Lesson 15 (deallocated), the CLINothing (web01 stays deallocated; no resize is started)Read any VM size name, pick a family for a workload, and resize without surprises

What it is, in one line

A VM size sets how many CPUs, how much memory, and how much disk and network speed a VM gets, and what it costs per hour.

In Simple Words

Picking the right vehicle

You wouldn’t send a truck to deliver one letter, or move house on a scooter. Vehicles come in families: scooters for short trips (B-series), cars for everyday driving (D-series), trucks with a big boot for heavy loads (E-series, lots of memory) and sports cars that are quick but carry very little (F-series, strong CPUs).

The scooter is cheap because you don’t ride it all day, and it has a small fuel tank that refills while it’s parked. Ride it hard all day and it slows down, which is how B-series CPU credits work.

Engineer's View

How to read a size name

The pattern goes family, an optional sub-family, vCPUs, optional constrained vCPUs, feature letters and finally the version. So Standard_D2ds_v5 is the D family with 2 vCPUs, features d and s, version 5.

  • Families: B burstable (cheap, CPU credits), D general purpose (about 4 GiB per vCPU), E memory optimised (about 8 GiB per vCPU), F compute optimised (about 2 GiB per vCPU), L storage optimised, M very large memory, N GPU.
  • Feature letters: a AMD, p Arm (Ampere or Cobalt), l low memory, t tiny memory, m more memory, d local temp disk, i isolated host, b faster remote disk throughput, s Premium SSD capable.
  • Constrained vCPUs: E4-2ads_v5 keeps the memory and disk limits of an E4 but runs only 2 active vCPUs, which cuts per-core licence costs for software like SQL Server.
  • Versions: a newer version (v5, v6) usually gives you more performance for the same money. Note that v6 sizes use NVMe disk controllers, so the image has to support them.

B-series credits: every B size has a baseline CPU percentage. While the VM stays below it, it banks credits, and when it goes above it spends them. Once the credits are gone the CPU is held at the baseline, which users see as a sudden slowdown, so watch the CPU Credits Remaining metric.

Resizing: a resize restarts the VM, and if the new size isn’t available on the current hardware cluster you have to deallocate the VM first. A few changes are blocked outright: moving between sizes with and without a local temp disk, between x64 and Arm, and between SCSI and NVMe disk controllers.

How it works, step by step

Here’s a straightforward way to choose a size for a new workload:

Azure VM sizes naming: family, vCPUs, feature letters and version
  1. Measure first. If the app already runs somewhere, look at its real CPU and memory use over a busy week instead of copying the size of its old server.
  2. Pick the family from the shape of the load: D for steady and balanced work, E for memory-heavy things like databases and caches, F for CPU-heavy batch jobs, and B for servers that sit idle and burst now and then.
  3. Pick the smallest size in that family that handles the peak with a bit of headroom, and confirm it’s offered in your region and zone.
  4. Check the disk limits for that size, meaning the maximum number of data disks and the maximum IOPS and throughput, because a small VM can hold back a fast disk (Lesson 72).
  5. Watch it for two weeks, then resize up or down. Azure Advisor will also suggest right-sizing.

Trying a resize is cheap and easy to undo as long as you stay within compatible sizes; just plan a short restart window for it.

Azure VM sizes with 2 vCPUs compared by memory and monthly price

Everything in this lab happens while web01 is deallocated, so nothing gets billed and nothing restarts.

Hands-on lab: decode, compare and resize

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

You’ll decode size names, compare four families, check which sizes web01 can move to, and then resize it and put it back.

1Decode size names with a small script

Paste this whole block:

function Read-VmSize {
    param([Parameter(Mandatory)][string]$Size)
    $families = @{ B = 'Burstable'; D = 'General purpose'; E = 'Memory optimised'; F = 'Compute optimised'; L = 'Storage optimised'; M = 'Very large memory'; N = 'GPU' }
    $letters = [ordered]@{ a = 'AMD CPU'; p = 'Arm CPU'; l = 'low memory'; t = 'tiny memory'; m = 'more memory'; d = 'local temp disk'; i = 'isolated'; b = 'faster remote disks'; s = 'Premium SSD capable' }
    $m = [regex]::Match($Size, '^Standard_([A-Z]+)(\d+)(-\d+)?([a-z]*)(_v(\d+))?$')
    if (-not $m.Success) { throw "Not a size name I can read: $Size" }
    $f = $m.Groups[1].Value
    $feat = $m.Groups[4].Value.ToCharArray() | ForEach-Object { $letters["$_"] } | Where-Object { $_ }
    [pscustomobject]@{
        Size     = $Size
        Family   = '{0} ({1})' -f $f, $families[$f.Substring(0,1)]
        vCPUs    = [int]$m.Groups[2].Value
        Features = $feat -join ', '
        Version  = if ($m.Groups[6].Success) { 'v' + $m.Groups[6].Value } else { 'v1' }
    }
}
'Standard_B2ats_v2','Standard_D2s_v5','Standard_E2s_v5','Standard_F2s_v2','Standard_D2ds_v5','Standard_B2pts_v2' |
    ForEach-Object { Read-VmSize $_ } | Format-Table -AutoSize

You should see this:

Size              Family                vCPUs Features                                  Version
----              ------                ----- --------                                  -------
Standard_B2ats_v2 B (Burstable)             2 AMD CPU, tiny memory, Premium SSD capable v2
Standard_D2s_v5   D (General purpose)       2 Premium SSD capable                       v5
Standard_E2s_v5   E (Memory optimised)      2 Premium SSD capable                       v5
Standard_F2s_v2   F (Compute optimised)     2 Premium SSD capable                       v2
Standard_D2ds_v5  D (General purpose)       2 local temp disk, Premium SSD capable      v5
Standard_B2pts_v2 B (Burstable)             2 Arm CPU, tiny memory, Premium SSD capable v2

This output is exact: the script just reads the letters. Notice Standard_B2pts_v2, the free account’s other free size: it’s Arm, which matters in “Break It”.

2Compare real specs from Azure

Run this:

$want = 'Standard_B2ats_v2','Standard_D2s_v5','Standard_E2s_v5','Standard_F2s_v2'
$skus = az vm list-skus --location centralindia --resource-type virtualMachines -o json | ConvertFrom-Json | Where-Object { $want -contains $_.name }
$skus | ForEach-Object {
    $cap = @{}; $_.capabilities | ForEach-Object { $cap[$_.name] = $_.value }
    [pscustomobject]@{ Size = $_.name; vCPUs = $cap.vCPUs; MemoryGB = $cap.MemoryGB; MaxDataDisks = $cap.MaxDataDiskCount; Arch = $cap.CpuArchitectureType }
} | Sort-Object { [double]$_.MemoryGB } | Format-Table -AutoSize

You should see something like this:

Size              vCPUs MemoryGB MaxDataDisks Arch
----              ----- -------- ------------ ----
Standard_B2ats_v2 2     1        4            x64
Standard_F2s_v2   2     4        4            x64
Standard_D2s_v5   2     8        4            x64
Standard_E2s_v5   2     16       4            x64

Same 2 vCPUs, but memory runs from 1 to 16 GiB. Put that beside the prices from Lesson 1 (roughly USD 4.49, 62, 74 and 95 a month for Linux) and you can show anyone why the family matters. az vm list-skus pulls down a big list, so give it a few seconds.

3See what web01 can resize to

Run this:

$opts = az vm list-vm-resize-options --resource-group rg-saat-vms --name web01 --query "[].name" -o tsv
"$($opts.Count) sizes available"
$opts | Where-Object { $_ -match '^Standard_B2' }

You should see something like this:

412 sizes available
Standard_B2als_v2
Standard_B2as_v2
Standard_B2ats_v2
Standard_B2ls_v2
Standard_B2s_v2
...

Since web01 is deallocated, Azure shows every size in the region and not only the ones on its current hardware. A running VM would get a shorter list.

4Resize while deallocated, then put it back

Run this:

az vm resize --resource-group rg-saat-vms --name web01 --size Standard_B2als_v2 -o none
az vm show --resource-group rg-saat-vms --name web01 --show-details --query "{size:hardwareProfile.vmSize, power:powerState}" -o table
az vm resize --resource-group rg-saat-vms --name web01 --size Standard_B2ats_v2 -o none
az vm show --resource-group rg-saat-vms --name web01 --query hardwareProfile.vmSize -o tsv

You should see something like this:

Size               Power
-----------------  --------------
Standard_B2als_v2  VM deallocated
Standard_B2ats_v2

B2als_v2 has 4 GiB of memory (the “l” means low memory compared with the 8 GiB on B2as_v2). Resizing a deallocated VM happens instantly and costs nothing, because you only pay once you start it. Then you moved web01 back to the size the free account covers.

5Find the B-series credit metrics

Run this:

$id = az vm show --resource-group rg-saat-vms --name web01 --query id -o tsv
az monitor metrics list-definitions --resource $id --query "[?contains(name.value,'Credit')].name.value" -o tsv

You should see this:

CPU Credits Remaining
CPU Credits Consumed

If a B-series VM feels slow, look at CPU Credits Remaining before anything else. A flat line at zero while CPU sits at the baseline percentage tells you the VM needs a bigger size or a non-burstable one.

Azure VM sizes lab: Read-VmSize output and a resize while deallocated
The Read-VmSize output is exact; the resize output is an example.

✅ Checkpoint: You can decode a size name, web01 is back on Standard_B2ats_v2 and still deallocated.

Break It, Then Fix It

Here are two resizes that look reasonable but get refused, and in both cases Azure is stopping you from ending up with a VM that won’t boot.

1Break it: add a local temp disk by resizing

Run this:

az vm resize --resource-group rg-saat-vms --name web01 --size Standard_D2ds_v5

You’ll get an error like this:

(OperationNotAllowed) Unable to resize the VM 'web01' since changing from resource disk to non-resource disk VM size and vice-versa is not allowed. Please refer to https://aka.ms/AAah4sj for more details.
Code: OperationNotAllowed

B2ats_v2 has no local temp disk while D2ds_v5 has one (that’s the “d”). An OS that was set up without a temp disk, or that keeps its swap or page file on one, might not boot after the switch, so Azure blocks it, and it blocks the reverse move too.

Fix it: if you need D-series, pick a size without the “d”, for example Standard_D2s_v5, or rebuild the VM on the new size. For now, leave web01 alone.

2Break it: an x64 image on an Arm size

Now try building a VM on the Arm size (the free account covers this one too) using the x64 Ubuntu image:

$v = Get-Content C:\azure-lab\vnet-saat.json | ConvertFrom-Json
az vm create --resource-group rg-saat-vms --name arm99 --image Canonical:ubuntu-24_04-lts:server:latest --size Standard_B2pts_v2 --subnet $v.'snet-mgmt' --public-ip-address '""' --nsg '""' --admin-username azureuser --generate-ssh-keys

You’ll get an error like this:

Cannot create a VM of size 'Standard_B2pts_v2' because this VM size only supports a CPU Architecture of 'Arm64', but an image or disk with CPU Architecture 'x64' was given. Please check that the CPU Architecture of the image or disk is compatible with that of the VM size.

The “p” in B2pts_v2 stands for Arm. Arm sizes need Arm64 images and software built only for x64 won’t run on them, so nothing got created.

Fix it: if your software supports Arm, use the Arm64 image. Check that it exists first:

az vm image show --location centralindia --urn Canonical:ubuntu-24_04-lts:server-arm64:latest --query architecture -o tsv

You should see this:

Arm64

There’s no need to create the Arm VM. Clean up anything the failed attempt left behind:

az resource list --resource-group rg-saat-vms --query "[?contains(name,'arm99')].name" -o tsv

Nothing should be printed. If something is listed, remove it with az resource delete --ids.

Azure VM sizes errors: temp disk resize blocked and x64 image on an Arm size
Example output of both errors.

✅ Checkpoint: Both resize problems reproduced, nothing new was created, and web01 is unchanged and deallocated.

This happened at work

The reporting database that ran out of credits every month-end

An accounting firm moved its reporting database to Azure and put it on a Standard_B4ms, the thinking being that “it only works hard at month-end”. For three weeks out of four the VM sat idle and banked credits, and then on the last two days of the month the finance team ran heavy reports from morning till night.

On the afternoon of that first month-end the VM burned through its credits and fell back to baseline CPU, so reports that used to take 4 minutes were taking 40. The team blamed the new storage first, then the network, and lost a full day adding disks before somebody opened CPU Credits Remaining and saw it lying flat at zero since noon.

What they changed: they moved the database to a Standard_E4s_v5 sized for its real memory use and bought a reserved instance to bring the cost down. B-series stayed, but only for small servers that are truly bursty, and every B-series VM now raises an alert when credits drop below 20 percent, so the team finds out before the users do.

Common mistakes and troubleshooting

MistakeWhat you seeWhat to do
Sizing by the old server’s specsPaying for idle CPUsMeasure what it really uses, then pick the smallest size that covers the peak.
Busy, steady workloads on B-seriesSudden slowdowns when credits run outKeep an eye on CPU Credits Remaining, and use D, E or F for steady load.
Resizing between temp-disk and no-temp-disk sizesOperationNotAllowedStay with the same kind of size, or rebuild on the new one.
Arm size with an x64 image“only supports a CPU Architecture of Arm64”Use an Arm64 image, or an x64 size.
Resizing a running VM in a busy hourAn unplanned restartEvery resize restarts the VM, so book a short window for it.
Ignoring disk limits of small sizesFast disks that feel slowLook up the size’s maximum IOPS and throughput (Lesson 72).

Interview questions

Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. What do the letters in Standard_D2s_v5 mean?

Why they ask this: It’s a quick check that you can read size names.

How you might answer: D is the general-purpose family and 2 is the vCPU count. The s means it supports Premium SSD, and v5 is the version.

2. When would you choose an E-series VM over a D-series?

Why they ask this: They want to see if you can match a family to a workload.

How you might answer: I’d go for E when the workload needs more memory per CPU, say SQL Server, SAP or a big cache. E-series gives you about 8 GiB per vCPU, which is double what D-series gives.

3. Does resizing a VM restart it?

Why they ask this: It’s practical and comes up a lot.

How you might answer: Yes, a resize always restarts the VM, and if the new size isn’t on the current hardware you have to deallocate it first. That’s why I schedule resizes in a quiet window.

2–5 years experience

4. Users say a B-series VM gets very slow every afternoon. What do you check?

Why they ask this: They want to know if you understand CPU credits.

How you might answer: I’d open the CPU Credits Remaining and Percentage CPU metrics. If credits have hit zero and CPU is stuck at the baseline, the VM is starved of credits. If the load is still bursty I’d move to a bigger B size, and if it’s steady I’d go to a D, E or F size.

5. A resize fails with “changing from resource disk to non-resource disk VM size is not allowed”. What does it mean?

Why they ask this: It’s a real restriction they expect you to have seen.

How you might answer: It means one size has a local temp disk and the other doesn’t. Azure blocks the move because the OS might depend on that temp disk, or might never have had one set up. I’d choose a target size of the same kind, or rebuild the VM on the new size.

6. How would you right-size a fleet of 100 VMs?

Why they ask this: They’re looking for a method based on data.

How you might answer: First I’d pull a few weeks of CPU and memory metrics into Log Analytics and take Azure Advisor’s right-sizing list as a starting point. Then I’d resize the obvious cases in batches inside agreed windows, and watch performance for a week before moving on to the next batch.

Senior level

7. When would you consider constrained vCPU sizes like E4-2s_v5?

Why they ask this: They want to see if you think about licence costs.

How you might answer: For software licensed per core, like SQL Server Enterprise, when the workload needs the memory and disk throughput of a bigger size but not all its cores. You still pay the VM price of the full size, but you licence fewer cores, and overall that can save a lot.

8. Should a company move workloads to Arm-based VMs?

Why they ask this: They want a balanced answer, not hype.

How you might answer: Arm sizes often give better price-performance, so I’d test them for Linux workloads built for Arm64, which covers a lot of web apps and containers. Anything with x64-only binaries, plenty of commercial apps, or Windows needs testing first, and some of it won’t run at all.

I’d begin with a stateless service, compare cost and performance for a few weeks and decide after that.

9. Your v5 VMs need to move to v6 sizes. What do you plan for?

Why they ask this: They want to know if you’re aware of the NVMe and temp disk changes.

How you might answer: v6 sizes use NVMe disk controllers and show temp disks differently, so the OS image has to support NVMe and some resizes get blocked. I’d test the image on a v6 size first, check how the temp disk and page file are set up, and rebuild instead of resizing wherever it’s blocked.

Quick quiz

Q1. What does the “d” in Standard_D2ds_v5 mean?

  1. Double memory
  2. Local temp disk
  3. Dedicated host
  4. Disk encryption
Show answer

B — d means the size has a local temporary disk.

Q2. Which family is memory optimised?

  1. B
  2. D
  3. E
  4. F
Show answer

C — E-series gives about 8 GiB per vCPU.

Q3. What happens when a B-series VM runs out of CPU credits?

  1. It stops
  2. It is held at its baseline CPU percentage
  3. It resizes itself
  4. Nothing
Show answer

B — It slows down to the baseline until it banks credits again.

Q4. Why did creating a VM on Standard_B2pts_v2 with the x64 Ubuntu image fail?

  1. No quota
  2. B2pts_v2 is an Arm size and needs an Arm64 image
  3. The region doesn’t have it
  4. SSH keys aren’t allowed
Show answer

B — The “p” means Arm.

Q5. Why can you see more resize options for a deallocated VM?

  1. It’s cheaper
  2. It isn’t tied to its current hardware cluster
  3. Azure is faster at night
  4. Deallocated VMs have no limits
Show answer

B — A running VM can only move to sizes available on its current cluster.

Quick recap

You can now read size names, pick a family and explain why, and resize without nasty surprises.

  • Name = family, vCPUs, feature letters, version: D2ds_v5 is general purpose, 2 vCPUs, temp disk, Premium SSD, v5.
  • B is burstable, D general, E memory and F compute, and you choose by the shape of the load.
  • B-series runs on credits, so keep an eye on CPU Credits Remaining.
  • A resize restarts the VM, and temp-disk changes and x64-to-Arm changes are blocked.
  • Resizing while deallocated shows you every size and costs nothing.

Next lesson

Lesson 18: Availability sets vs availability zones → Next you’ll see how Azure keeps VMs apart so a single failure can’t take them all down.

Further reading: Azure VM sizes

Want to go deeper into Azure VM sizes? See Microsoft’s Sizes for virtual machines in Azure and Azure virtual machine sizes naming conventions. You can also see the full plan for this course on the Azure Cloud Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.