|
| 1 | +--- |
| 2 | +title: Deploy a Premium SSD v2 (preview) managed disk |
| 3 | +description: Learn how to deploy a Premium SSD v2 (preview). |
| 4 | +author: roygara |
| 5 | +ms.author: rogarana |
| 6 | +ms.date: 07/18/2022 |
| 7 | +ms.topic: how-to |
| 8 | +ms.service: storage |
| 9 | +ms.subservice: disks |
| 10 | +ms.custom: references_regions |
| 11 | +--- |
| 12 | + |
| 13 | +# Deploy a Premium SSD v2 (preview) |
| 14 | + |
| 15 | +Azure Premium SSD v2 (preview) 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 (preview)](disks-types.md#premium-ssd-v2-preview). |
| 16 | + |
| 17 | +## Limitations |
| 18 | + |
| 19 | +[!INCLUDE [disks-prem-v2-limitations](../../includes/disks-prem-v2-limitations.md)] |
| 20 | + |
| 21 | +### Regional availability |
| 22 | + |
| 23 | +[!INCLUDE [disks-premv2-regions](../../includes/disks-premv2-regions.md)] |
| 24 | + |
| 25 | +## Prerequisites |
| 26 | + |
| 27 | +- [Sign-up](https://aka.ms/PremiumSSDv2PreviewForm) for the public preview. |
| 28 | +- Install either the latest [Azure CLI](/cli/azure/install-azure-cli) or the latest [Azure PowerShell module](/powershell/azure/install-az-ps). |
| 29 | + |
| 30 | +## Determine region availability programmatically |
| 31 | + |
| 32 | +To use a Premium SSD v2, you need to determine the regions and zones where it's supported. Not every region and zones support Premium SSD v2. To determine regions, and zones support premium SSD v2, replace `yourSubscriptionId` then run the following command: |
| 33 | + |
| 34 | +# [Azure CLI](#tab/azure-cli) |
| 35 | + |
| 36 | +```azurecli |
| 37 | +az login |
| 38 | +
|
| 39 | +subscriptionId="<yourSubscriptionId>" |
| 40 | +
|
| 41 | +az account set --subscription $subscriptionId |
| 42 | +
|
| 43 | +az vm list-skus --resource-type disks --query "[?name=='PremiumV2_LRS'].{Region:locationInfo[0].location, Zones:locationInfo[0].zones}" |
| 44 | +``` |
| 45 | + |
| 46 | +# [PowerShell](#tab/azure-powershell) |
| 47 | + |
| 48 | +```powershell |
| 49 | +Connect-AzAccount |
| 50 | +
|
| 51 | +$subscriptionId="yourSubscriptionId" |
| 52 | +
|
| 53 | +Set-AzContext -Subscription $subscriptionId |
| 54 | +
|
| 55 | +Get-AzComputeResourceSku | where {$_.ResourceType -eq 'disks' -and $_.Name -eq 'Premiumv2_LRS'} |
| 56 | +``` |
| 57 | + |
| 58 | +# [Azure portal](#tab/portal) |
| 59 | + |
| 60 | +To programmatically determine the regions and zones you can deploy to, use either the Azure CLI or Azure PowerShell Module. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +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. |
| 65 | + |
| 66 | +## Use a Premium SSD v2 |
| 67 | + |
| 68 | +# [Azure CLI](#tab/azure-cli) |
| 69 | + |
| 70 | +Create a Premium SSD v2 disk in an availability zone. Then create a VM in the same region and availability zone that supports Premium Storage and attach the disk to it. Replace the values of all the variables with your own, then run the following script: |
| 71 | + |
| 72 | +```azurecli-interactive |
| 73 | +## Initialize variables |
| 74 | +diskName="yourDiskName" |
| 75 | +resourceGroupName="yourResourceGroupName" |
| 76 | +region="yourRegionName" |
| 77 | +zone="yourZoneNumber" |
| 78 | +logicalSectorSize=4096 |
| 79 | +vmName="yourVMName" |
| 80 | +vmImage="Win2016Datacenter" |
| 81 | +adminPassword="yourAdminPassword" |
| 82 | +adminUserName="yourAdminUserName" |
| 83 | +vmSize="Standard_D4s_v3" |
| 84 | +
|
| 85 | +## Create a Premium SSD v2 disk |
| 86 | +az disk create -n $diskName -g $resourceGroupName \ |
| 87 | +--size-gb 100 \ |
| 88 | +--disk-iops-read-write 5000 \ |
| 89 | +--disk-mbps-read-write 150 \ |
| 90 | +--location $region \ |
| 91 | +--zone $zone \ |
| 92 | +--sku PremiumV2_LRS \ |
| 93 | +--logical-sector-size $logicalSectorSize |
| 94 | +
|
| 95 | +## Create the VM |
| 96 | +az vm create -n $vmName -g $resourceGroupName \ |
| 97 | +--image $vmImage \ |
| 98 | +--zone $zone \ |
| 99 | +--authentication-type password --admin-password $adminPassword --admin-username $adminUserName \ |
| 100 | +--size $vmSize \ |
| 101 | +--location $region \ |
| 102 | +--attach-data-disks $diskName |
| 103 | +``` |
| 104 | + |
| 105 | +# [PowerShell](#tab/azure-powershell) |
| 106 | + |
| 107 | +Create a Premium SSD v2 disk in an availability zone. Then create a VM in the same region and availability zone that supports Premium Storage and attach the disk to it. Replace the values of all the variables with your own, then run the following script: |
| 108 | + |
| 109 | +```powershell |
| 110 | +# Initialize variables |
| 111 | +$resourceGroupName = "yourResourceGroupName" |
| 112 | +$region = "useast" |
| 113 | +$zone = "yourZoneNumber" |
| 114 | +$diskName = "yourDiskName" |
| 115 | +$diskSizeInGiB = 100 |
| 116 | +$diskIOPS = 5000 |
| 117 | +$diskThroughputInMBPS = 150 |
| 118 | +$logicalSectorSize=4096 |
| 119 | +$lun = 1 |
| 120 | +$vmName = "yourVMName" |
| 121 | +$vmImage = "Win2016Datacenter" |
| 122 | +$vmSize = "Standard_D4s_v3" |
| 123 | +$vmAdminUser = "yourAdminUserName" |
| 124 | +$vmAdminPassword = ConvertTo-SecureString "yourAdminUserPassword" -AsPlainText -Force |
| 125 | +$credential = New-Object System.Management.Automation.PSCredential ($vmAdminUser, $vmAdminPassword); |
| 126 | +
|
| 127 | +# Create a Premium SSD v2 |
| 128 | +$diskconfig = New-AzDiskConfig ` |
| 129 | +-Location $region ` |
| 130 | +-Zone $zone ` |
| 131 | +-DiskSizeGB $diskSizeInGiB ` |
| 132 | +-DiskIOPSReadWrite $diskIOPS ` |
| 133 | +-DiskMBpsReadWrite $diskThroughputInMBPS ` |
| 134 | +-AccountType PremiumV2_LRS ` |
| 135 | +-LogicalSectorSize $logicalSectorSize ` |
| 136 | +-CreateOption Empty |
| 137 | +
|
| 138 | +New-AzDisk ` |
| 139 | +-ResourceGroupName $resourceGroupName ` |
| 140 | +-DiskName $diskName ` |
| 141 | +-Disk $diskconfig |
| 142 | +
|
| 143 | +# Create the VM |
| 144 | +New-AzVm ` |
| 145 | + -ResourceGroupName $resourceGroupName ` |
| 146 | + -Name $vmName ` |
| 147 | + -Location $region ` |
| 148 | + -Zone $zone ` |
| 149 | + -Image $vmImage ` |
| 150 | + -Size $vmSize ` |
| 151 | + -Credential $credential |
| 152 | +
|
| 153 | +# Attach the disk to the VM |
| 154 | +$vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName |
| 155 | +$disk = Get-AzDisk -ResourceGroupName $resourceGroupName -Name $diskName |
| 156 | +$vm = Add-AzVMDataDisk -VM $vm -Name $diskName -CreateOption Attach -ManagedDiskId $disk.Id -Lun $lun |
| 157 | +Update-AzVM -VM $vm -ResourceGroupName $resourceGroupName |
| 158 | +``` |
| 159 | + |
| 160 | +# [Azure portal](#tab/portal) |
| 161 | + |
| 162 | +1. Sign in to the [Azure portal](https://portal.azure.com/). |
| 163 | +1. Navigate to **Virtual machines** and follow the normal VM creation process. |
| 164 | +1. On the **Basics** page, select a [supported region](#regional-availability) and set **Availability options** to **Availability zone**. |
| 165 | +1. Select one of the zones. |
| 166 | +1. Fill in the rest of the values on the page as you like. |
| 167 | + |
| 168 | + :::image type="content" source="media/disks-deploy-premium-v2/premv2-portal-deploy.png" alt-text="Screenshot of the basics page, region and availability options and zones highlighted." lightbox="media/disks-deploy-premium-v2/premv2-portal-deploy.png"::: |
| 169 | + |
| 170 | +1. Proceed to the **Disks** page. |
| 171 | +1. Under **Data disks** select **Create and attach a new disk**. |
| 172 | + |
| 173 | + :::image type="content" source="media/disks-deploy-premium-v2/premv2-create-data-disk.png" alt-text="Screenshot highlighting create and attach a new disk on the disk page." lightbox="media/disks-deploy-premium-v2/premv2-create-data-disk.png"::: |
| 174 | + |
| 175 | +1. Select the **Disk SKU** and select **Premium SSD v2 (Preview)**. |
| 176 | + |
| 177 | + :::image type="content" source="media/disks-deploy-premium-v2/premv2-select.png" alt-text="Screenshot selecting Premium SSD v2 (preview) SKU." lightbox="media/disks-deploy-premium-v2/premv2-select.png"::: |
| 178 | + |
| 179 | +1. Proceed through the rest of the VM deployment, making any choices that you desire. |
| 180 | + |
| 181 | +You've now deployed a VM with a premium SSD v2. |
| 182 | + |
| 183 | +--- |
| 184 | + |
| 185 | +## Adjust disk performance |
| 186 | + |
| 187 | +Unlike other managed disks, the performance of a Premium SSD v2 can be configured independently of its size. For conceptual information on this, see [Premium SSD v2 performance](disks-types.md#premium-ssd-v2-performance). |
| 188 | + |
| 189 | +# [Azure CLI](#tab/azure-cli) |
| 190 | + |
| 191 | +The following command changes the performance of your disk, update the values as you like, then run the command: |
| 192 | + |
| 193 | +```azurecli |
| 194 | +az disk update ` |
| 195 | +--subscription $subscription ` |
| 196 | +--resource-group $rgname ` |
| 197 | +--name $diskName ` |
| 198 | +--set diskIopsReadWrite=5000 ` |
| 199 | +--set diskMbpsReadWrite=200 |
| 200 | +``` |
| 201 | + |
| 202 | +# [PowerShell](#tab/azure-powershell) |
| 203 | + |
| 204 | +The following command changes the performance of your disk, update the values as you like, then run the command: |
| 205 | + |
| 206 | +```azurepowershell |
| 207 | +$diskupdateconfig = New-AzDiskUpdateConfig -DiskMBpsReadWrite 2000 |
| 208 | +Update-AzDisk -ResourceGroupName $resourceGroup -DiskName $diskName -DiskUpdate $diskupdateconfig |
| 209 | +``` |
| 210 | + |
| 211 | +# [Azure portal](#tab/portal) |
| 212 | + |
| 213 | +1. Navigate to your disk and select **Size + Performance**. |
| 214 | +1. Change the values to your desire. |
| 215 | +1. Select **Resize**. |
| 216 | + |
| 217 | + :::image type="content" source="media/disks-deploy-premium-v2/premv2-performance.png" alt-text="Screenshot showing the Size+performance page of a premium v2 SSD." lightbox="media/disks-deploy-premium-v2/premv2-performance.png"::: |
| 218 | + |
| 219 | +--- |
| 220 | + |
| 221 | +## Next steps |
0 commit comments