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.
Disk caching policy.
Property | Value |
---|---|
Accepted values: | None, ReadOnly, ReadWrite |
Existing disk name or ID to attach or detach from VM instances.
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 |
Scale set VM instance id.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
0-based logical unit number (LUN). Max value depends on the Virtual Machine instance size.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Size in GB. Max size: 4095 GB (certain preview disks can be larger).
Underlying storage SKU.
Property | Value |
---|---|
Accepted values: | PremiumV2_LRS, Premium_LRS, Premium_ZRS, StandardSSD_LRS, StandardSSD_ZRS, Standard_LRS, UltraSSD_LRS |
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 |
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
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
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.
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 |
Scale set VM instance id.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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 |
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |