Change default VM Os Disk size

Pablo Ruano 51 Reputation points
2022-09-27T15:56:57.807+00:00

Hi,

I need to change the default size of 30 GiB of the os disk of the azure vm in linux because I need a smaller size and when creating the virtual machine it does not give me the option to change the size of the disk and then when creating it it does not let you change it to a smaller one.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
668 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olga Os - MSFT 5,951 Reputation points Microsoft Employee
    2022-09-27T16:50:15.087+00:00

    Hello @Pablo Ruano .

    Welcome to the MS Q&A forum.

    As I understand you are looking for a steps to customize OS disk size. From what I know, the OS disk size is based on the image. It’s not possible to create a VM with 64GB OS disk from an Azure Marketplace Image that was created using a 128GB volume. When you create a new virtual machine (VM) in a resource group by deploying an image from Azure Marketplace, the default operating system (OS) disk is usually 127 GiB (some images have smaller OS disk sizes by default). To get an image for some specific size, it should be published by the Publisher on the Azure Marketplace. As example, Windows Server small disk images come with 30GB OS disks. Officially shrinking an existing disk isn’t supported and may result in data loss.

    As a workaround, you can create a VM on your local Hyper-V, create it with a small disk, then upload it to Azure, then use this VHD to create new VM, in this way, the VM's OS disk will smaller than 30GB.

    Sharing few resources for your reference:

    Hope above answers your questions and concerns.

    --------------------------------------------------------

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Sincerely,
    Olga Os

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.