Virtual Machine C drive almost full

Saira Munir 125 Reputation points
2026-11-18T12:20:41.5733333+00:00

Hi,

Our Microsoft VM C: Drive is almost full. There are no unneccessary files. But when i check memory utilization, i find some RDB items. I asked copilot whether i can delete them. Copilot says verify first. Please check attachment

Next i have another question. We dont use our D drive. Can i move my D drive space to C drive ? Is that recommended or no it is not a good idea . Please share your recommendations

Screenshot 2026-11-18 055642

Azure Virtual Machines
Azure Virtual Machines

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

0 comments No comments

Answer accepted by question author

AI answer

2026-11-18T12:21:45.7533333+00:00

Expand the Azure managed OS disk and then extend C: inside Windows; do not try to transfer the default Azure temporary D: drive into C:, and do not manually remove the listed RDS/AVD agents solely to free space.

1. Do not delete the RDS/AVD entries based only on version

The screenshot lists RDS Infrastructure Agent and Remote Desktop Agent Boot Loader components used by Azure Virtual Desktop. Removing the wrong component can leave the session host unavailable.

The documented complete agent-removal process is intended for specific failures—such as a host stuck in Unavailable/Upgrading, missing agent services, or an unresolved registration problem—and requires removing the host-pool entry, generating a registration key, reinstalling the agent and boot loader, and re-registering the VM. It is not a disk-cleanup procedure.^1^

One limited exception exists: if Settings → Apps → Installed apps shows multiple entries specifically named Remote Desktop Services Infrastructure Geneva Agent, and the session host is in Needs Assistance, Microsoft documents removing the older Geneva versions and retaining the latest. That condition is not established by the screenshot, so it should not be applied to the displayed RDS Infrastructure Agent or Boot Loader entries.

2. Expand C: using the Azure OS disk

Take a snapshot or confirm that a current VM backup exists before changing disk capacity or partitions.

  1. In the Azure portal, open the VM.
  2. Select Settings → Disks.
  3. Select the OS disk name.
  4. Select Settings → Size + performance.
  5. Choose a larger disk size and select Resize.
    • The new size must be greater than the current size.
    • If the portal indicates that deallocation is required, stop/deallocate the VM first and start it afterward.
  6. Connect to the VM through RDP.
  7. Press Windows+R, enter diskmgmt.msc, and press Enter.
  8. If the new unallocated space is immediately to the right of C:, right-click C: and select Extend Volume.
  9. Complete the wizard and verify the new capacity in File Explorer.

Increasing the managed disk does not by itself enlarge the Windows volume; both the Azure resize and the Windows extension are required.^2^

3. If Extend Volume is unavailable

Check the partition order in Disk Management.

If it shows:

| C: | Recovery partition | Unallocated space |

the Recovery partition prevents C: from reaching the unallocated space. NTFS can extend only into adjacent unallocated space.^3^

Only in that layout:

  1. Create an OS-disk snapshot in Azure portal: open the disk resource, select Snapshots → Create snapshot.
  2. Open Command Prompt as administrator.
  3. Identify the Recovery partition carefully:
diskpart
list disk
select disk 0
list partition
  1. Select the verified Recovery partition and delete it:
select partition <number>
delete partition override
exit
  1. Open Disk Management and extend C:.

Deleting the wrong partition can make Windows unbootable; do not use these commands unless Disk Management confirms that a Recovery partition is the only partition between C: and the new unallocated space.

4. Why D: space cannot normally be added to C:

On most Azure Windows VMs, D: is a temporary local disk, not another partition of the managed OS disk. It is physically a different Azure disk role, so its capacity cannot be merged into C:.

Data on that temporary disk can be lost during maintenance, redeployment, host movement, or VM stop/deallocation. It should contain only disposable data such as page files or temporary application data.^4^

If D: is instead an attached managed data disk, it is still a separate disk and cannot be reassigned to C: through Windows Disk Management. Keep it as a data disk and move suitable application data there. Azure generally recommends data disks for applications and persistent data because they provide better scalability, maintenance, backup, and performance isolation.^5^

Before deciding, open Disk Management:

  • If D: appears as Temporary Storage on a separate disk, leave its page file and temporary contents alone.
  • If D: is a managed data disk, use it for persistent application/data storage.
  • If C: and D: unusually appear as partitions on the same disk, partition order determines whether space can be reassigned; deleting D: would destroy its contents and unallocated space must be adjacent to C:.

References

  1. Troubleshoot common Azure Virtual Desktop Agent issues
  2. Expand virtual hard disks attached to a Windows virtual machine
  3. Can't extend an OS volume because a recovery partition blocks the extension
  4. Frequently asked question about Windows Virtual Machines
  5. Azure managed disks overview
AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

2 people found this answer helpful.

1 additional answer

Sort by: Oldest
  1. Saira Munir 125 Reputation points
    2026-11-18T12:35:23.4766667+00:00

    If i expand the C drive. Does that comes with a cost ? Will that increase our monthly bill ?

    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.