Skip to content

VM Ware Creating Issue #32870

Description

@Santhoshswproff

Describe the bug

While Creating VM machine in Azur - using command

Related command

az vm create --resource-group "IntroAzureRG" --name my-vm --size Standard_D2s_v5 --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

Errors

The command failed with an unexpected error. Here is the traceback:
The content for this response was already consumed
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 706, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/vm/custom.py", line 1254, in create_vm
LongRunningOperation(cmd.cli_ctx)(client.begin_create_or_update(resource_group_name, deployment_name, deployment))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/_operations.py", line 7094, in begin_create_or_update
raw_result = self._create_or_update_initial(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/_operations.py", line 6987, in _create_or_update_initial
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (InvalidTemplateDeployment) The template deployment 'vm_deploy_Ind7urK4GKn7PK2LDuxNpkqcUALBuCnQ' is not valid according to the validation procedure. The tracking id is '5cf03619-d33d-4746-9cbb-7b6e35c461db'. See inner errors for details.
Code: InvalidTemplateDeployment
Message: The template deployment 'vm_deploy_Ind7urK4GKn7PK2LDuxNpkqcUALBuCnQ' is not valid according to the validation procedure. The tracking id is '5cf03619-d33d-4746-9cbb-7b6e35c461db'. See inner errors for details.
Exception Details: (SkuNotAvailable) The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'centralus'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details.
Code: SkuNotAvailable
Message: The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'centralus'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
raise CLIError(ex.inner_exception.error.message)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 669, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 737, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 729, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 112, in handle_template_based_exception
raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/requests/models.py", line 926, in text
if not self.content:
^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/requests/models.py", line 897, in content
raise RuntimeError("The content for this response was already consumed")
RuntimeError: The content for this response was already consumed
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

The command failed with an unexpected error. Here is the traceback:
The content for this response was already consumed
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 706, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/vm/custom.py", line 1254, in create_vm
LongRunningOperation(cmd.cli_ctx)(client.begin_create_or_update(resource_group_name, deployment_name, deployment))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/_operations.py", line 7094, in begin_create_or_update
raw_result = self._create_or_update_initial(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/_operations.py", line 6987, in _create_or_update_initial
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (InvalidTemplateDeployment) The template deployment 'vm_deploy_Ind7urK4GKn7PK2LDuxNpkqcUALBuCnQ' is not valid according to the validation procedure. The tracking id is '5cf03619-d33d-4746-9cbb-7b6e35c461db'. See inner errors for details.
Code: InvalidTemplateDeployment
Message: The template deployment 'vm_deploy_Ind7urK4GKn7PK2LDuxNpkqcUALBuCnQ' is not valid according to the validation procedure. The tracking id is '5cf03619-d33d-4746-9cbb-7b6e35c461db'. See inner errors for details.
Exception Details: (SkuNotAvailable) The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'centralus'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details.
Code: SkuNotAvailable
Message: The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'centralus'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
raise CLIError(ex.inner_exception.error.message)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 669, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 737, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 729, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 112, in handle_template_based_exception
raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/requests/models.py", line 926, in text
if not self.content:
^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/requests/models.py", line 897, in content
raise RuntimeError("The content for this response was already consumed")
RuntimeError: The content for this response was already consumed
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Expected behavior

Vm need s to Created under group

Environment Summary

azure CLI

Additional context

No response

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Feb 27, 2026
  2. yonzhan commented on Feb 27, 2026

    @yonzhan
    Collaborator

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

  3. added
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Feb 27, 2026
  4. github-actions commented on Feb 27, 2026

    @github-actions

    Here are some similar issues that might help you. Please check if they can solve your problem.


    Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

    Solution 1:

    Change the VM size to a different one that is available in the specified region. For example, use the following command:

    az vm create --resource-group "IntroAzureRG" --name my-vm --size Standard_DC1ds_v3 --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys
    

    Remember to delete the resources after your exercise.

    Reference:

    Solution 2:

    Change the location to a region where the desired VM size is available. For example, use 'eastus2' instead of 'eastus'. Additionally, you can change the VM size to 'StandardD2as_v6'.

    Reference:

    Solution 3:

    Change the VM size to 'Standard_D2s_v3' or other available sizes such as 'Standard_D4s_v3' or 'Standard_E2s_v3'. For example:

    az vm create --resource-group "IntroAzureRG" --name my-vm --size Standard_D2s_v3 --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys
    

    Here are other options available:

    --size Standard_D4s_v3
    --size Standard_E2s_v3
    

    Reference:

    Powered by issue-sentinel

  5. removed
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Feb 27, 2026
  6. added this to the Backlog milestone on Feb 27, 2026
  7. yanzhudd commented on Mar 3, 2026

    @yanzhudd
    Contributor

    The key error message is shown below and is related to the backend logic:

    Exception Details:
    (SkuNotAvailable) The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D2s_v5' is currently not available in location 'centralus'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details.

  8. added
    Service AttentionThis issue is responsible by Azure service team.
    and removed
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    on Mar 3, 2026
  9. microsoft-github-policy-service commented on Mar 3, 2026

    @microsoft-github-policy-service
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-AssignAuto assign by botComputeaz vm/vmss/image/disk/snapshotPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-Issueact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions