You can build many virtual servers with VMware or Hyper-V, in this way you can save much cost, because you just need 1 copy of hardware. In additional, you can easily add, edit and remove component from virtual machines. Therefore, many servers are running as guest virtual server. However, the same with physical server computer, virtual disk partition also runs out of space. This article introduces detailed steps to extend virtual disk and partition in Hyper-V running Windows Server 2016 as guest virtual machine.
How to extend vm partition in Hyper-V Windows Server 2016
Windows Server 2016 has 2 native tools - Disk Management and Diskpart, both have the ability to extend partition without losing data. Disk Management has Extend Volume Wizard with graphical interface, diskpart has extend command running via command prompt.
However, both tools are useless in most cases, because they can only extend NTFS partition by deleting the right contiguous volume. In other words, if you want to extend a FAT32 partition, or there's no contiguous partition on the right side, neither tool can help you. So, to extend virtual partition in Hyper-V Windows Server 2016, you'd better run 3rd party partition editor software.
There are many choices in the market but it doesn't mean any one can accomplish this task well. Before extending partition, you'd better create Checkpoint or make independent backup. When resizing virtual partition in hyper-v, all parameters of associated disk, partition and files must be modified, files in some partition must be moved to new locations. If you extend system partition, Windows boot related files must be updated, too. Therefore, there's potential system and data damage risk with unreliable partition software.
Better than other tools, NIUBI Partition Editor has innovative Virtual Mode, Cancel-at-will, 1-Second Rollback and Hot Clone technologies to protect system and data. Furthermore, it is 30% to 300% faster because of the unique file-moving algorithm.
Download and install NIUBI Partition Editor in Hyper-V vm, you'll see all virtual disk with partition structure on the right, available operations to selected disk or partition are listed on the left and by right clicking.
Firstly, check if there's free unused space in other partition on the same virtual disk. If yes, you can transfer free space from it to system C drive or other partition that you want to expand.
As you see in my Hyper-V Windows Server 2016, there are drive C, E and E on the same Disk 0. Both partitions are empty, so I can shrink either one to expand system partition C. After shrinking either partition, part of free unused space will be converted to unallocated, and then I just need to combine this space to C drive.
Steps to extend partition C in Hyper-V Windows Server 2016:
- Right click the right contiguous drive D: and select "Resize/Move Volume", drag the left border towards right in the pop-up window, or enter an amount in the box of "Unallocated space before". Then unallocated space will be made on the left side.
- Right click C: drive and select "Resize/Move Volume" again, drag right border to towards right to merge this adjacent unallocated space.
- Click "Apply" on top left to execute, done. (You can click "Undo" to cancel the pending operations if you changed your mind, partitions won't be resized until click "Apply" to confirm.
Note: If you want to shrink the nonadjacent drive E, there's an additional step to move unallocated space next to C drive before merging.
How to expand virtual hard disk in Hyper-V Windows 2016 server
If there's no other partition or no available free space on the same disk, you need to expand the virtual hard disk to get additional space.
- Follow the steps to expand virtual hard disk for Hyper-V vm. 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 partition for Hyper-V virtual machine and physical computer, NIUBI Partition Editor helps do many other disk partition operations.