az vmss disk

Manage data disks of a VMSS.

Commands

az vmss disk attach

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

az vmss disk detach

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

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 {Premium_LRS, StandardSSD_LRS, 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: Premium_LRS, StandardSSD_LRS, 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>.

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