Hello @devidinesh7890@gmail.com
You can use the Azure CLI to resize the disk on a generalized VM. First, you need to deallocate the VM with the command
az vm deallocate --resource-group <resource-group-name> --name <vm-name>
.
Then, you can update the disk size with the command
az disk update --resource-group <resource-group-name> --name <disk-name> --size-gb <new-size>
.
After that, you can start the VM with the command az vm start --resource-group <resource-group-name> --name <vm-name>
.
After that, you can start the VM with the command az vm start --resource-group <resource-group-name> --name <vm-name>
.
Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/resize-vm?tabs=cli
https://askubuntu.com/questions/1253516/properly-resize-an-azure-vm-disk
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/expand-disks?tabs=ubuntu
If you are using Ubuntu, you can expand the root partition of the OS disk and filesystems automatically by cloud-init.
To resize an Azure VM disk, you need to have the "Contributor" or "Virtual Machine Contributor" role assigned to your account. If you don't have these roles, you won't be able to resize the disk. Specifically, you need to have the "Microsoft.Compute/disks/write" permission on the disk resource. If you are encountering permission issues, you may need to check your role assignments and ensure that you have the necessary permissions.<sup>
If this does answer your question, please accept it as the answer as a token of appreciation.