Change your performance tier without downtime using the Azure PowerShell module or the Azure CLI

Applies to: ✔️ Linux VMs ✔️ Windows VMs ✔️ Flexible scale sets ✔️ Uniform scale sets

The performance of your Azure managed disk is set when you create your disk, in the form of its performance tier. The performance tier determines the IOPS and throughput your managed disk has. When you set the provisioned size of your disk, a performance tier is automatically selected. The performance tier can be changed at deployment or afterwards, without changing the size of the disk. To learn more about performance tiers, see Performance tiers for managed disks.

Restrictions

  • This feature is currently supported only for premium SSDs.
  • The P60, P70, and P80 performance tiers can only be used by disks that are larger than 4,096 GiB.
  • A disk's performance tier can be downgraded only once every 12 hours.

Prerequisites

Install the latest Azure CLI and sign in to an Azure account with az login.

Create an empty data disk with a tier higher than the baseline tier

subscriptionId=<yourSubscriptionIDHere>
resourceGroupName=<yourResourceGroupNameHere>
diskName=<yourDiskNameHere>
diskSize=<yourDiskSizeHere>
performanceTier=<yourDesiredPerformanceTier>
region=westcentralus

az account set --subscription $subscriptionId

az disk create -n $diskName -g $resourceGroupName -l $region --sku Premium_LRS --size-gb $diskSize --tier $performanceTier

Create an OS disk with a tier higher than the baseline tier from an Azure Marketplace image

resourceGroupName=<yourResourceGroupNameHere>
diskName=<yourDiskNameHere>
performanceTier=<yourDesiredPerformanceTier>
region=westcentralus
image=Canonical:UbuntuServer:18.04-LTS:18.04.202002180

az disk create -n $diskName -g $resourceGroupName -l $region --image-reference $image --sku Premium_LRS --tier $performanceTier

Update the tier of a disk without downtime

  1. You must enable the feature for your subscription before you can change the performance tier of a disk without downtime. The following steps will enable the feature on your subscription:

    1. Execute the following command to register the feature for your subscription

      az feature register --namespace Microsoft.Compute --name LiveTierChange
      
    2. Confirm that the registration state is Registered (may take a few minutes) using the following command before trying out the feature.

      az feature show --namespace Microsoft.Compute --name LiveTierChange
      
  2. Update the tier of a disk even when it is attached to a running VM

    resourceGroupName=<yourResourceGroupNameHere>
    diskName=<yourDiskNameHere>
    performanceTier=<yourDesiredPerformanceTier>
    
    az disk update -n $diskName -g $resourceGroupName --set tier=$performanceTier
    

Show the tier of a disk

az disk show -n $diskName -g $resourceGroupName --query [tier] -o tsv

Next steps

If you need to resize a disk to take advantage of the higher performance tiers, see these articles: