Share via

AZ-900 Training - Error trying to create Linux VM

Brian Gray 25 Reputation points
2025-10-15T14:04:33.08+00:00

I'm attempting to do this exercise:

Exercise - Create an Azure virtual machine - Training | Microsoft Learn

I successfully create the Resource Group via the CLI, but when I copy/paste the given command into the CLI to create the VM:

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

I get the following error(s):

brian [ ~ ]$ 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 The default value of '--size' will be changed to 'Standard_D2s_v5' from 'Standard_DS1_v2' in a future release. 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 703, 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 1171, 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_hXk7PimUwsDU9EYXBsd3luYS9hiO4OCQ' is not valid according to the validation procedure. The tracking id is 'f7f3e890-6fb7-45b4-b1bf-256f17e707ec'. See inner errors for details. Code: InvalidTemplateDeployment Message: The template deployment 'vm_deploy_hXk7PimUwsDU9EYXBsd3luYS9hiO4OCQ' is not valid according to the validation procedure. The tracking id is 'f7f3e890-6fb7-45b4-b1bf-256f17e707ec'. See inner errors for details. Exception Details:      (QuotaExceeded) Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 0, Current Usage: 0, Additional Required: 2, (Minimum) New Limit Required: 2. Setup Alerts when Quota reaches threshold. Learn more at https://aka.ms/quotamonitoringalerting . Submit a request for Quota increase at https://aka.ms/ProdportalCRP/#blade/Microsoft_Azure_Capacity/UsageAndQuota.ReactView/Parameters/%7B%22subscriptionId%22:%2221a96d5a-0208-467a-b12e-e99e77de5f1f%22,%22command%22:%22openQuotaApprovalBlade%22,%22quotas%22:[%7B%22location%22:%22eastus%22,%22providerId%22:%22Microsoft.Compute%22,%22resourceName%22:%22standardDSv5Family%22,%22quotaRequest%22:%7B%22properties%22:%7B%22limit%22:2,%22unit%22:%22Count%22,%22name%22:%7B%22value%22:%22standardDSv5Family%22%7D%7D%7D%7D]%7D by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests         Code: QuotaExceeded         Message: Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 0, Current Usage: 0, Additional Required: 2, (Minimum) New Limit Required: 2. Setup Alerts when Quota reaches threshold. Learn more at https://aka.ms/quotamonitoringalerting . Submit a request for Quota increase at https://aka.ms/ProdportalCRP/#blade/Microsoft_Azure_Capacity/UsageAndQuota.ReactView/Parameters/%7B%22subscriptionId%22:%2221a96d5a-0208-467a-b12e-e99e77de5f1f%22,%22command%22:%22openQuotaApprovalBlade%22,%22quotas%22:[%7B%22location%22:%22eastus%22,%22providerId%22:%22Microsoft.Compute%22,%22resourceName%22:%22standardDSv5Family%22,%22quotaRequest%22:%7B%22properties%22:%7B%22limit%22:2,%22unit%22:%22Count%22,%22name%22:%7B%22value%22:%22standardDSv5Family%22%7D%7D%7D%7D]%7D by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests 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 666, in execute     raise ex   File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, 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 726, 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

What am I doing wrong?

Azure | Azure Training

1 answer

Sort by: Most helpful
  1. Julian Sharp 30,356 Reputation points
    2025-10-15T19:32:57.02+00:00

    Not all exercises have a sandbox, so you need to use your own Azure subscription for this exercise.

    So, it looks like your subscription does not have any quota in the eastus region. Try another region or switch to another subscription if you have more than one.

    Was this answer helpful?


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.