
When you've expanded the disk for the VM, you need to go into the OS and expand the volume to encompass the new space. Expand the volume in the operating system


Remote into the VM, open Computer Management (or Disk Management) and expand the drive using the newly allocated space. When the command finishes executing, restart the VM: Start-AzVM -ResourceGroupName $rgName -Name $vmName Updating the VM might take a few seconds. (It is possible to expand the VHD blob beyond that size, but the OS works only with the first 4,095 GB of space.) The maximum allowed is 4,095 GB for OS disks. The new size should be greater than the existing disk size. Resize a managed disk in the Azure portal If(($capability.Name -eq "EphemeralOSDiskSupported" -and $capability.Value -eq "True") -or ($capability.Name -eq "PremiumIO" -and $capability.Value -eq "True") -or ($capability.Name -eq "HyperVGenerations" -and $capability.Value -match "V2")) $vmSizes=Get-AzComputeResourceSku -Location $location | whereįoreach($capability in $vmSize.Capabilities) Set-AzContext -Subscription $subscriptionId Use the following PowerShell script to determine which VM SKUs it's available with: Connect-AzAccount Or an Azure Resource Manager template with an API version that's or newer.Not supported for Ultra disks or Premium SSD v2 disks.

If a disk is already greater than 4 TiB, you can expand it without deallocating the VM. If a disk is 4 TiB or less, you can't expand it beyond 4 TiB without deallocating the VM.Only available with particular VM SKUs.This feature has the following limitations: You can now expand your data disks without deallocating your VM. Shrinking an existing disk isn’t supported and may result in data loss.Īfter expanding the disks, you need to Expand the volume in the operating system to take advantage of the larger disk. Unless you use Expand without downtime, expanding a data disk requires the VM to be deallocated.
