You can easily expand virtual drives using the integrated tools of Hyper-V or VMware. However, if Windows 10 or 11 is running in a VM, you will find that the system partition cannot be extended because the recovery partition is in the way. You can conveniently move it to the end of the disk with GParted.

In Hyper-V Manager, you can enlarge a VHD(X) with the Virtual Hard Disk Wizard. In VMware Workstation, the corresponding option can be found in the settings of a VM by selecting the respective drive. The disk utilities then appear in the right section, including the one labeled Expand.

Expanding virtual drive in VMware Workstation

Expanding virtual drive in VMware Workstation

Disk layout prevents expansion of OS partition ^

If you restart the guest OS after successfully expanding the drive and open Disk Management inside the guest to expand the Windows partition to the new space, you will see that the recovery partition blocks this attempt.

The newly added space is located at the end of the drive after the recovery partition

The newly added space is located at the end of the drive after the recovery partition

In the standard disk layout, it is to the right of the OS partition, and the unallocated space comes after it at the end of the drive. So, you have to move the recovery partition all the way to the right before you can enlarge C:.

Limited functionality of onboard tools ^

Disk management can enlarge and shrink partitions but not move them. Therefore, you need a separate tool for this.

The procedure suggested by Microsoft for this purpose uses DISM. First, you capture the recovery environment using this tool, then the partition is deleted with diskpart.exe, and finally, you recreate the partition and restore its contents with DISM. This procedure is cumbersome, time-consuming, and error prone.

Deploy GPartedG ^

It is much easier to use the GNOME Partition Editor (GParted). You do not need any of the major Linux distributions for it; rather, you can just download a slim live CD.

You attach the ISO to the virtual machine and boot it from the virtual DVD drive. If you want to move the partition on a physical machine, you first have to write the ISO to a USB stick with Rufus and boot the PC from it.

On the startup screen, confirm the preselected (and barely readable) GParted Live (Default settings).

Start Linux using the preselected entry

Start Linux using the preselected entry

In the next step, confirm the already marked entry ("Don't touch keymap"), and, if necessary, select a language other than the default English.

Before starting the graphical user interface you have to select a few settings

Before starting the graphical user interface you have to select a few settings

For the mode option, leave it at (0), so that the graphical interface is started and GParted appears automatically. The tool then automatically loads the partition table.

Now, it is a matter of identifying the recovery partition in the list since GParted uses different names than Windows. The easiest way to find the partition is to note the size of the partition in disk management. It is usually about 500 MB.

Open the context menu of the recovery partition and select the resize command

Open the context menu of the recovery partition and select the resize command

Then open the context menu of the respective partition and execute the command Resize/Move. In the dialog that appears, enter the value 0 in the Connecting free space field. The tool then automatically allocates the available space to the area in front of the partition.

If you set the following free space to zero then GParted allocates it to the front

If you set the following free space to zero then GParted allocates it to the front

After confirming the dialog with the Resize/Move button, nothing will happen. Instead, you first have to apply the changes using the Edit menu. Since the partition is quite small, moving it should happen quite quickly.

Triggering the move of the recovery partition

Triggering the move of the recovery partition

Finally, reboot the VM, and start Windows. In disk management, you can see that the recovery partition has moved to the far right.

Subscribe to 4sysops newsletter!

The free space is now directly next to the Windows partition so that you can enlarge it.

The free space is now directly next to the Windows partition so that you can enlarge it.

Therefore, you can now expand the system volume so that it also gets the previously unallocated space.

avatar
3 Comments
  1. Bernhard Diener 6 months ago

    The functionality of the recovery partition is maintained that way? I doubt that. Please read and compare to http://woshub.com/extend-volume-blocked-by-windows-recovery-partition/ which suggests that a lot of additional steps need to be completed.

    • Author
      Wolfgang Sommergut 6 months ago

      The article you are refering to doesn’t describe how to move the WinRE partition. Instead it explains how to delete and recreate the partition and how to restore the content in the new partition. This of course involves many more steps than just moving the recovery partition.

      • Bernhard Diener 6 months ago

        You are right, just confirmed it by trying.
        In case someone is interested: you may of course do completely without 3rd party tools and you still do not need to use the bunch of commands that the woshub article suggests:

        make a backup of just the recovery partition using wbadmin start backup
        delete it with diskpart
        extend c:
        create a new partition at the end and quick format it
        boot from a setup stick
        use
        wbadmin start recovery
        to overwrite the end-placed volume with your backup of the recovery partition.

        That’s it. No 3rd party tools, still quite easy.

Leave a reply

Your email address will not be published.

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account