Why can't I expand my C: drive on Windows Server
You used a stock image of Windows Server 2022 Standard Edition or Windows Server 2025 Standard Edition to create your virtual server. You also chose to expand the boot volume up to 250 GB. However, the C: drive cannot be extended.
Because the stock windows image supports both BIOS and UEFI boot, when the boot volume is created, it has a C: drive and a Recovery partition that prevents the expansion of the C: drive.
You can remove the D: drive before you expand the C: drive. Take a snapshot of your boot volume as a precaution before you begin.
Open the Command Prompt or PowerShell as an administrator, and run the following commands:
-
Disable the Windows Recovery Environment, so the WinRE entry is removed from the Boot Configuration Data and the WinRE image is detached.
reagentc /disable
PS: C:\Users\Administrator> reagentc /disable REAGENTC.EXE: Operation Successful.
-
Start the DiskPart utility.
diskpart
PS: C:\Users\Administrator> diskpart Microsoft DiskPart version 10.0.26100.1150
-
Select the boot disk and list the partitions.
sel disk 1
list part
DISKPART> sel disk 1 Disk 1 is now the selected disk. DISKPART> list part Partition ### Type Size Offset ------------- ------------ ------ ------- Partition 1 Primary 100 MB 1024 KB Partition 2 Primary 98 GB 101 MB Partition 3 Primary 200 MB 98 GB Partition 4 Recovery 681 MB 99 GB
-
Identify for the partition with the type "recovery", and select it and delete it.
sel part 4
del part override
DISKPART> sel part 4 Partition 4 is now the selected partition. DISKPART> del part override DiskPart Successfully deleted the selected partition DISKPART> list part Partition ### Type Size Offset ------------- ------------ ------ ------- Partition 1 Primary 100 MB 1024 KB Partition 2 Primary 98 GB 101 MB Partition 3 Primary 200 MB 98 GB
-
Delete the next partition.
DISKPART> sel part 3 Partition 3 is now the selected partition. DISKPART> del part override DiskPart Successfully deleted the selected partition DISKPART> list part Partition ### Type Size Offset ------------- ------------ ------ ------- Partition 1 Primary 100 MB 1024 KB Partition 2 Primary 98 GB 101 MB
-
List the disks.
DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------ ------ ------- --- --- Disk 0 Online 44 KB 44 KB * Disk 1 Online 100 GB 1087 MB Disk 2 Online 378 KB 378 KB
-
Select the second partition and extend it.
DISKPART> sel part 2 Partition 2 is now the selected partition. DISKPART> extend DiskPart successfully extended the volume.
-
Now you can exit the DiskPart utility by typing the following command.
exit
-
Re-enable the Windows Recovery Environment.
PS: C:\Users\Administrator> reagentc /ensable REAGENTC.EXE: Operation Successful.