Expand the size of the virtual hard disks attached to a virtual machine

AnandUpadhyay-6323 0 Reputation points
2025-10-30T10:23:00.4+00:00

We want to expand the disk size of the virtual hard disks attached to a virtual machine (SQL Server is running), can you call me.

https://learn.microsoft.com/en-us/azure/virtual-machines/windows/expand-disks

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Most helpful
  1. Manish Deshpande 7,975 Reputation points Microsoft External Staff Moderator
    2025-10-30T12:50:54.61+00:00

    Hello AnandUpadhyay

    Yes, you can expand the size of virtual hard disks attached to an Azure virtual machine without data loss. However, there are a few important considerations:

    • Shrinking disks is not supported and may result in data loss.
    • Expanding disks is supported, but depending on the disk type, it may require downtime.
    • Data Safety - Expanding a disk does not cause data loss. Shrinking is not supported and can lead to data corruption.
    • Downtime Requirements

    OS Disk: The VM must be deallocated before you can resize the OS disk.

    Data Disk: If you use the “Expand without downtime” feature, you can resize without stopping the VM. Otherwise, deallocation is required.

    • Post-Resize Step
      After resizing the disk in Azure, you must extend the volume inside the operating system (Windows or Linux) to utilize the additional space.

    Steps to perform - Stop or Deallocate the VM (required for OS disk, optional for data disk if not using online resize).

    Resize the Disk in Azure Portal:

    • Go to Disks under your VM > Select the disk you want to expand > Update the size and save and then Start the VM.
    • Open Disk Management.
    • Locate the disk and right-click the volume.
    • Select Extend Volume and follow the wizard.

    If your VM uses a spanned volume:

    • Stop the VM.
    • Resize each disk in the spanned set.
    • Start the VM.
    • Use Disk Management to extend the spanned volume to include the new space.

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/expand-disks

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Thanks,
    Manish Deshpande


    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.