How to Resize Online Virtual Machine Hard Disks in Hyper-V 2012 R2?
This article is about how to resize online VM (virtual machine) hard disk in Hyper-V Windows Server 2012 R2 step by step.
Resizing online VM hard disk in Server 2012 R2 Hyper-V is possible
Compared with Windows Server 2012, the Server 2012 R2 has gain much more progress. It enables users to resize virtual hard disk online via the Hyper-V manager. It is not possible to do that on Windows Server 2012 Virtual Machine and the earlier Hyper-V versions.
The Windows Server 2012 R2 Hyper-V manager allows users to extend and shrink an online VM hard disk while the Virtual Machine is running at the same time. Therefore, users can perform virtual hard disk maintenance work without being distracted by the downtime.
Prerequisites of resizing VM hard disk in Server 2012 R2
No matter you are planning to extend or shrink online VM hard disk in Server 2012 R2 Hyper-V, please check out the following necessary factors or rules:
▶It must be VHDX, a Hyper-V virtual hard disk format. The VHD is not supported.
▶It has to be attracted to a SCSI controller. The IDE controller is not supported.
▶There should be a computer running Windows Server 2012 R2 or later with the Hyper-V feature installed.
▶You should have a user account that is a member of the local Hyper-V Administrators group, or the Administrators group.
Steps to resize online VHD (Virtual Hard DIsk) in Hyper-V 2012 R2
After you view basic information about the Hyper-V manager in Windows Server 2012 R2Virtual Machine, you may want to know how to use it to resize online VM hard disk on Server R2? It is easy! Let me show you detailed steps. Generally speaking, there are two main parts.
Part I - Resize VM hard disk in Hyper-V manager
First of all, you need to expand the size of a virtual hard disk using the following procedure:
1. On the Windows Start screen, click the Server Manager option.
2. On the Tools menu, click on Hyper-V Manager.
3. Under the Virtual Machines, right click the Virtual Machine which contains the virtual hard disk you want to expand. Then click on Settings and select the VHD you need to extend.
4. Then click on Edit to launch the Edit Virtual Hard Disk Wizard. Then click on Next.
5. Choose Expand” or “Shrink and click Next. Here we select Expand.
6. Input the new size that you want and click Next.
7. Click Finish at last.
Once you have finished this, the size of the virtual hard disk will be extended as you wish. However, it will not do anything with the partitioning on the guest OS. Till now, you just get a bunch of extra, unused space at the end of the VM hard disk. To make it actually usable for data storage, you need to login to the guest operating system and do something with it. That is Part II.
Part II - Resize partition on Virtual hard disk of the guest OS
When you login in the guest OS and open “Disk Management”, you will see the expanded size as an unallocated space as shown in the following screenshot of the Virtual Machine, at the end of the disk.
To take advantage of this space, you can use Windows Server 2012 R2 built-in Disk Manager to create a new partition on the unallocated space, or extend the left partition.
Cannot extend online VM hard drive in Disk Management?
The unallocated space can be easily add to the left partiton (F) for expanding it, but what if you want to extend the first partition (E)? If you right click E drive and try to select “Extend Volume”, you will find it is greyed out that’s because this funtion can only work when the target partition is followed by the unallocated space. You might wonder: can you move the F partition to the right side of the unallocated space and then extend E? Sorry to tell the Disk Management does not support moving any partition.
To solve this problem, one of the easiest solutions is to use a professional partition tool like AOMEI Partition Assistant Server Edition. More powerful than Windows Server Disk Manager and break many limitations of it. This software allows you to move partition(even if it's an encrypted partition). With it, you can change the location of the unallocated space, making it behind the partition you wish to extend.
Below we will take how to move D drive and extend C drive with the unallocated space as an example.
Step 1. Install and run AOMEI Partition Assistant Server. In the main interface, you can see the unallocated space is after D drive, not C partition. Now right click D drive and select “Resize/Move Partition”.
Step 2. In this window, drag the partition to the right side and click “OK”.
Step 3. Now, right click C drive and select “Resize/Move Partition”.
Step 4. Drag the slide bar to right side to add the unallocated space into it.
Step 5. At last, click “Apply” and "Proceed" to commit the pending operation.
More features of AOMEI Partition Assistant to resize VM hard disk on Server 2012 R2 flexibly
Apart from moving partition to help extend another partition, AOMEI Partition Assistant Server also provides “Merge Partition” function, which enables you to combine two adjacent partitions into one, as well as directly merge unallocated space into a partition regardless of its locations.
Moreover, its “Allocate Free space” feature is also quite useful for resizing partitions since it is able to assign some free space from a large partition to a small partition.
Wrapping things up
This is all about how to resize online VM hard disk in Hyper-V Server 2012 R2. The first part might be smooth for most users. If you are stuck in the similar situation as above in the Part II, AOMEI Partition Assistant Server is worth your trying.
It not only supports the newest Windows Server 2022, but also supports former Windows Server OSes, Windows server 2019, Windows server 2016, Windows Server 2008(R2), Windows Server 2003 as well as Windows 11/10/8.1/8/7/Vista/XP. In addition to all mentioned features, it also does well in converting system disk to GPT without losing data/deleting partitions, copying partition to another drive, migrating only OS partition to SSD/HDD, etc.