Expand virtual hard disks on a Linux VM with the Azure CLI

az login
az account set --subscription "Visual Studio Premium with MSDN"
az vm deallocate --resource-group myResourceGroup --name myVM

az disk list \
    --resource-group dev-desktop \
    --query '[*].{Name:name,Gb:diskSizeGb,Tier:accountType}' \
    --output table
	
az disk update \
    --resource-group dev-desktop \
    --name myDataDisk \
    --size-gb 256	
		
az vm start --resource-group myResourceGroup  --name myVM	

Original link: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/expand-disks

Leave a Reply