Del via


az stack-hci-vm snapshot

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 snapshot command. Learn more about extensions.

Manage snapshots with stack-hci-vm (applies to multi-rack deployments only).

Commands

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

Create a snapshot from a source disk (applies to multi-rack deployments only).

Extension GA
az stack-hci-vm snapshot delete

Delete a snapshot (applies to multi-rack deployments only).

Extension GA
az stack-hci-vm snapshot list

List all snapshots (applies to multi-rack deployments only).

Extension GA
az stack-hci-vm snapshot show

Get the details of a snapshot (applies to multi-rack deployments only).

Extension GA
az stack-hci-vm snapshot update

Update a snapshot (applies to multi-rack deployments only).

Extension GA

az stack-hci-vm snapshot create

Create a snapshot from a source disk (applies to multi-rack deployments only).

az stack-hci-vm snapshot create --custom-location
                                --name
                                --resource-group
                                [--location]
                                [--polling-interval]
                                [--source-resource-id]
                                [--tags]

Examples

CreateSnapshotFromDisk

az stack-hci-vm snapshot create --resource-group "test-rg" --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" --location "West US2" --name "test-snapshot" --source-resource-id "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"

Required Parameters

--custom-location

The ID of the custom location.

--name

Name of the snapshot.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--location -l

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

--polling-interval

ARM polling interval for long running operations.

--source-resource-id

ARM ID of the source disk to create the snapshot from.

Usage: --source-resource-id "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{diskName}" This is required when creating a snapshot using the Copy create option.

--tags

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az stack-hci-vm snapshot delete

Delete a snapshot (applies to multi-rack deployments only).

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

Examples

DeleteSnapshot

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the snapshot.

Property Value
Parameter group: Resource Id Arguments
--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>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az stack-hci-vm snapshot list

List all snapshots (applies to multi-rack deployments only).

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

Examples

ListSnapshotByResourceGroup

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

ListSnapshotBySubscription

az stack-hci-vm snapshot list

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az stack-hci-vm snapshot show

Get the details of a snapshot (applies to multi-rack deployments only).

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

Examples

GetSnapshot

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the snapshot.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az stack-hci-vm snapshot update

Update a snapshot (applies to multi-rack deployments only).

Update a snapshot resource. Only tags can be updated after snapshot creation.

az stack-hci-vm snapshot update [--add]
                                [--force-string]
                                [--ids]
                                [--name]
                                [--polling-interval]
                                [--remove]
                                [--resource-group]
                                [--set]
                                [--subscription]
                                [--tags]

Examples

UpdateSnapshotTags

az stack-hci-vm snapshot update --resource-group "test-rg" --tags environment="production" backup="daily" --name "test-snapshot"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--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.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the snapshot.

Property Value
Parameter group: Resource Id Arguments
--polling-interval

ARM polling interval for long running operations.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--tags

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False