An Azure service that is used to provision Windows and Linux virtual machines.
I was hitting the same error when resizing an older VM:
“requested vCPUs are not supported for the specified VM size”
This was on a VM created in 2019 with a now‑deprecated microsoftwindowsdesktop / office‑365 / 1903‑evd‑o365pp image. The VM had hardwareProfile.vmSizeProperties enforced and would not resize to smaller B‑series SKUs. Setting:
PowerShell$vm.HardwareProfile.VmSizeProperties = $null
was accepted by ARM but immediately reverted back to 20 vCPUs. What did work was explicitly setting a constrained vCPU value, not nulling the property:
$vm = Get-AzVM -ResourceGroupName <rg> -Name <vm>
$vm.HardwareProfile.VmSizeProperties.VCPUsAvailable = 1
$vm.HardwareProfile.VmSizeProperties.VCPUsPerCore = 1
Update-AzVM -ResourceGroupName <rg> -VM $vm
After that, I was able to resize successfully (for example, from B20ms to B4ms). The VM ended up running as Standard_B4ms with 16 GB RAM but only 1 vCPU, which is valid under constrained‑core rules. Important notes:
- Billing remains based on the full VM size.
- This seems to rely on vCore customization being supported by the target SKU.
- Clearing VmSizeProperties entirely did not work for me; setting a valid value did.
Posting this in case it helps others stuck on older VMs.