azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

Specify OS Disk Size on Linux VM Creation

Open adamkrellenstein opened this issue 9 years ago • 7 comments

CLI Version: 0.9.X OS Type: Linux (Ubuntu, RedHat, etc.) Installation via: npm / brew / docker / github repo

Mode: ARM

Environment: AzureCloud

Description:

Is it possible to specify the size of the OS disk upon VM creation?

This question was recently asked here: https://github.com/Azure/azure-xplat-cli/issues/2601. @amarzavery responded, but named only the command for specifying the size of a data disk upon VM creation.

The default OS disk size is 30GB, and this is very large for the VM we are using. It doesn't seem that there is anyway to use vm set --new-os-disk-size to shrink the OS disk, so is it possible to set the OS disk size to smaller than 30GB upon creation?

The VM size we're using is Standard_DS3_v2, but that doesn't seem to matter.

EDIT: The size of the OS disk matters in particular because we are creating VHDs from the VMs, and these are now also 30GB in size.

adamkrellenstein avatar Oct 06 '16 01:10 adamkrellenstein

@huangpf - Can you take a look at this issue?

amarzavery avatar Oct 17 '16 22:10 amarzavery

I don't think you can shrink a disk at creation or update time.

@sauryadas

huangpf avatar Oct 17 '16 23:10 huangpf

@singhkays

huangpf avatar Oct 17 '16 23:10 huangpf

I was using Google Cloud but it was so difficult to download a VM I couldn't figure out how to do it. So I got on MS Azure and figured it out in about 10 min. I was overjoyed and then.... It's a gut busting 30 gb ! My VM's are only about 5gb max. I was almost there.... I have a fast network but 30gb was going to take about 5-6 hrs.

jatt77 avatar Jan 04 '17 23:01 jatt77

@jatt77 If you have access to PowerShell, try the Save-AzureRmVhd cmdlet and see if it takes the same time for download. The equivalent cmdlet for upload Add-AzureRmVhd only uploads the actual data and not the 0s. I'm not sure if Save-AzureRmVhd has the same behavior but it's worth a try.

singhkays avatar Jan 06 '17 18:01 singhkays

great ok I will try it.

Thank you so much.

John

On 1/6/2017 11:37 AM, Kay Singh wrote:

@jatt77 https://github.com/jatt77 If you have access to PowerShell, try the Save-AzureRmVhd cmdlet and see if it takes the same time for download. The equivalent cmdlet for upload Add-AzureRmVhd only uploads the actual data and not the 0s. I'm not sure if Save-AzureRmVhd has the same behavior but it's worth a try.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-xplat-cli/issues/3228#issuecomment-270971837, or mute the thread https://github.com/notifications/unsubscribe-auth/ALZRGKBSrrvnpVDCLjGHGNsHmAuadfYQks5rPonogaJpZM4KPdRK.

jatt77 avatar Jan 06 '17 18:01 jatt77

Any update on this?

gavinfish avatar Dec 05 '18 04:12 gavinfish