Why my Linux VM adds a 30 GiB of OS disk Automatically ?

Copper Contributor

I am trying to create a Linux VM from the image provided in Azure marketplace by Canonical. I wanted a low cost linux vm for testing purposes. So I selected  Standard B1s (1 vcpus, 1 GB memory) which costs me around 600 INR per month. But after I successfully created the VM I see there is a 30 GB of OS disk attached to it ?  Can I control/shrink that size ?  I feel 30 GB is very high for my testing purposes.  I also see it is mostly 30 GiB of OS disk in most of the Azure marketplace Images.  Is it just a default size of OS disk? I uploaded my Alpine VHD and created a VM from the same and  it took only 1 GiB of OS disk. Why did it create 1 GiB automatically where my OS originally takes 300MB ?  Am I going to pay for entire 32 GB of data even if my OS disk has a size of 1 GiB only as per disk tier?

 

Screen Shot 2019-02-20 at 7.36.49 AM.pngScreen Shot 2019-02-20 at 8.03.15 AM.png

1 Reply

Hi,

 

currently  it‘s not possible to shrink a managed disc, but in your case there is no need to shrink the disc.

Why?

The payment for Azure Managed Disc is different to Azure Storage Account.

An Azure Managed Disk payment based on junk, so in your case you pay for the lowest disc size (32GB).

When you change the disc size, to 20 GB, the monthly fee isn‘t changed.

 

Hannes