So I am running a small VM for personal stuff on azure and want to minimize cost. The disk cost is significant part of my per day spending. I am running standard Ubuntu 18.04 image and already selected standard HDD instead of SSD for disk. but the current OS disk is of size 30GB and I am hardly using 3GB of it. I want to use smaller disk but I can't find a option to do so.
Asked
Active
Viewed 978 times
3
-
I'm seeing the price of a $32GB disk is ~$1.50 per month. Are you seeing something different? – Jason P Jun 20 '20 at 15:07
-
ya that is about what I am seeing. that may seem small but everything other than this does not cost anything to me so its 100% of the cost. currently using free tier B1s instance. I am just looking if there is any way but it's not that important. :) – DHANANJAY RAUT Jun 21 '20 at 10:13
-
Hey, I was wondering if you found a solution. I don't understand how to get the vhd blob for an ubuntu installation – Lainad Jun 05 '21 at 15:11
1 Answers
3
For your issue, I'm afraid it's impossible. The reason is that when you gonna create a VM from the VM image, the OS disk size must be bigger than the image size. I think you know the limitation. And in Azure, it also makes sense. For example, you can see the details of the VM image Ubuntu 18.04-LTS:
You see the VM image size is 31, so the VM OS disk size should bigger than 31. When you want to create the VM, you can see the details about the VM image first, and then you will know if what is the minimum size of the OS disk.

Charles Xu
- 29,862
- 2
- 22
- 39
-
2why the image size is so big if after install Ubuntu is taking only 3GB. – DHANANJAY RAUT Jun 23 '20 at 03:05
-
1@DHANANJAYRAUT Only the Azure knows it. But I think if you just use 3GB, you cannot much actions in it because of not enough space for you. – Charles Xu Jun 23 '20 at 03:13
-
Ubuntu Server offer has changed recently, so for 22 command is `az vm image show --location switzerlandnorth --urn Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest`. URN must be in the form of `publisher:offer:sku:version`. – igor Feb 16 '23 at 19:56