2

Hyper V Generation 2 VMs seem to exhibit this behavior:

  • after expanding VHD, new space appears as separate partition enter image description here
  • there is no way to combine it with existing c:/ partition from Windows
  • have to use something like GParted, to move partitions around to actually increase c:/

I describe this issue in detail here, and solution was to use GParted: Unable to Extend Partition on Hyper-V Generation 2 VM

Maybe deleting Recovery Partition could be an option.

Question: How to handle this without having to use a tool like GParted?

AlexVPerl
  • 217
  • 2
  • 9

3 Answers3

3

You can safely delete the recovery partition. For one method of doing so, review the article below.

https://www.laptopmag.com/articles/erase-recovery-partition-windows

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
  • Thank you, I just came across this too. Can confirm deleting the recovery partition works successfully to release the space, after that extending is possible. – AlexVPerl Nov 22 '22 at 20:42
  • 1
    The recovery partition exists for a reason, it's not just an artificial hassle to annoy IT staff. https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions?view=windows-11 – bviktor Nov 22 '22 at 20:54
  • 4
    @bviktor sure, the recovery partition can be useful, but on a VM where you can often recover just by re-attaching the VHD to a working VM, or just reverting a snapshot, or recovering a backup, the recovery partition is often a lot less important. – Zoredache Nov 23 '22 at 00:21
  • "It's probably fine" is not a valid approach for a production environment. – bviktor Nov 24 '22 at 14:38
2

This is not an issue with Hyper-V, but with Windows itself, which by default creates a recovery partition during the setup process and places it at the end of the disk.
This is usually not a problem... but if the disk is a virtual one, you can extend it in the host, and then you will find yourself blocked from extending the system partition because the recovery partition gets in the way.

The only solutions are:

  • Get rid of the recovery partition altogether.
  • Delete the recovery partition and recreate it (this will require some thinkering with the boot manager).
  • Use a third-party tool which can move partitions around.
Massimo
  • 70,200
  • 57
  • 200
  • 323
1

Windows' built-in tools don't have the capability to move partitions, so the question isn't whether you need a 3rd party tool or not, but rather which 3rd party tool you should use. GParted is an excellent tool IMO, that's what we use for this purpose, but if you don't like rebooting just for this, you may give MiniTool Partition Wizard Free a go.

How to move a partition to the end of a disk with free MiniTool Partition utility

bviktor
  • 900
  • 6
  • 12