Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az vm create: The Admin Username specified is not allowed. #582

Closed
ahmetb opened this issue Aug 1, 2016 · 5 comments
Closed

az vm create: The Admin Username specified is not allowed. #582

ahmetb opened this issue Aug 1, 2016 · 5 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Milestone

Comments

@ahmetb
Copy link
Contributor

ahmetb commented Aug 1, 2016

Note that the following command does not have any admin username argument specified, yet it still sends the request to the API and fails.

az vm create -n myvm -g docker-machine --subnet-n docker-machine --availability-set docker-machine --authentication-type ssh --image 'canonical:ubuntuserver:14.04.3-LTS:latest' --ssh-key-value 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAVUjb+H+bQgargG0Ew42/KjjIrJ4Vqwp8X3PKDCS7udZE8rTKx0ah8EfsVcSpzgHMOg2Dx/EBjF5/fE3QUwd8GCe1pNi875/Cf2CEfuQNhoxs+zXTdrVnaa6AnZszFHnPSS7QMhWA8lhjF4N2GCRQDDd3e45qNMc4TsNLz4dS90SNwNVbCyQnme46NTS5Fk2AbiJ5YqWF1UhEpUAdsWFsCRVQAHjH3Y57b2jk3RJJ9UFYQ5Trlow4ocOYEfsUGmr3yNFiIxlZC/sfx6WKoBxCOJhv/NJr0ow65zp/TC85IeDK5h8Jedd5UT2umdZDp4dbGhW0Aus2Md8yWE80/M9f alp@personal' --size Standard_A1
Starting vm create
Long running operation failed with status 'Failed' {
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "DeploymentFailed",
        "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.",
        "details": [
          {
            "code": "BadRequest",
            "message": "{\r\n  \"error\": {\r\n    \"code\": \"InvalidParameter\",\r\n    \"target\": \"adminUsername\",\r\n    \"message\": \"The Admin Username specified is not allowed.\"\r\n  }\r\n}"
          }
        ]
      }
    ]
  }
}
@yugangw-msft
Copy link
Contributor

yugangw-msft commented Aug 1, 2016

@BurtBiel, i guess tth getpass.getuser() might return empty string? if yes, we need a wrapper to throw on such case.

@BurtBiel
Copy link
Contributor

BurtBiel commented Aug 1, 2016

This is likely because the local user name was 'admin', which is not allowed by Azure. The name that will be used by the command can be found in az vm create -h

@JasonRShaver JasonRShaver added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 3, 2016
@JasonRShaver JasonRShaver added this to the Backlog milestone Aug 3, 2016
@tjprescott
Copy link
Member

@yugangw-msft merged a PR that should fix this issue.

@haroldrandom haroldrandom added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 25, 2019
@khaledismaeel
Copy link

It seems that it cannot be "administrator" either.

@zhoxing-ms
Copy link
Contributor

@khaledismaeel Could you show the specific parameter information and debug log? Please add parameter --debug after the original executed command, and then send the printed information to me by email. My email address is Zhou.Xing@microsoft.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

No branches or pull requests

8 participants