How to: Resize hard disk in Azure Resource Manager (ARM)

Resizing a virtual hard disk in Azure Resource Manager is really easy to do through the Azure Managent Portal. In a few clicks you can extend the virtual hard disk size. Note that the VM should be turned off!! So you need to plan a maintenance window!!
You can also extend the virtual hard disk with PowerShell. In this example I’ve extended the data disk from 25 to 30 GB.


# Specify the VM
$VM = Get-AzureRmVM -ResourceGroupName MSS-DEMO -VMName MSS-DEMO-DC01
# Set the new size of the data disk
Set-AzureRmVMDataDisk -VM $VM -Name MSS-DEMO-DC01-20160801-100246 -DiskSizeInGB 30
# View the new size of the data disk(s)
$VM.StorageProfile.DataDisks
# Update the configuration in Azure
Update-AzureRmVM -VM $VM -ResourceGroupName MSS-DEMO

2016-08-01_10h31_33    2016-08-01_09h45_27    2016-08-01_10h11_55

2016-08-01_10h12_18    2016-08-01_10h25_33    2016-08-01_10h25_49

2016-08-01_10h31_15     2016-08-01_10h32_11    2016-08-01_10h33_23

1.) Login to the Azure Management Portal
2.) Check the current size of the data disk. In my example 25 GB
3.) Start PowerShell and login to your Azure subscription
4.) Change the data disk to the new value
5.) Update the configuration to Azure
6.) Check the new size of the data disk with PowerShell or within the Azure Management Portal.
In my example the new size is 30 GB.