Q. How can I resize an Azure Resource Manager disk?
A. The regular cmdlets to resize OS and data disks in a ASM storage account do not work for ARM storage accounts. Instead they are resized via the VM.
$vm = Get-AzureRmVM -Name testvm -ResourceGroupName RG-SCUSA
$vm.StorageProfile.OsDisk.DiskSizeGB = 1023
$vm.StorageProfile.OsDisk.Caching = 'None' # or ReadOnly ReadWrite
Update-AzureRmVM -VM $VM -ResourceGroupName RG-SCUSA
To resize data disks they are accessed via an array of the VMs storage profile, for example:
$vm.StorageProfile.DataDisks[0].DiskSizeGB = 1023
0 comments
Hide comments