Search code examples
azureazure-vm-scale-set

Linux VMSS OS Disk Autogrow Option


Is there any way in which I can chose an autogrow option on the OS disk for an Azure Linux VM at the time of VMSS creation? The disk size for an Azure marketplace image is 127 GB and I want to be able to expand it without needing to restart the VM.


Solution

  • There is no such feature as the auto grow option on the OS disk at the time of VMSS creation.

    If you would like to expand your OS disk size, you can specify the size of the operating system disk in gigabytes with diskSizeGB when you deploy VMSS with the ARM template. This value cannot be larger than 1023 GB. Reference from VirtualMachineScaleSetOSDisk object.

    For example, specify the OS disk size is 200GiB

           "virtualMachineProfile": {
                "storageProfile": {
                    "osDisk": {
                        "caching": "ReadWrite",
                        "createOption": "FromImage",
                        "diskSizeGB": "200"
                    },
                    "dataDisks": [
                        {
                        "diskSizeGB": 128,
                        "lun": 0,
                        "createOption": "Empty"
                        }
                    ],
                    "imageReference": "[variables('imageReference')]"
                },
    

    enter image description here