Skip to content

VM Create prompting for admin username #2010

Description

My admin username was invalid and instead of throwing an error and exiting, it prompted me to enter it. It felt inconsistent with how usually, we simply throw an error.

$ az vm create -g debekoe-a4 -n mytestvm --image UbuntuLTS
Cannot use admin username: root. Admin username should be at least 6 characters and cannot be 'root'
Admin Username: ...

However, when I didn't have an SSH public key available, I received an error and there was no prompt:

An RSA key file or key value must be supplied to SSH Key Value. You can use --generate-ssh-keys to let CLI generate one for you.

If the admin username is invalid, should it not prompt and return an error such as below?

$ az vm create -g debekoe-a4 -n mytestvm --image UbuntuLTS
Cannot use admin username: root. Admin username should be at least 6 characters and cannot be 'root'. Specify admin username with --admin-username.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions