0
respostas

[Bug] Erro ao tentar criar a VM

Tentei várias vezes criar a VM e não consegui já tentei mudar de localização várias vezes e tamanho também (eu omiti as ultimas linhas do erro porque não cabia na caixa):

az vm create \
  --resource-group CursosAprendizados \
  --name myVM_Lab \
  --image Ubuntu2204 \
  --generate-ssh-keys \
  --location northcentralus \
  --size Standard_B1s \
  --verbose
The default value of '--size' will be changed to 'Standard_D2s_v5' from 'Standard_DS1_v2' in a future release.
Use existing SSH public key file: /home/crystyan/.ssh/id_rsa.pub
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_83Tqj4ypfBfpVeEK4WTeNaERBIeYl1E3' is not valid according to the validation procedure. The tracking id is '1e005185-0b5f-42a0-a949-deecbfc384a8'. See inner errors for details.
Code: InvalidTemplateDeployment
Message: The template deployment 'vm_deploy_83Tqj4ypfBfpVeEK4WTeNaERBIeYl1E3' is not valid according to the validation procedure. The tracking id is '1e005185-0b5f-42a0-a949-deecbfc384a8'. See inner errors for details.
Exception Details:      (SkuNotAvailable) The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_B1s' is currently not available in location 'northcentralus'. 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_B1s' is currently not available in location 'northcentralus'. 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))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[ ... ]