I have a large number of Windows Azure VMs running on B2s, B2ms, F2s, and D2s sizes. Since these older sizes can no longer be covered by reservations, our costs are expected to increase. I need to move the VMs to newer, reservable SKUs while keeping the existing systems and data intact.
A direct resize fails because of differences involving temporary disks and the underlying storage technology. The options I've considered are restoring each VM with Veeam, creating an Azure image and redeploying, or deleting and recreating the VM from its existing OS disk. Some of the machines are very large, so I'm looking for the quickest approach with the least manual work and downtime. Around 60% are web front ends, which may make redeployment easier. We use Windows licenses with Azure Hybrid Benefit.
3 Answers
For Windows VMs, check where the page file is located. If it’s on the temporary disk, temporarily move it to the C: drive before resizing, then move it back afterward if appropriate. The temporary-disk placement can prevent a size change even when the target SKU would otherwise work.
The best path depends on the source and target SKU. For example, some B-series migrations to newer equivalent sizes require deleting and recreating the VM while keeping the OS and data disks, whereas moving an F-series VM to a compatible D-series size may work with a normal deallocate-and-resize operation. A scripted delete/recreate process can reduce the outage to roughly 15 minutes per VM, but it still needs careful handling of NICs, disks, extensions, identities, and boot configuration.
For the B2s and B2ms machines, a newer B2as_v2-style target may involve the more disruptive rebuild process. A D2ads_v5 target is usually easier to resize into, although pricing should be checked even with Hybrid Benefit. F-series migrations can also become complicated if the desired replacement requires Gen2 or an NVMe controller change. Since many of these are web front ends, building an automated redeployment workflow and validating it on a few machines first is probably safer than manually restoring every large VM.
The affected sizes are B2s, B2ms, F2s, and D2s, and they all run Windows with Hybrid Benefit. Since most are web front ends, I may start by scripting the rebuild process on a small group before tackling the larger servers.
Before assuming the VM has to be rebuilt, try stopping it and making sure it reaches the fully deallocated state, then perform the resize. Resizing while the VM is running can fail with errors that look like an unsupported storage or temporary-disk issue.

That’s useful to know. I’ll test moving the page file first and report back once I get a chance to try it.