az vm image

可用虛擬機器映射的相關資訊。

命令

名稱 Description 類型 狀態
az vm image accept-terms

接受 Azure Marketplace 字詞,讓映射可用來建立 VM。

核心 已取代
az vm image list

列出 Azure Marketplace 中可用的 VM/VMSS 映射。

核心 GA
az vm image list-offers

列出 Azure Marketplace 中可用的 VM 映射供應專案。

核心 GA
az vm image list-publishers

列出 Azure Marketplace 中可用的 VM 映射發行者。

核心 GA
az vm image list-skus

列出 Azure Marketplace 中可用的 VM 映射 SKU。

核心 GA
az vm image show

取得 Azure Marketplace 中可用 VM 映射的詳細資料。

核心 GA
az vm image terms

管理 Azure Marketplace 映射條款。

核心 GA
az vm image terms accept

接受 Azure Marketplace 映射條款,讓映射可用來建立 VM。

核心 GA
az vm image terms cancel

取消 Azure Marketplace 映射條款。

核心 GA
az vm image terms show

取得 Azure Marketplace 映射字詞的詳細資料。

核心 GA

az vm image accept-terms

已被取代

此命令已被取代,並將在 '3.0.0' 版中移除。 請改用 'az vm image terms accept'。

接受 Azure Marketplace 字詞,讓映射可用來建立 VM。

az vm image accept-terms [--offer]
                         [--plan]
                         [--publisher]
                         [--urn]

範例

接受 Azure Marketplace 字詞,讓映射可用來建立 VM。 (自動產生)

az vm image accept-terms --urn publisher:offer:sku:version

選擇性參數

--offer -f

映射供應專案。

--plan

映射計費方案。

--publisher -p

映射發行者。

--urn

URN,格式為 'publisher:offer:sku:version' 或 'publisher:offer:sku:edge_zone:version'。 如果指定,可以省略其他引數值。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm image list

列出 Azure Marketplace 中可用的 VM/VMSS 映射。

az vm image list [--all]
                 [--architecture {Arm64, x64}]
                 [--edge-zone]
                 [--location]
                 [--offer]
                 [--publisher]
                 [--sku]

範例

列出所有可用的映射。

az vm image list --all

列出所有離線快取的 CentOS 映射。

az vm image list -f CentOS

列出所有 CentOS 映射。

az vm image list -f CentOS --all

選擇性參數

--all

從即時 Azure 服務擷取映射清單,而不是使用離線映射清單。

預設值: False
--architecture

架構的名稱。

接受的值: Arm64, x64
--edge-zone

邊緣區域的名稱。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--offer -f

映射供應專案名稱,部分名稱已接受。

--publisher -p

映射發行者名稱,部分名稱已接受。

--sku -s

映射 SKU 名稱,部分名稱已接受。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm image list-offers

列出 Azure Marketplace 中可用的 VM 映射供應專案。

az vm image list-offers --location
                        --publisher
                        [--edge-zone]

範例

列出來自美國西部地區 Microsoft 的所有供應專案。

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

列出美國西部地區 OpenLocic 的所有供應專案。

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

必要參數

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--publisher -p

映射發行者。

值來自: az vm image list-publishers

選擇性參數

--edge-zone

邊緣區域的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm image list-publishers

列出 Azure Marketplace 中可用的 VM 映射發行者。

az vm image list-publishers --location
                            [--edge-zone]

範例

列出美國西部區域的所有發行者。

az vm image list-publishers -l westus

列出所有以 westus 開頭為 「Open」 名稱的發行者。

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

必要參數

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

選擇性參數

--edge-zone

邊緣區域的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm image list-skus

列出 Azure Marketplace 中可用的 VM 映射 SKU。

az vm image list-skus --location
                      --offer
                      --publisher
                      [--edge-zone]

範例

列出美國西部地區 OpenLogic 發行之 CentOS 可用的所有 SKU。

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

必要參數

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--offer -f

映射供應專案。

--publisher -p

映射發行者。

值來自: az vm image list-publishers

選擇性參數

--edge-zone

邊緣區域的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm image show

取得 Azure Marketplace 中可用 VM 映射的詳細資料。

az vm image show [--edge-zone]
                 [--location]
                 [--offer]
                 [--publisher]
                 [--sku]
                 [--urn]
                 [--version]

範例

顯示 OpenLogic 中最新可用 CentOS 映射的資訊。

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}

取得 Azure Marketplace 中可用 VM 映射的詳細資料。 (自動產生)

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

選擇性參數

--edge-zone

邊緣區域的名稱。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--offer -f

映射供應專案。

--publisher -p

映射發行者。

--sku -s

映射 SKU。

--urn

URN,格式為 'publisher:offer:sku:version' 或 'publisher:offer:sku:edge_zone:version'。 如果指定,可以省略其他引數值。

--version

映射 SKU 的版本。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。