Share via


az vmss disk

Manage data disks of a VMSS.

Commands

Name Description Type Status
az vmss disk attach

Attach managed data disks to a scale set or its instances.

Core GA
az vmss disk detach

Detach managed data disks from a scale set or its instances.

Core GA

az vmss disk attach

Attach managed data disks to a scale set or its instances.

az vmss disk attach [--caching {None, ReadOnly, ReadWrite}]
                    [--disk]
                    [--ids]
                    [--instance-id]
                    [--lun]
                    [--resource-group]
                    [--size-gb]
                    [--sku {PremiumV2_LRS, Premium_LRS, Premium_ZRS, StandardSSD_LRS, StandardSSD_ZRS, Standard_LRS, UltraSSD_LRS}]
                    [--subscription]
                    [--vmss-name]

Examples

Attach managed data disks to a scale set or its instances. (autogenerated)

az vmss disk attach --disk {disk} --instance-id 0 --resource-group MyResourceGroup

Attach managed data disks of a given size to a scale set or its instances. (autogenerated)

az vmss disk attach --vmss-name MyVmss --resource-group MyResourceGroup --size-gb 50

Optional Parameters

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

--caching

Disk caching policy.

Property Value
Accepted values: None, ReadOnly, ReadWrite
--disk

Existing disk name or ID to attach or detach from VM instances.

--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
--instance-id

Scale set VM instance id.

Property Value
Parameter group: Resource Id Arguments
--lun

0-based logical unit number (LUN). Max value depends on the Virtual Machine instance size.

--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
--size-gb -z

Size in GB. Max size: 4095 GB (certain preview disks can be larger).

--sku

Underlying storage SKU.

Property Value
Accepted values: PremiumV2_LRS, Premium_LRS, Premium_ZRS, StandardSSD_LRS, StandardSSD_ZRS, Standard_LRS, UltraSSD_LRS
--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
--vmss-name

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

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 vmss disk detach

Detach managed data disks from a scale set or its instances.

az vmss disk detach --lun
                    [--ids]
                    [--instance-id]
                    [--resource-group]
                    [--subscription]
                    [--vmss-name]

Examples

Detach managed data disks from a scale set or its instances. (autogenerated)

az vmss disk detach --instance-id 0 --lun {lun} --resource-group MyResourceGroup

Required Parameters

--lun

0-based logical unit number (LUN). Max value depends on the Virtual Machine instance size.

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
--instance-id

Scale set VM instance id.

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
--vmss-name

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

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