Skip to content

[Compute] Add Flow VMs (FlexProfile) support to az vm #34222

Open

Description

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

Related command

  • az vm update (urgent fix, see below)
  • az vm create --preferred-size
  • az vm update --preferred-size
  • az vm show / az vm list (output gains flexProfile)

Resource Provider

Microsoft.Compute/virtualMachines

Description of Feature or Work Requested

[Public Preview]
Add Azure CLI support for Flow VMs (API name: FlexProfile), introduced in Compute API version 2026-04-01. A customer states a preferred VM size instead of an exact one. When the preferred size is constrained by capacity or placement, Azure may deploy a compatible alternative size. The VM records the request in properties.flexProfile.preferredVMSize and reports the deployed size in properties.hardwareProfile.vmSize. Using it requires the subscription feature Microsoft.Compute/FlexProfileEnabled and a supported region.

Urgent: az vm update removes FlexProfile today. az vm update does a GET and then a PUT through the AAZ model for 2026-04-01 (aaz/latest/vm/_update.py: VirtualMachinesGet, then VirtualMachinesCreateOrUpdate). That model has no flexProfile, and the AAZ loader skips fields the model doesn't define (azure-cli-core/aaz/_field_type.py, "ignore undefined key"). So the PUT is sent without flexProfile, which the service treats as an opt-out. Any az vm update on a Flow VM, even a tag change, silently takes it off FlexProfile. Regenerating the AAZ VM model from the merged spec at 2026-04-01 fixes this. No API-version change is needed, since az vm already uses 2026-04-01.

API rules the commands must respect:

  • A request that adds flexProfile to a VM that doesn't use it yet must not include hardwareProfile.vmSize. The service rejects it with InvalidParameter.
  • On a VM that already uses FlexProfile, a hardwareProfile.vmSize equal to the deployed size is ignored, so a GET body can be sent back unchanged. A different size is rejected with InvalidParameter.
  • To stop using FlexProfile, send a PUT that omits flexProfile and sets hardwareProfile.vmSize. This pins the VM to that size.

Proposed command changes:

  • az vm create: new --preferred-size, mutually exclusive with --size. --size has a default today, and _template_builder.py always sets hardwareProfile.vmSize. With --preferred-size, the template sets flexProfile.preferredVMSize and leaves out hardwareProfile.vmSize. Steps that depend on the VM size use the preferred size.
  • az vm update: keeps flexProfile on ordinary updates after the AAZ regeneration. New --preferred-size sets or changes the preferred size, and also switches a VM that doesn't use FlexProfile yet. When it's used, the PUT leaves out hardwareProfile.vmSize.
  • Opt-out: az vm update --size <size> --remove flexProfile.
  • az vm show / az vm list: output gains flexProfile after the AAZ regeneration.
  • Please also check az vm resize and any other command that sends a full VM PUT.

The PowerShell design with the same behaviour rules is https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1578.

Minimum API Version Required

2026-04-01

Swagger PR link / SDK link

Azure/azure-rest-api-specs#46694

Request Example

Target Date

2026-11-10

PM Contact

Lavanya.Krishnan@microsoft.com

Engineer Contact

Sri Harsha Varma Varma Uppalapati (@suppalapati-microsoft)

Additional context

The az vm update fix (AAZ model regeneration) is the most urgent part, because it affects Flow VMs created through the API, SDKs or PowerShell.

Activity

  1. yonzhan commented on Oct 13, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  2. removed
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Oct 13, 2026
  3. added this to the Backlog milestone on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions