Virtual machine scale sets - How to increase size of OS Disk?

Rajasekar Ravichandran 0 Reputation points
2023-01-30T13:18:34.43+00:00

Hi Team,

I am running VMSS as Agent for compilation. Now i want to increase the OS Disk which is 30G as existing to 100G or more than that. How to perform it for VMSS. I am not able to any link or steps for the VMSS

Regards,

Raj

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
701 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
407 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ramya Harinarthini_MSFT 5,351 Reputation points Microsoft Employee
    2023-01-30T15:31:45.04+00:00

    @Rajasekar Ravichandran Welcome to Microsoft Q&A, thank you for posting your here!!

    I have tested the below AZCLI command in my test Subscription to increase the OS disk size on Virtual Machine scale set and you can execute the below command in CLI from cloud shell in Azure Portal.

    Commands:

    az account set --subscription "provide your subscriptionID"
    az vmss update -n vmssname -g resourcegroupname --set virtualMachineProfile.storageProfile.osDisk.diskSizeGb=150 # Replace -n with VMSS name and -g with resourcegroup name
    

    Output:

    
          "osDisk": {
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "deleteOption": null,
            "diffDiskSettings": null,
            "diskSizeGb": 150,
            "image": null,
            "managedDisk": {
              "diskEncryptionSet": null,
              "securityProfile": null,
              "storageAccountType": "Premium_LRS"
    
            "name": null,
            "osType": "Linux",
            "vhdContainers": null,
            "writeAcceleratorEnabled": null
          }
        },
        "userData": null
      },
      "zoneBalance": null,
      "zones": null
    }
    

    Hope it helps!!!


    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

    2 people found this answer 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.