I am getting error while creating VM in Azure CLI using Katacoda

Anonymous
2020-07-10T11:00:01.197+00:00

I am getting the below error while creating VM in AzureCLI using Katacoda

admin user name cannot contain upper case character A-Z, special characters /"[]:|<>+=;,?*@#()!or start with $ or -

Kindly help me to resolve this

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
600 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,201 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,132 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Rene van Roon (dev) 6 Reputation points
    2020-09-03T07:59:56.523+00:00

    Add the admin name in your command. example:

    az vm create --admin-password P@ssw8rd27!!! --admin-username adminazure --image UbuntuLTS --name Pita5 --resource-group resourcegroup6

    worked for me..

    1 person found this answer helpful.

  2. Manu Philip 16,991 Reputation points MVP
    2020-07-10T12:59:29.72+00:00

    Hi,
    Please refer the username requirements as mentioned in the following Microsoft documentation and proceed to correct it in your script

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/faq#what-are-the-username-requirements-when-creating-a-vm

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu

    0 comments No comments