Fetching image offer, publisher and sku details from managed image

Varma 1,275 Reputation points
2024-02-08T05:59:23.8533333+00:00

I have created the managed image from existing custom image from compute gallery

I want to following details of managed image

  1. image_offer
  2. image_publisher
  3. Image_sku

and also please let me know how to fetch following details as well

os_type

vm_size
os_disk_size_gb is there any to achive it? if yes please share command or suggest GUI steps

thank you

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

2 answers

Sort by: Most helpful
  1. Prrudram-MSFT 23,211 Reputation points
    2024-02-09T09:26:26.28+00:00

    Hi @Varma

    Thank you for reaching out to the Microsoft Q&A platform.

    az image show works with managed custom images.

    az image show --resource-group <resource-group-name> --name <image-name> --query "{offer:offer, publisher: publisher, sku:sku}"

    If you are looking at Platform Image Repository (PIR) or Market Place images, you should go with different commands

    1. run: az vm show --resource-group rg --name myVM --query "storageProfile.imageReference" -otsv (this should dump out the image information like publisher, offer, sku, etc)
    2. If you need further information, you can run a few more, e.g. :
      a. az vm image list --all --publisher Canonical --offer UbuntuServer --sku 16.04-LTS -otable
      b. az vm image show --urn Canonical:UbuntuServer:16.04-LTS:16.04.201807240

    Hope this helps!

    Please Accept Answer and hit Yes for "was this answer helpful" if this helps


  2. Prrudram-MSFT 23,211 Reputation points
    2024-02-23T05:52:21.7+00:00

    Hi @Varma

    To get the name of an Azure Compute Gallery image, you can use the Azure portal or the Azure CLI.

    Using the Azure portal:

    1. Navigate to the Azure Compute Gallery that contains the image that you want to get the name of.
    2. Select the image that you want to get the name of from the list of Image definitions available.
    3. The name of the image should be displayed in the overview section of the image details page.
    0 comments No comments