Azure Disks-Adding disk without stopping it

azureazure-networkingvirtual-machines

Can anyone help me to know if we can add disk to azure vm without shutting it down or stopping the VM?

Best Answer

As we know, we can attach a data disk to Azure VM and there is no need to stop this VM. Here a official article about attach a data disk to Azure Windows VM, please refer to it.

By the way, if you reached the limit of number of disks, we should resize the VM, and this need a reboot.

=========
Update:
Sorry for my mistake, in Azure ASM module we can resize data disk without shutdown VM, but in ARM, we should shutdown this VM and update data disk with powershell, here is the powershell script:

$vm = get-azurermvm -resourcegroup vms -name jasonv
$vm.StorageProfile.DataDisks
Set-AzureRmVMDataDisk -VM $vm -Name jasonv-20170531-143430 -DiskSizeInGB 20
update-azurermvm -vm $vm -ResourceGroupName vms
Related Topic