size of the active disk VM

MIU_Admin 0 Reputation points
2023-03-11T18:28:06.0566667+00:00
Greetings colleagues, please tell me how to reduce the size of the active disk from 127 GB to 256 GB, I try to change the size, but a warning is displayed that (the disk must be disabled or the managed virtual machines are freed) - I do not understand what this means! Help is much needed!


And the second question, when increasing the size of the disk, is the data not lost?

Thank you :)
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,177 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
653 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Alistair Ross 7,371 Reputation points Microsoft Employee
    2023-03-11T19:01:46.16+00:00

    Hello MIU_Admin

    I am not entirely sure if you are trying to increase or decrease the disk size, based on your question. Full details of changing the disk size can be found here https://zcusa.951200.xyz/en-us/azure/virtual-machines/windows/expand-os-disk

    Increasing the disk size can be done without deallocating your virtual machine. Deallocating , a machine takes the virtual machine offline and deprovisions the underlying hardware. This can be achieved by pressing the stop button on the toolbar for that virtual machine.

    User's image

    If you are wanting to resize the disk while the VM is running, there are the following limitations

    • Only supported for data disks (Not OS Disk).
    • If a disk is 4 TiB or less, you should deallocate your VM and detach the disk before expanding it beyond 4 TiB. If a disk is already greater than 4 TiB, you can expand it without deallocating the VM and detaching the disk.
    • Not supported for Ultra disks or Premium SSD v2 disks.
    • Not supported for shared disks.
    • Install and use either:
    • Not available on some classic VMs. Use this script to get a list of classic VM SKUs that support expanding without downtime.

    If your disk do not meet these requirements, then you will need to deallocate your virtual machine before following the steps on the page provided. You will not lose data for increasing disk size.

    Decreasing the size of a disk can be done, though this isn't supported and may result in data loss. Ensure you have appropriate backups before attempting this and only if absolutely necessary.

    I hope this clarifies things

    Alistair

    0 comments No comments

  2. nilesh raut 0 Reputation points
    2023-03-11T19:07:56.8466667+00:00

    To reduce the size of the active disk from 127 GB to 256 GB in Azure, you will need to follow these steps:

    Stop the virtual machine that uses the disk you want to resize. You can do this through the Azure Portal or using Azure PowerShell.

    Once the virtual machine has been stopped, go to the "Disks" section of the virtual machine and select the disk you want to resize.

    Click on "Size + performance" to bring up the disk properties.

    In the "Size (GiB)" field, enter the new size you want to resize the disk to (in this case, 256 GB).

    Click on "Save" to resize the disk.

    Start the virtual machine again.

    Note that when you resize a disk, any data on the disk is preserved. However, it's always a good practice to back up your data before making any changes to disk sizes.

    Regarding the warning message you received, it means that you need to either stop the virtual machine or detach the disk from the virtual machine before you can resize the disk. Once you stop the virtual machine, you will be able to resize the disk.

    connect with me on blog


  3. Michael 0 Reputation points
    2024-11-27T14:22:31.2266667+00:00

    If we have another new volume which has most of the disk space. If we reduce from 512 to 256gb. How can we make sure it goes from this volume and not our main C: disk?. As the data is only on the C: drive mainly, thanks.User's image

    0 comments No comments

Your answer

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