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 list

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

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

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. 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.
--sku -s
Image sku name, partial name is accepted.

az vm image list-offers

List the VM image offers available in the Azure Marketplace.

az vm image list-offers --location
--publisher

Examples

List all offers from Microsoft in the West US region.

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

List all offers from OpenLocic in the West US region.

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

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--publisher -p
A valid image publisher.

az vm image list-publishers

List the VM image publishers available in the Azure Marketplace.

az vm image list-publishers --location

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. You can configure the default location using `az configure --defaults location=<location>`.

az vm image list-skus

List the VM image SKUs available in the Azure Marketplace.

az vm image list-skus --location
--offer
--publisher

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. You can configure the default location using `az configure --defaults location=<location>`.
--offer -f
A valid image publisher offer.
--publisher -p
A valid image publisher.

az vm image show

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

az vm image show --location
--offer
--publisher
--sku
--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 --s 7.3 --version ${latest}

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--offer -f
A valid image publisher offer.
--publisher -p
A valid image publisher.
--sku -s
A valid image SKU.
--version
A valid image SKU version.