Share via


az stack-hci-vm image

注意

此參考是 Azure CLI 的 stack-hci-vm 擴充功能的一部分(2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az stack-hci-vm 映射 命令時自動安裝。 深入了解擴充功能。

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

使用 stack-hci-vm 管理映射。

命令

名稱 Description 類型 狀態
az stack-hci-vm image create

建立資源庫映像。

副檔名 實驗
az stack-hci-vm image delete

删除映像。

副檔名 實驗
az stack-hci-vm image list

列出所有資源庫映像。

副檔名 實驗
az stack-hci-vm image show

取得影像的詳細數據。

副檔名 實驗
az stack-hci-vm image update

更新映像。

副檔名 實驗

az stack-hci-vm image create

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立資源庫映像。

az stack-hci-vm image create --custom-location
                             --name
                             --os-type
                             --resource-group
                             [--image-path]
                             [--location]
                             [--offer]
                             [--polling-interval]
                             [--publisher]
                             [--sku]
                             [--storage-path-id]
                             [--tags]
                             [--urn]
                             [--version]

範例

PutGalleryImage

az stack-hci-vm image create --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" --location "West US2" --storage-path-id "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storagecontainers/test-storagepath" --image-path "C:\\test.vhdx" --name "test-gallery-image" --resource-group "test-rg" --os-type "Windows"

必要參數

--custom-location

擴充位置的標識碼。

--name

資源庫映像的名稱。

--os-type

操作系統類型 [Windows, Linux]。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--image-path

資源庫映像應從中建立映像的位置/路徑。

--location -l

如果未指定location,則會使用資源群組的位置。

--offer

Marketplace 映射的供應專案。

使用方式:--offer。

--polling-interval

長時間執行作業的ARM輪詢間隔。

--publisher

Marketplace 映像的發行者。

使用量:--publisher。

--sku

Marketplace 映射的 Sku。

使用量:--sku。

--storage-path-id

用來儲存資源庫映像之 儲存體 路徑的 Azure 識別碼。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--urn

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

--version

Marketplace 映射的版本。(如果傳遞 --urn,則會忽略此狀況。

使用方式:--version。

預設值: latest
全域參數
--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 stack-hci-vm image delete

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

删除映像。

az stack-hci-vm image delete [--ids]
                             [--name]
                             [--polling-interval]
                             [--resource-group]
                             [--subscription]
                             [--yes]

範例

DeleteGalleryImage

az stack-hci-vm image delete --name "test-gallery-image" --resource-group "test-rg"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

資源庫映像的名稱。

--polling-interval

長時間執行作業的ARM輪詢間隔。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

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

--yes -y

不提示確認。

預設值: False
全域參數
--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 stack-hci-vm image list

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出所有資源庫映像。

az stack-hci-vm image list [--resource-group]

範例

ListGalleryImageByResourceGroup

az stack-hci-vm image list --resource-group "test-rg"

ListGalleryImageBySubscription

az stack-hci-vm image list

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

全域參數
--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 stack-hci-vm image show

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得影像的詳細數據。

az stack-hci-vm image show [--ids]
                           [--name]
                           [--resource-group]
                           [--subscription]

範例

GetGalleryImage

az stack-hci-vm image show --name "test-gallery-image" --resource-group "test-rg"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

資源庫映像的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

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

全域參數
--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 stack-hci-vm image update

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新映像。

az stack-hci-vm image update [--ids]
                             [--name]
                             [--polling-interval]
                             [--resource-group]
                             [--subscription]
                             [--tags]

範例

UpdateGalleryImage

az stack-hci-vm image update --tags additionalProperties="sample" --name "test-gallery-image" --resource-group "test-rg"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

資源庫映像的名稱。

--polling-interval

長時間執行作業的ARM輪詢間隔。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

全域參數
--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 來取得完整偵錯記錄。