It won't let me create a Virtual Machine in the Sandbox

Anonymous
2023-01-07T07:29:55.737+00:00

Hi, I'm working on Unit 3 of 14 of this Training Path:
Learn > Training > Browse > Azure Fundamentals: Describe Azure architecture and services > Describe Azure compute and networking services

We're asked to create a VM for step one with this command: "az vm create" without the quotes in the Azure CLI.

When I input that command, the result is as follows (copy-pasted from the Azure CLI):


adamleikness [ ~ ]$ 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://learn.microsoft.com/en-US/cli/azure/vm#az_vm_create
Read more about the command in reference docs
adamleikness [ ~ ]$


What shows up here after I enter that command is different from what is shown in the figure of the Learn Module beneath where it tells us to input the "az vm create".

Here's what it shows should come up (at least, I think that's what it's showing should come up. I'm new to using a CLI):


az vm create \
--resource-group learn-d76bec09-2062-471b-abeb-4ddc99205652 \
--name my-vm \
--image UbuntuLTS \
--admin-username azureuser \
--generate-ssh-keys


Am I doing something wrong or is there something to check for to troubleshoot this?

Thank you for any time you spend trying to help! Have a good one.

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,288 questions
0 comments No comments
{count} vote

Accepted answer
  1. TP 83,711 Reputation points
    2023-01-07T07:36:09.013+00:00

    Hi,

    Are you using the correct sandbox resource group name? In your case, for this unique sandbox (may have expired by now), the resource group name you need to use is learn-d76bec09-2062-471b-abeb-4ddc99205652

    This is a key point when working with the sandbox because you are blocked from creating new resource groups in concierge subscription.

    Please Accept Answer if the above was helpful.

    Thanks.

    -TP


1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-01-07T07:44:37.63+00:00

    Ah, the issue I was having was that I wasn't running the full command. I was only running "az vm create" when I in fact needed to run "az vm create \
    --resource-group learn-d76bec09-2062-471b-abeb-4ddc99205652 \
    --name my-vm \
    --image UbuntuLTS \
    --admin-username azureuser \
    --generate-ssh-keys"

    That whole thing!

    Anyway, you pointed me in the right direction, thank you!

    I'm gonna post this as a comment too, in case anyone runs into the same thing as me.

    2 people found this answer helpful.
    0 comments No comments