Azure disk size too small. Linux basic A0 only 29GB

The VM's operating system drive is backed by a blob in your Azure storage account. The blob is a VHD file. When you created the VM, the appropriate VHD was copied from the gallery into your storage account.

The gallery-provided VHD file has a logical capacity of 30GB by design. The documentation states that the maximum allowed size is 127GB, but that is incidental - the gallery images are 30GB.

The solution is two steps, resize the VHD itself (and corresponding blob), then use Linux tooling to resize the partition. This may help:

Resizing a Windows Azure virtual disk


It's now possible to resize via the Azure UI.

That being said, after resizing, the Ubuntu VM will not see the new size by default, you will see that cfdisk sees the unallocated space, and to do it I would use fdisk like it's explained in this answer.


You need to execute follow Azure PowerShell command:

Update-AzureDisk –DiskName "<Disk name>" -Label "ResiZedOS" -ResizedSizeInGB <Size in GB>

Example:

Update-AzureDisk –DiskName "dimitar-linux-dimitar-linux-os" -Label "ResiZedOS" -ResizedSizeInGB 524

Note: Maximum size is 1023 GB.

Note 2: Virtual machine should be power off.

Documentation:

  • How to install and configure Azure PowerShell
  • Update-AzureVM
  • Update-AzureDisk

Question: How to get disk name ?

Answer: You can use azure cli or azure portal.

azure-cli command:

azure vm disk list <virtual machine name> # In my case: azure vm disk list dimitar-centos

Example azure cli output

Tags:

Azure