Not able to create vmss form compute gallery specialized image through azure cli

Abhayjit Kumar 0 Reputation points
2024-10-04T05:18:52.4666667+00:00

I have a specialized image in compute gallery which i am passing as source image id while creating vmss, Error message: "admin user name cannot contain upper case character A-Z"
Cli command: "az vmss create -g abhay-dev-terraform-rg -n test-vmss --image /subscriptions//xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx/resourceGroups/Terraform_test/providers/Microsoft.Compute/galleries/terrafrom_gallery/images/image-definition-tf/versions/1.0.0 --specialized"

Since i already have set admin user and password so we are not passing it in cli.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,998 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
408 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,597 questions
{count} votes

1 answer

Sort by: Most helpful
  1. anashetty 740 Reputation points Microsoft Vendor
    2024-10-07T08:55:26.5566667+00:00

    Hi Abhayjit Kumar,

    Try creating the VMSS using a specialized image by not specifying a new admin username.

    az vmss create \
      -g <resource-group> \
      -n <vmss-name> \
      --image <image-id> \
      --specialized
    

    If the error persists, try using --debug in your CLI command to get more detailed logs about the failure.

    az vmss create \
      -g abhay-dev-terraform-rg \
      -n test-vmss \
      --image /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx/resourceGroups/Terraform_test/providers/Microsoft.Compute/galleries/terrafrom_gallery/images/image-definition-tf/versions/1.0.0 \
      --specialized \
      --debug
    

    Make sure you are using the latest version of the Azure CLI. You can update it using:

    sudo apt-get update
    sudo apt-get install --only-upgrade -y azure-cli
    

    Please try above steps, if you still find any difficulties, please share more details on the issue so that we can assist you further on this.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.