I would like to recreate my azure portal vm configuration to create the same thing with az cli. Is there a way to do that?

cloud D 20 Reputation points
2025-04-14T15:17:38.3833333+00:00

Specifically I am having trouble with the image. On the portal I see "Image: Ubuntu Server 24.04 LTS (Confidential VM) - Gen2" . On the cli I tried "Canonical:0001-com-ubuntu-confidential-vm-noble:24_04-lts-cvm:latest" but the image was not found. Even though on the portal it works.

Any ideas.

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

1 answer

Sort by: Most helpful
  1. Divyesh Govaerdhanan 2,955 Reputation points
    2025-04-14T22:42:50.4866667+00:00

    Hello,

    Welcome to Microsoft Q&A,

    The issue is that the New images are published to the Azure Marketplace and show up in the Portal UI first, but CLI tooling (and even some regions) may not immediately support them until metadata syncs across all services.

    You can use the PowerShell command below to find out if the image is available from the CLI

    az vm image list \
      --publisher Canonical \
      --offer 0001-com-ubuntu-confidential-vm-noble \
      --all \
      --output table
    
    
    

    For a broad search, remove the offer in the above command and see the available images from the publisher.

    Please Upvote and accept the answer if it helps!!

    1 person found this answer helpful.

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.