Creation of Linux VM failing

Xuekun Kou 1 Reputation point
2022-05-02T07:21:19.33+00:00

I created a free azure account and updated to Pay-as-you-go. Then I uses the CLI to create a resource group and tried to create a Linux VM by following this page: https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-cli

PS C:\Users\xkou> az vm create --resource-group <my-resource-group-name> --image UbuntuLTS --admin-username azureuser --generate-ssh-keys
--name <vm-name>

I got the following error:

It is recommended to use parameter "--public-ip-sku Standard" to create new VM with Standard public IP. Please note that
the default public IP used for VM creation will be changed from Basic to Standard in the future.

{"error":{"code":"InvalidTemplateDeployment","message":"The template deployment failed with error: 'The resource with id: '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachines/<vm-name>' failed validation with message: 'The requested size for resource '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachines/<vm-name>' is currently not available in location 'eastus' zones '' for subscription '>subscription>'. Please try another size or deploy to
a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'."}}

It looks after updating to pay-as-you-go, no of the virtual machine size skus are available for my subscription. Could you please let me know how I can resolve this?

Thanks!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,015 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,487 Reputation points Moderator
    2022-05-02T10:35:47.993+00:00

    @Xuekun Kou

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    For a quick test, I just tried following the document you shared and was able to successfully deploy a VM. Please see below screenshot.

    Can you please try deploying a VM directly via Azure Portal and check if that succeeds. Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal

    If you don't see VM Sizes not getting displayed under your subscription as reported here, then it could be that your Subscription is still under free trail account and under process of getting upgraded to pay-as-you-go model.

    It could be a temporary capacity issue in the region for the VM size you are trying. Try to deploy in another region and try different VM sizes and see if that helps.

    Hope that helps.
    If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.

    198241-image.png


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.