Expanding an unmanaged disk on Azure linux VM

I have been working on a new project where our VMs are hosted on Microsoft Azure cloud. The default OS disk size for most Linux distros in Azure is 30GB. We needed more space so instead of adding a new virtual disk I ‘ve found out that it is possible to expand the OS disk. When the VMs were initially launched they were launched with unmanaged disks.

You should have in mind that if you need to resize the OS disk that:

  • You will need to stop the VM in order to resize the disk
  • You can not shrink the disk once you had it expand. Disk size reduction is not supported

In the following example the disk of VM will be resized from 30GB to 300GB.

Continue reading