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

--caching

Disk caching policy.

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.

--instance-id

Scale set VM instance id.

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

--size-gb -z

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

--sku

Underlying storage SKU.

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.

--vmss-name

Scale set name. You can configure the default using az configure --defaults vmss=<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 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

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

--instance-id

Scale set VM instance id.

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

--vmss-name

Scale set name. You can configure the default using az configure --defaults vmss=<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.