Skip navigation
How to resize ARM disk

How to resize ARM disk

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

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish