Tried to create a vm with visual studio but end up with below error.

Shiva Kumar Venna(UST,IN) 0 Reputation points
2023-02-05T03:03:41.0066667+00:00

{"code":"InvalidTemplateDeployment","message":"The template deployment 'CreateVm-microsoftvisualstudio.visualstudio2022-v-20230205082101' is not valid according to the validation procedure. The tracking id is 'b18dedfa-0ebd-4d96-8744-95740b8760eb'. See inner errors for details.","details":[{"code":"InvalidParameter","target":"imageReference","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: vs-2022-ent-latest-win11-n-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images."}]}

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,158 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luke Murray 10,526 Reputation points MVP
    2023-02-05T06:47:27.75+00:00

    Hi, Shiva

    The SKU and template, needs to match the proper publisher and image definition:

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage

    The image reference may not be accurate anymore, so check using PowerShell the right images.

    0 comments No comments