Upgrade your Standard MD VM to Premium MD VM and Resize
Blogs 0 CommentsBefore upgrading your Manged disk VM to Premium Storage, please check that the VM supports ‘Premium Storage’! If your VM Size does not support Premium storage please update it accordingly.
You can upgrade to Premium MD VM or Resize via the Azure Portal or Powershell. of course it will also be possible via Azure CLI, but I will show you only these two.
Keep in mind:
- That you can always switch between Standard or Premium Storage (LRS) as long as your VM size supports it (Premium Support)
- That you can only extend a disk! you cannot shrink them!
Azure Portal:
First: Stop your VM (Deallocated) and browse to ‘Disks’ and open the details for the disk you want to upgrade/resize.
On ‘Account Type’ you can switch between Standard and Premium Storage. At ‘Size (GB)’ you can increase the disk size (you cannot decrease).
Keep in mind that you do need to extend the disk in Windows Disk Management after you have resized the disk.
PowerShell:
Upgrade your MD VM disk to Premium MD VM disk in Powershell:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#Check current MD disk: Get-AzureRmDisk -ResourceGroupName "RG-VM01" | ft ResourceGroupName,AccountType,Name,DiskSizeGB ResourceGroupName AccountType Name DiskSizeGB ----------------- ----------- ---- ---------- RG-VM01 StandardLRS WindowsVM01 128 #Stop VM: Stop-AzureRmVM -Name WindowsVM01 #Select disk: $Disk = Get-AzureRmDisk -ResourceGroupName "RG-VM01" -DiskName "WindowsVM01" #Set new Disk Configuration: $NewDiskCOnfig = New-AzureRmDiskUpdateConfig -AccountType PremiumLRS #Apply new Disk Configuration: Update-AzureRmDisk -ResourceGroupName "RG-VM01" -DiskName $Disk.Name -DiskUpdate $NewDiskCOnfig AccountType : PremiumLRS TimeCreated : 24-4-2017 23:27:33 OsType : Windows CreationData : Microsoft.Azure.Management.Compute.Models.CreationData DiskSizeGB : 128 ...... #Check Disk again: Get-AzureRmDisk -ResourceGroupName "RG-VM01" | ft ResourceGroupName,AccountType,Name,DiskSizeGB ResourceGroupName AccountType Name DiskSizeGB ----------------- ----------- ---- ---------- RG-VM01 PremiumLRS WindowsVM01 128 |
Resizing your MD disk VM in Powershell:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#Check current MD disk: Get-AzureRmDisk -ResourceGroupName "RG-VM01" | ft ResourceGroupName,AccountType,Name,DiskSizeGB ResourceGroupName AccountType Name DiskSizeGB ----------------- ----------- ---- ---------- RG-VM01 PremiumLRS WindowsVM01 128 #Stop VM: Stop-AzureRmVM -Name WindowsVM01 #Select disk: $Disk = Get-AzureRmDisk -ResourceGroupName "RG-VM01" -DiskName "WindowsVM01" #Set new Disk Configuration: $NewDiskCOnfig = New-AzureRmDiskUpdateConfig -DiskSizeGB 200 #Apply new Disk Configuration: Update-AzureRmDisk -ResourceGroupName "RG-VM01" -DiskName $Disk.Name -DiskUpdate $NewDiskCOnfig AccountType : PremiumLRS TimeCreated : 24-4-2017 23:27:33 OsType : Windows CreationData : Microsoft.Azure.Management.Compute.Models.CreationData DiskSizeGB : 200 ...... #Check Disk again: Get-AzureRmDisk -ResourceGroupName "RG-VM01" | ft ResourceGroupName,AccountType,Name,DiskSizeGB ResourceGroupName AccountType Name DiskSizeGB ----------------- ----------- ---- ---------- RG-VM01 PremiumLRS WindowsVM01 200 |
Both, Upgrade to Premium and Resizing, are pretty much the same! Of Course you could also combine both into one command like:
$NewDiskCOnfig = New-AzureRmDiskUpdateConfig -DiskSizeGB 200 -AccountType PremiumLRS
Note: Don’t forget to Extend your disk in Windows ‘Disk Management’ as you should normally do.
gr,
Pieterbas