az vm image
可用虛擬機映像的相關信息。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az vm image accept-terms |
接受 Azure Marketplace 字詞,讓映像可用來建立 VM。 |
Core | Deprecated |
| az vm image list |
列出 Azure Marketplace 中可用的 VM/VMSS 映像。 |
Core | GA |
| az vm image list-offers |
列出 Azure Marketplace 中可用的 VM 映射供應專案。 |
Core | GA |
| az vm image list-publishers |
列出 Azure Marketplace 中可用的 VM 映像發行者。 |
Core | GA |
| az vm image list-skus |
列出 Azure Marketplace 中可用的 VM 映射 SKU。 |
Core | GA |
| az vm image show |
取得 Azure Marketplace 中可用 VM 映像的詳細數據。 |
Core | GA |
| az vm image terms |
管理 Azure Marketplace 映像條款。 |
Core | GA |
| az vm image terms accept |
接受 Azure Marketplace 映像條款,讓映像可用來建立 VM。 |
Core | GA |
| az vm image terms cancel |
取消 Azure Marketplace 映像條款。 |
Core | GA |
| az vm image terms show |
取得 Azure Marketplace 映像字詞的詳細數據。 |
Core | 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。 (autogenerated)
az vm image accept-terms --urn publisher:offer:sku:version
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
映射供應專案。
映像計費方案。
映像發行者。
URN,格式為 'publisher:offer:sku:version' 或 'publisher:offer:sku:edge_zone:version'。 如果指定,可以省略其他自變數值。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
從即時 Azure 服務擷取映像清單,而不是使用離線映像清單。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
架構的名稱。
| 屬性 | 值 |
|---|---|
| 接受的值: | Arm64, x64 |
邊緣區域的名稱。
Location. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
映射供應項目名稱,部分名稱已接受。
映像發行者名稱,部分名稱已接受。
映射 SKU 名稱,部分名稱已接受。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
映像發行者。
| 屬性 | 值 |
|---|---|
| 值來源: | az vm image list-publishers |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
邊緣區域的名稱。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
邊緣區域的名稱。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
映射供應專案。
映像發行者。
| 屬性 | 值 |
|---|---|
| 值來源: | az vm image list-publishers |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
邊緣區域的名稱。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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 映像的詳細數據。 (autogenerated)
az vm image show --location westus --urn publisher:offer:sku:version
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
邊緣區域的名稱。
Location. 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。
映射供應專案。
映像發行者。
映像 SKU。
URN,格式為 'publisher:offer:sku:version' 或 'publisher:offer:sku:edge_zone:version'。 如果指定,可以省略其他自變數值。
映像 SKU 的版本。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |