Hyper-V is common used virtual machine tool and many Windows server are running from it. The same with physical server, C: drive in virtual machine is getting full. Many people ask whether there's any difference when resizing virtual partition in Hyper-V, and whether it's safe to extend C drive in Hyper-V Windows Server 2016/2019/2022. This article introduces how to resize/extend partition in Hyper-V running Server 2016/2019/2022 without losing data.
How to resize partition in Hyper-V without any software
Open Windows Server 2016/2019/2022 in Hyper-V, press Windows and X together on the keyboard, and then click Disk Management in the list.
Right click a partition, you'll see available options. Among them, "shrink volume" and "extend volume" are used to adjust partition size without losing data (in most cases). Both functions only support NTFS partition, FAT32 and any other types of partitions cannot be shrunk or extended.
Most of partitions in Windows server are formatted with NTFS file system by default, but Disk Management still cannot help you extend a partition by shrinking another one, because:
- "Shrink volume" function can only decrease a NTFS partition and make unallocated space on the right.
- "Extend volume" function can only extend a NTFS partition when there's adjacent unallocated space on the right.
Unallocated space that shrunk from D drive is nonadjacent to C. Therefore, Disk Management cannot extend C drive in Hyper-V. Only when you want to shrink a NTFS to create new volume, or extend a NTFS partition by deleting the right contiguous volume, you can resize partition without any software.
- How to shrink volume with Server 2016 Disk Management
- How to extend volume with Server 2016 Disk Management
To extend C drive in Hyper-V Windows Server 2016/2019/2022 without losing data, only third party software can help you. However, you'd better back up in advance and run safe software. Otherwise, there's potential system and partition damage risk. Better than other tools, NIUBI Partition Editor has innovative technologies to protect system and data such as:
- Virtual Mode - all operations will be listed as pending for preview, real disk partitions won't be changed until you click "Apply" to confirm.
- Cancel-at-will - if you applied incorrect operations, you can cancel the ongoing operations without damaging partitions.
- 1-Second Rollback - if any error is detected while resizing partition, it automatically reverts server to original status in a flash.
- Hot Clone - clone disk partition without server interruption, you can clone system disk before any operations or regularly as backup.
How to extend C drive in Hyper-V Windows Server
To extend C drive in Hyper-V Windows Server 2016/2019/2022, firstly check there's free space in D other partition on the same virtual disk. If yes, it is very easy. Shrink this partition with NIUBI Partition Editor, then part of free space will be converted to "unallocated", and then add this unallocated space to C drive. After resizing partitions, Operating System, programs, Windows services and everything else keep the same with before, except partition size.
Steps to extend C drive in Hyper-V Windows Server 2016/2019/2022:
- Download NIUBI Partition Editor and install to Hyper-V virtual server.
- Right click the right contiguous partition D: (in some server is E:) and select "Resize/Move Volume". Drag left border towards right in the pop-up window, or enter an amount in the box of unallocated space before.
- Right click system partition C: and select "Resize/Move Volume" again, drag right border towards right to combine unallocated space in the pop-up window.
- Click Apply on top left to execute. (If you did something wrong, simply click Undo to cancel th pending operation.)
If you want to get free space from any non-adjacent volume, there's an additional step to move unallocated space next to C drive.
How to extend Hyper-V partition when virtual disk is full
In a physical server, if a system disk is full, you have to clone it to a larger one, and then extend partition with extra disk space. But it's much easier in Hyper-V.
- Follow the steps to expand Hyper-V virtual disk. After that, additional space will be shown as unallocated at the end of original virtual disk.
- Follow the steps to combine unallocated space to the partition that you want to extend.
Besides shrinking and extending partition in Hyper-V Windows Server 2016/2019/2022, NIUBI Partition Editor helps copy, convert, merge, defrag, hide, wipe partition, scan bad sector and much more.