The same with physical server and PC, you need to repartition drive for Hyper-V virtual machine, for example: merge two partitions together, shrink a larger partition to create new, or extend a virtual partition when it is running out of space. To complete these tasks, you need a reliable tool and follow the right guide. This article introduces detailed steps how to extend volume in Hyper-V running Windows Server 2022/2019/2016/2012 without losing data.
Take care of data while extending partition in Hyper-V virtual machine
There's potential system damage and data loss risk while resizing and extending vm partitions, because the parameters of associated disk, partition and files must be modified, sometimes all files in a partition must be moved to new locations. If you extend system partition, the boot related files should be updated, too. Therefore, first of all you'd better create Checkpoint or independent backup.
Secondly, you'd better run safe partition software. Among them all, NIUBI Partition Editor is recommended, because it has innovative Virtual Mode, Cancel-at-will, 1-Second Rollback and Hot Clone technologies to protect system and data. In addition, it is much faster because of its unique file-moving algorithm. It is helpful especially when there are large amount of files in the virtual server.
How to extend partition in Hyper-V with free space in other volume
"In most cases, there's another partition such as D: on the same virtual disk, so you can shrink it to extend C: drive. After shrinking a partition, part of free space will be converted to unallocated, then you can combine it to other partition. With safe partition editor software, you can accomplish this task without losing data. Operating System, programs and associated settings, as well as anything else keep the same with before.
How to extend partition in Hyper-V Windows Server 2022/2019/2016/2012:
- Download NIUBI Partition Editor and install in Hyper-V guest server. Right click the partition with plenty of free space and select "Resize/Move Volume".
- In the pop-up window, drag either border towards the other one, or enter an amount of space in the box below. Then part of free space of this partition will be converted to unallocated. (If you want to shrink D to expand C, make unallocated space on the left when shrinking D drive.)
- Right click the partition that you want to extend and select "Resize/Move Volume" again, drag the border opposite to the other one to combine unallocated space.
- Click "Apply" on top left to execute, done. (You can undo or redo the pending operations, partitions won't be modified until click Apply to confirm.)
If you want to extend a non-adjacent partition, for example, shrink drive E to expand C, you need to move partition D before adding unallocated space to C drive. Follow the steps in the video to extend partition (C:) by shrinking other volumes on the same virtual disk:
How to extend volume in hyper-v after expanding virtual disk
If there's no or not enough free space in other partitions on the same disk, NO software can extend partition C by adding space from another different disk. Better than physical server or computer, you can expand virtual hard disk in Hyper-V easily.
How to extend virtual partition in Hyper-V when there's no available free space:
- Follow the steps to increase size of Hyper-V virtual disk. After that, additional space will be shown as unallocated at the end.
- Follow the steps in the video to merge additional unallocated space to C drive (or other partition).
Besides shrinking and extending partitions, NIUBI Partition Editor helps do many other disk partition operations such as move, merge, copy, convert, defrag, hide, wipe, format partition.