שתף באמצעות


az stack-hci-vm image

Note

This reference is part of the stack-hci-vm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stack-hci-vm image command. Learn more about extensions.

Manage images with stack-hci-vm.

Commands

Name Description Type Status
az stack-hci-vm image create

Create a gallery image.

Extension GA
az stack-hci-vm image delete

Delete an image.

Extension GA
az stack-hci-vm image list

List all gallery images.

Extension GA
az stack-hci-vm image show

Get the details of an image.

Extension GA
az stack-hci-vm image update

Update an image.

Extension GA

az stack-hci-vm image create

Create a gallery image.

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

Examples

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"

Required Parameters

--custom-location

The ID of the extended location.

--name

Name of the gallery image.

--os-type

OS Type [Windows, Linux].

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--image-path

Location/Path of the image the gallery image should be created from.

--imagerepo-password

Password for accessing acr image repository.

--imagerepo-username

Username for accessing acr image repository.

--location -l

If location is not specified, the location of the resource group is used.

--offer

Offer for Marketplace image.

Usage: --offer.

--polling-interval

ARM polling interval for long running operations.

--publisher

Publisher for Marketplace image.

Usage: --publisher.

--sku

Sku for Marketplace image.

Usage: --sku.

--source-vm

Name of the source vm whose os disk the gallery image should be created from.

--storage-path-id

Azure ID of the Storage Path which is used to store the Gallery Images.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--urn

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

--version

Version for Marketplace image.(This will be ignored if --urn is passed).

Usage: --version.

Default value: latest
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack-hci-vm image delete

Delete an image.

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

Examples

DeleteGalleryImage

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name

Name of the gallery image.

--polling-interval

ARM polling interval for long running operations.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack-hci-vm image list

List all gallery images.

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

Examples

ListGalleryImageByResourceGroup

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

ListGalleryImageBySubscription

az stack-hci-vm image list

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack-hci-vm image show

Get the details of an image.

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

Examples

GetGalleryImage

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name

Name of the gallery image.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack-hci-vm image update

Update an image.

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

Examples

UpdateGalleryImage

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

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name

Name of the gallery image.

--polling-interval

ARM polling interval for long running operations.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.