1

I'm facing a weird problem with Generation 2 Hyper-V VM, where I'm unable to extend partition in Guest OS.

Once I edit the VHDX & Expand it using Hyper-V Manager on the Host OS, and boot into Guest OS, I navigate to Disk Management to extend existing C:/ partition and see "Extend Partition" is grayed out because there is a 100 MB UEFI partition between C:/ and un-allocated space I just provisioned.

The only way to extend that I found was to use a paid partition tool like EaseUS or AOMEI, I'm unable to install their free versions as this is a Windows Server OS and they require Server editions of their software which are paid.

I tried using GParted Live CD, but it does not see to allow extending if partition is not adjacent.

How can I extend existing partition in Guest OS?

4
  • 1
    This has nothing to do with Hyper-V nor with the VM generation. You'd have this same problem in Windows if it were installed directly on the hardware. In order to extend a Windows volume the unallocated space must be directly after/adjacent the volume you want to extend, as you've seen. Your only solution is to use a commercial product.
    – joeqwerty
    Jan 24, 2020 at 12:46
  • 1
    GParted will allow you to move the UEFI Partition to the end of the un-allocated space, then extend your OS partition
    – jfrmilner
    Jan 24, 2020 at 21:08
  • @joeqwerty I agree. The only reason I mentioned Hyper-V & Generation 2 is because Gen 1 VMs do not have this issue. I'm not sure why Mircosoft thought its a good idea to set UEFI partition to the right of the C:/ volume thus blocking "Extend Volume" functionality, perhaps UEFI partition could have been set to the left of C:/ volume during VM creation. I'm not sure if there's a way to modify that behavior via PowerShell or something.
    – AlexVPerl
    Jan 24, 2020 at 21:31
  • @jfrmilner - thanks for your comment, it encouraged me to try again w/ GParted. First time around it did not allow me to move UEFI partition. However second time around I played around with it some more. If UEFI partition is moved all the way to the end of the unallocated space there will be an error preventing the move. So what I tried was to move it to the end BUT leave 1MB empty to the right of it - and that worked. If you would like to write that up as the Answer, I will accept it. Thanks!
    – AlexVPerl
    Jan 24, 2020 at 22:14

1 Answer 1

1

GParted will allow you to move the UEFI Partition to the end of the un-allocated space (You may need to leave a little space as per your comments). Following the move you can now extend your OS partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .