Share via

Azure VM Resize failing because `hardwareProfile.vmSizeProperties` silently gets set

Julian 40 Reputation points
2026-04-29T15:25:50.99+00:00

Our Azure account silently sets the hardwareProfile.vmSizeProperties VM property when making (seemingly) all VMs.

I'm simply trying to resize VMs within the same family with az vm resize and get this error:

Message: The requested vCPUsAvailable is not supported for the given VM Size (SIZE). More details available here: https://aka.ms/vmcustomization.

We're using a mixture of Terraform and manually created VMs and almost all of them now seem to be unable to be resized with az vm resize.

I've read through the "VM vCore Customization Feature: Disable Simultaneous Multi-Threading (SMT/HT) and Configurable Constrained Cores (Preview)" page thoroughly and it seems like this is an "at creation time" configuration option; even though it seems I'm able to change this via the Portal (maybe it's not exposed to the az cli yet... or Terraform).

Can anyone advise on this? I've tried a lot of different fixes, including:

  • Trying to deallocate the VM before resizing - same issue
  • Putting a check in beforehand (as per the Az CLI docs - az vm list-vm-resize-options: this check doesn't fail)
  • Running az vm update --v-cpus-per-core 1 - the docs claim that this should disable the behaviour but it actually still errors...
  • I tried looking to see if I could disable this behaviour (it says it's a "preview" feature after all...): no such option exists that I can see
Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

Answer accepted by question author

  1. Andy Gettings 80 Reputation points
    2026-05-02T21:27:30.7733333+00:00

    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.

    3 people found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. Jerald Felix 11,550 Reputation points Volunteer Moderator
    2026-04-29T15:34:03.86+00:00

    Hello Julian

    Greetings!

    Thanks for raising this question in Q&A forum.

    The reason this is happening is that your VMs have the hardwareProfile.vmSizeProperties field set (either silently by a policy/configuration in your Azure account, or via Terraform), which enables the VM vCore Customization (Preview) feature. Once this property is set on a VM, Azure enforces that the target resize SKU must support the exact vCPUsAvailable value that was configured — and most standard resize operations don't account for this, causing the error you're seeing.

    Here's how you can resolve this step by step:

    Step 1: Deallocate the VM first

    Before making any changes, always deallocate the VM:

    az vm deallocate --resource-group <ResourceGroupName> --name <VMName>
    

    Step 2: Clear the vmSizeProperties via Azure REST API or PowerShell

    The Azure CLI doesn't yet have a direct flag to null out this property cleanly, so use the REST API approach. Run this via PowerShell:

    $vm = Get-AzVM -ResourceGroupName "<ResourceGroupName>" -Name "<VMName>"
    $vm.HardwareProfile.VmSizeProperties = $null
    Update-AzVM -ResourceGroupName "<ResourceGroupName>" -VM $vm
    

    This clears the custom vCore property so the VM behaves like a standard VM again.

    Step 3: Resize the VM

    Now resize it normally:

    az vm resize --resource-group <ResourceGroupName> --name <VMName> --size <NewVMSize>
    

    Step 4: For Terraform-managed VMs

    If your VMs are created via Terraform, check your configuration for any block like:

    additional_capabilities {
      ultra_ssd_enabled = ...
    }
    

    or any vm_size_properties block, and remove it. Also check if your Azure account has any Policy assignments that auto-apply this setting at provisioning time — that could be the "silent" cause here.

    Step 5: Check for Azure Policy

    Go to Azure Portal → Policy → Assignments and look for any policy related to "vCore" or "SMT" that might be automatically injecting this property on VM creation. If found, consult your admin about exempting your VMs or disabling it for your scope.

    Since this is still a Preview feature, Microsoft may not have full CLI/Terraform parity yet — so the PowerShell or REST API approach is currently the most reliable path forward.

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ankit Yadav 14,165 Reputation points Microsoft External Staff Moderator
    2026-04-29T16:40:29.2133333+00:00

    Hello Julian,

    The behavior you are seeing is with how the VM vCore Customization (Disable SMT / Constrained vCPUs) preview feature works. When a VM is created with vCore customization enabled, Azure records that configuration in the VM’s hardwareProfile.vmSizeProperties. From that point onward, the VM is treated as having a custom CPU topology, and any resize operation must remain compatible with those constraints.

    This has a few important implications:

    • The vCPUsAvailable and vCPUsPerCore values become part of the VM’s definition.
    • During az vm resize, Azure validates that the target VM size supports the existing customized CPU configuration.
    • If the new size does not support the same constrained vCPU layout, the resize fails with: “The requested vCPUsAvailable is not supported for the given VM size.”

    This explains why:

    • Deallocating the VM does not resolve the issue.
    • az vm list-vm-resize-options may still show sizes that later fail validation.
    • The resize fails even when staying within the same VM family.

    Based on current design for VMs:

    • vCore customization is configured at VM creation time.
    • There is no supported method to remove or reset vmSizeProperties on an existing VM.
    • Updating the VM via ARM patching or manually nulling vmSizeProperties is not a documented or supported operation.
    • Changing these settings in the Azure portal may appear possible in some cases, but Microsoft Learn does not document post‑creation removal or reset of vCore customization, and behavior may vary while the feature is in preview.

    To proceed in a supported way, you have the following options:

    • Resize only to VM sizes that support the existing vCore customization values This requires the target size to accept the same vCPUsAvailable and vCPUsPerCore configuration.
    • Recreate the VM without vCore customization If you need full flexibility to resize across VM sizes, the supported approach is to recreate the VM using default CPU settings (no constrained cores or SMT changes).
    • Continue using vCore customization intentionally If constrained cores or SMT disabling are desired for licensing or performance reasons, plan future VM sizes accordingly and expect resize limitations.

    At this time, this behavior is not documented as a known service issue or regional incident. It is a limitation of how the preview feature integrates with VM resize validation.

    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.