▶ About Windows Server 2012 (R2) Hyper-V
▶ How to expand VHD in Windows Server 2012 R2 Hyper-V?
About Windows Server 2012 (R2) Hyper-V
Windows Server 2012 (R2) Hyper-V is Microsoft’s virtualization platform, also a native hypervisor, which enables administrators to virtualize several operating systems and run off the same physical Server at the same time. This tool can help them to better utilize their hardware. Compared with earlier Hyper-V versions, Windows Server 2012 R2 Hyper-V allows users to resize a VHD (virtual hard disk) for a running Virtual Machine (VM).
With the resizing feature of Windows Server 2012 R2 Hyper-V, you can expand or shrink a virtual hard disk while the Virtual Machine is running. So when the data or system volume is about out of space and starts slowing down VM performance, you can expand the virtual hard disk size on Windows Server 2012 Hyper-V Server.
How to expand VHD in Windows Server 2012 R2 Hyper-V?
To extend VHD via Windows Server 2012 Hyper-V successfully, you need to make sure you are using the VHDX format and the disks are connected to a SCSI controller. Otherwise, you will not be able to expand or shrink a virtual hard disk. Now, let’s take a look at how to expand VHD on Windows Server 2012 R2 Hyper-V step by step without turning off the Virtual Machine.
Step 1. Expand disk size in VM settings
First of all, we need to enlarge disk space through the settings on Virtual Machine.
1. Right click on the Virtual Machine and click “Settings”. In the setting window, click on the Virtual Hard Drive you want to extend.
Warning: You cannot extend or shrink a VHD if a snapshot/checkpoint exists for the Virtual Machine.
2. Then click on “Edit” to launch the “Edit Virtual Hard Disk Wizard”. Here you can check the virtual hard disk’s specific location. Then click “Next”.
3. Select “Expand” option on the “Choose Action” page.
4. Type a new size of the virtual hard disk that you want.
Step 2. Enlarge the VHD via Windows Server 2012 Disk Management
Till now, the Virtual Machine hard disk size has been expanded. Next you also have to open Disk Management in Windows Server 2012 R2 Virtual Machine. In Disk Management, you can see there is an unallocated space on the disk you have been extended in the step 1.
Now you can use the “Extend Volume” option to add the unallocated space available to the drive you want to extend, and then expanding VHD in Windows Server 2012 Hyper-V will be finished actually. But there are two cases you might meet. Next we will explain each of them in detail.
If the unallocated space is located right after the partition you wish to extend, the thing will be quite easy: right-click the target partition (ex: H), choose the option “Extend Volume” and follow the wizard to expand the volume.
When the unallocated is far away from the target partition, the Extend Volume option will be greyed out, like the screenshot below. I think most users might have met this situation when expanding VHD in Windows Server 2012 Hyper-V with the purpose of extending (system) partition. Then, Windows Server 2012 built-in disk management program can’t help you. Because the unallocated space is not after the target drive, while using Disk Management to extend volume, the unallocated space must be behind the target partition.
If you are also being troubled by the same case, you can try AOMEI Partition Assistant Server Edition. It breaks out the limitation of the Disk Management, allowing you to easily merge the unallocated space into a partition no matter where the allocated free space locates on the disk.
Download the demo version of AOMEI Partition Assistant Server to have a try.
1. Install and run AOMEI Partition Assistant Server. Right-click the to-be-extended partition and select “Merge Partition”.
2. In this window, tick the unallocated space and click “OK”.
3. Back to the main menu, you can preview that C: drive has been expanded. To make it take effect, you need to click “Apply” to commit the pending operation.
Wait a minute, system partition in Windows Server 2012 Hyper-V will be expanded successfully. Besides, the “Merge Partition” function can also merge two adjacent partitions into one.
This is all about how to expand VHD in Windows Server 2012 R2 Hyper-V step by step. Sincerely hope you can get useful information from this article.
Worth to mention, if you want to manage disk partitions more conveniently in Windows Server 2012, AOMEI Partition Assistant Server Edition is a great choice. It is much more advanced than Windows Server 2012 Disk Manager. And it can do many things that Disk Manager can’t do. For example, it is able to migrate OS to SSD, rebuild MBR, etc. Moreover, it supports both Windows Server 2003, 2008 (R2), 2012 (R2), 2016, 2019, and Windows 10/8/7.