Deploy a Premium SSD v2

Azure Premium SSD v2 is designed for IO-intense enterprise workloads that require sub-millisecond disk latencies and high IOPS and throughput at a low cost. Premium SSD v2 is suited for a broad range of workloads such as SQL server, Oracle, MariaDB, SAP, Cassandra, Mongo DB, big data/analytics, gaming, on virtual machines or stateful containers. For conceptual information on Premium SSD v2, see Premium SSD v2.

Premium SSD v2 support a 4k physical sector size by default, but can be configured to use a 512E sector size as well. While most applications are compatible with 4k sector sizes, some require 512 byte sector sizes. Oracle Database, for example, requires release 12.2 or later in order to support 4k native disks.

Limitations

  • Premium SSD v2 can be used with any premium storage-enabled virtual machine size. Navigate to your desired virtual machines (VMs) size article to determine support for premium storage.
  • Premium SSD v2 disks can't be used as an OS disk.
  • Premium SSD v2 disks can't be used with Azure Compute Gallery.
  • Currently, Premium SSD v2 disks are only available in select regions.
  • Premium SSD v2 disks can only be attached to zonal VMs. When creating a new VM or Virtual Machine Scale Set, specify the availability zone you want before adding Premium SSD v2 disks to your configuration.
  • Currently, Microsoft Azure operated by 21Vianet don't support customer-managed keys for Premium SSD v2 disks.
  • Encryption at host is supported on Premium SSD v2 disks with some limitations. For more information, see Encryption at host.
  • Azure Disk Encryption (guest VM encryption via Bitlocker/DM-Crypt) isn't supported for VMs with Premium SSD v2 disks. We recommend you to use encryption at rest with platform-managed or customer-managed keys, which is supported for Premium SSD v2.
  • Currently, Premium SSD v2 disks can't be attached to VMs in Availability Sets.
  • Azure Site Recovery isn't supported for VMs with Premium SSD v2 disks.
  • The size of a Premium SSD v2 can't be expanded without either deallocating the VM or detaching the disk.
  • Premium SSDv2 doesn't support host caching.

Regional availability

Currently only available in the following regions:

  • China North 3 (Three availability zones)

Prerequisites

Determine region availability programmatically

Since not every region and zone supports Premium SSD v2, you can use the Azure CLI or PowerShell to determine region and zone supportability.

To determine the regions and zones that support Premium SSD v2, replace yourSubscriptionId with your subscription, and then run the az vm list-skus command:

az cloud set -n AzureChinaCloud
az login

subscriptionId="<yourSubscriptionId>"

az account set --subscription $subscriptionId

az vm list-skus --resource-type disks --query "[?name=='PremiumV2_LRS'].{Region:locationInfo[0].location, Zones:locationInfo[0].zones}" 

Now that you know the region and zone to deploy to, follow the deployment steps in this article to create a Premium SSD v2 disk and attach it to a VM.

Use a Premium SSD v2

Create a Premium SSD v2 disk in an availability zone by using the az disk create command. Then create a VM in the same region and availability zone that supports Premium Storage and attach the disk to it by using the az vm create command.

The following script creates a Premium SSD v2 with a 4k sector size, to deploy one with a 512 sector size, update the $logicalSectorSize parameter. Replace the values of all the variables with your own, then run the following script:

## Initialize variables
diskName="yourDiskName"
resourceGroupName="yourResourceGroupName"
region="yourRegionName"
zone="yourZoneNumber"
##Replace 4096 with 512 to deploy a disk with 512 sector size
logicalSectorSize=4096
vmName="yourVMName"
vmImage="Win2016Datacenter"
adminPassword="yourAdminPassword"
adminUserName="yourAdminUserName"
vmSize="Standard_D4s_v3"

## Create a Premium SSD v2 disk
az disk create -n $diskName -g $resourceGroupName \
--size-gb 100 \
--disk-iops-read-write 5000 \
--disk-mbps-read-write 150 \
--location $region \
--zone $zone \
--sku PremiumV2_LRS \
--logical-sector-size $logicalSectorSize

## Create the VM
az vm create -n $vmName -g $resourceGroupName \
--image $vmImage \
--zone $zone \
--authentication-type password --admin-password $adminPassword --admin-username $adminUserName \
--size $vmSize \
--location $region \
--attach-data-disks $diskName

Adjust disk performance

You can adjust the performance of a Premium SSD v2 disk four times within a 24 hour period. Creating a disk counts as one of these times, so for the first 24 hours after creating a premium SSD v2 disk you can only adjust its performance up to three times.

For conceptual information on adjusting disk performance, see Premium SSD v2 performance.

Use the az disk update command to change the performance configuration of your Premium SSD v2 disk. For example, you can use the disk-iops-read-write parameter to adjust the max IOPS limit, and the disk-mbps-read-write parameter to adjust the max throughput limit of your Premium SSD v2 disk.

The following command adjusts the performance of your disk. Update the values in the command, and then run it:

az disk update --subscription $subscription --resource-group $rgname --name $diskName --disk-iops-read-write=5000 --disk-mbps-read-write=200

Next steps

Add a data disk by using either the Azure portal, Azure CLI, or PowerShell.

Provide feedback on Premium SSD v2.