skip to Main Content

Creating a resource in Azure with the following command:

az vm create --name quickvm --resource-group RG1 --image Debian --admin-username student --admin-password Password456#@long

Fails with:

az vm create: error: the following arguments are required: –name/-n, –resource-group/-g

This isn’t the first time, the commands are definitely correct, so something funny is going on. Any ideas?

2

Answers


  1. Chosen as BEST ANSWER

    Sometimes the formatting of the hyphens is malformed. Type the hyphens in again or replace the big-endians:

    enter image description here


  2. Same happened to me during Azure Fundamentals course:

    az vm extension set 
           --resource-group learn-....
           --vm-name my-vm 
           -n customScript 
           --publisher Microsoft.Azure.Extensions 
           --version 2.1 
           --settings '{"fileUris":["https://raw.githubusercontent.com/Microsoft
           --protected-settings '{"commandToExecute": "./configure-nginx.sh"}'
    

    the following arguments are required: –name/-n, –publisher

    Switching from az interactive to bash helped.

    Replacing dashes or spaces or copying-pasting into text editor didn’t help.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search