az vm image

Information on available virtual machine images.

Commands

az vm image list

List the VM/VMSS images available in the Azure Marketplace.

az vm image list-offers

List the VM image offers available in the Azure Marketplace.

az vm image list-publishers

List the VM image publishers available in the Azure Marketplace.

az vm image list-skus

List the VM image SKUs available in the Azure Marketplace.

az vm image show

Get the details for a VM image available in the Azure Marketplace.

az vm image terms

Manage Azure Marketplace image terms.

az vm image terms accept

Accept Azure Marketplace image terms so that the image can be used to create VMs.

az vm image terms cancel

Cancel Azure Marketplace image terms.

az vm image terms show

Get the details of Azure Marketplace image terms.

az vm image list

List the VM/VMSS images available in the Azure Marketplace.

az vm image list [--all]
                 [--location]
                 [--offer]
                 [--publisher]
                 [--query-examples]
                 [--sku]
                 [--subscription]

Examples

List all available images.

az vm image list --all

List all offline cached CentOS images.

az vm image list -f CentOS

List all CentOS images.

az vm image list -f CentOS --all

Optional Parameters

--all

Retrieve image list from live Azure service rather using an offline image list.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--offer -f

Image offer name, partial name is accepted.

--publisher -p

Image publisher name, partial name is accepted.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--sku -s

Image sku name, partial name is accepted.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az vm image list-offers

List the VM image offers available in the Azure Marketplace.

az vm image list-offers --location
                        --publisher
                        [--subscription]

Examples

List all offers from Microsoft in the West US region.

az vm image list-offers -l westus -p MicrosoftWindowsServer

List all offers from OpenLocic in the West US region.

az vm image list-offers -l westus -p OpenLogic

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--publisher -p

A valid image publisher.

value from: az vm image list-publishers

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az vm image list-publishers

List the VM image publishers available in the Azure Marketplace.

az vm image list-publishers --location
                            [--subscription]

Examples

List all publishers in the West US region.

az vm image list-publishers -l westus

List all publishers with names starting with "Open" in westus.

az vm image list-publishers -l westus --query "[?starts_with(name, 'Open')]"

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az vm image list-skus

List the VM image SKUs available in the Azure Marketplace.

az vm image list-skus --location
                      --offer
                      --publisher
                      [--subscription]

Examples

List all skus available for CentOS published by OpenLogic in the West US region.

az vm image list-skus -l westus -f CentOS -p OpenLogic

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--offer -f

Image offer.

--publisher -p

A valid image publisher.

value from: az vm image list-publishers

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az vm image show

Get the details for a VM image available in the Azure Marketplace.

az vm image show [--location]
                 [--offer]
                 [--publisher]
                 [--query-examples]
                 [--sku]
                 [--subscription]
                 [--urn]
                 [--version]

Examples

Show information for the latest available CentOS image from OpenLogic.

latest=$(az vm image list -p OpenLogic -s 7.3 --all --query \
    "[?offer=='CentOS'].version" -o tsv | sort -u | tail -n 1)
az vm image show -l westus -f CentOS -p OpenLogic --sku 7.3 --version {latest}

Get the details for a VM image available in the Azure Marketplace. (autogenerated)

az vm image show --location westus --urn publisher:offer:sku:version

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--offer -f

Image offer.

--publisher -p

Image publisher.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--sku -s

Image sku.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--urn

URN, in format of 'publisher:offer:sku:version'. If specified, other argument values can be omitted.

--version

Image sku's version.