How to resize system partition in Win 10 on a virtual machine when unallocated space is not next to the partition?

I've read some guides about resizing the system partition. But they all seem to require the unallocated space to come directly after the partition I want to resize. But I have this:

enter image description here

I might add that I'm running it in a VM with qemu and virt-manager on Fedora. I managed to resize the harddrive with qemu, but the partition gave me problems.

I tried using EaseUS Partition Master, but the trial version only allowed a preview of the result.


Solution 1:

Use GParted Live to boot the VM.

Move the 509 MB partition to the end of the disk, so the unallocated space will follow C:.

Now you will be able to resize C: to include this space.

Note that this is best done from the Windows Disk Management, rather than from a Linux utility.