Sandbox az vm create

shanelle scialabba 26 Reputation points
2022-11-29T20:38:48.457+00:00

I am trying to use sandbox for an exercise. The steps is to create a VM. When I do the steps provided it says that information is missing such as username and resource group.
the following arguments are required: --name/-n, --resource-group/-g

Examples from AI knowledge base:
az vm create --name MyVm --resource-group MyResourceGroup --image RedHat:RHEL:7-RAW:7.4.2018010506
Create a default RedHat VM with automatic SSH authentication using an image URN.

az vm create --name MyVm --resource-group rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
Create a debian VM with a user assigned identity.

az group create --location westus --resource-group MyResourceGroup
Create a new resource group in the West US region.

https://learn.microsoft.com/en-US/cli/azure/vm#az_vm_create
Read more about the command in reference docs

Azure Azure Training
{count} votes

2 answers

Sort by: Most helpful
  1. shanelle scialabba 26 Reputation points
    2022-11-29T20:53:01.11+00:00

    Exercise - Create an Azure Virtual Machine
    Task 1: Create a Linux virtual machine and install Nginx
    From Cloud Shell, run the following az vm create command to create a Linux VM:

    this is what it is supposed to look like
    az vm create \
    --resource-group learn-ccc991cf-81bf-4edc-8e09-7fea1363453b \
    --name my-vm \
    --image UbuntuLTS \
    --admin-username azureuser \
    --generate-ssh-keys

    When I input "az vm create" this is the result
    the following arguments are required: --name/-n, --resource-group/-g

    Examples from AI knowledge base:
    az vm create --name MyVm --resource-group MyResourceGroup --image RedHat:RHEL:7-RAW:7.4.2018010506
    Create a default RedHat VM with automatic SSH authentication using an image URN.

    az vm create --name MyVm --resource-group rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
    Create a debian VM with a user assigned identity.

    az group create --location westus --resource-group MyResourceGroup
    Create a new resource group in the West US region.

    https://learn.microsoft.com/en-US/cli/azure/vm#az_vm_create
    Read more about the command in reference docs

    1 person found this answer helpful.
    0 comments No comments

  2. Martin Hennelly 0 Reputation points
    2024-01-29T09:53:20.54+00:00

    I am experiencing the same at: https://learn.microsoft.com/en-us/training/modules/describe-azure-compute-networking-services/3-exercise-create-azure-virtual-machine?source=learn User's image

    Requesting a Cloud Shell.Succeeded. Connecting terminal... Welcome to Azure Cloud Shell Type "az" to use Azure CLI Type "help" to learn about Cloud Shell username [ ~ ]$ az vm create the following arguments are required: --name/-n, --resource-group/-g Examples from AI knowledge base: az vm create --name MyVm --resource-group MyResourceGroup --image RedHat:RHEL:7-RAW:7.4.2018010506 Create a default RedHat VM with automatic SSH authentication using an image URN. az vm create --name MyVm --resource-group rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID Create a debian VM with a user assigned identity. az group create --location westus --resource-group MyResourceGroup Create a new resource group in the West US region. https://docs.microsoft.com/en-US/cli/azure/vm#az_vm_create Read more about the command in reference docs username [ ~ ]$


Your answer

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