From Windows Server 2012 R2, it is possible to re-size a Virtual Hard Disk for a running Virtual Machine on Hyper-V. It was not possible to do before for an Virtual Machine running state on Windows Server 2012 and earlier Hyper-V versions.
Advantages: The re-sizing feature allows expanding or shrinking a Virtual Machine hard disk while the Virtual Machine is running. Users can still access Virtual Machine and its volumes. This feature reduces the downtime of critical Virtual Machines.
Requirements: You must be using a VHDX format and this must be connected to a SCSI controller before you can expand or shrink a Virtual Hard Disk. However, Disk type can be fixed, differencing or dynamic.
Limitations:
- Does not work on virtual hard disks using VHD format.
- The re-sizing feature does not work on Virtual Hard Disks which are attached to IDE Controllers.
- Does not work for Virtual Hard Disks which have snapshots/checkpoints associated.
- Expanding and Shrinking process is not visible to the Virtual Machine Operating System.
- Once the virtual hard disk has been expanded, Then you must make the extra space available to Virtual Machine by using the “Extend Volume Wizard” within the Disk Manager of the Guest Virtual Machine.
- Shrinking reduces the storage capacity of the Virtual Hard Disk. If you want to shrink the size, you must use the “Disk Manager” in Operating System of the Virtual Machine. Finally, use the “Edit Virtual Hard Disk” wizard to reduce the size of the virtual hard disk.
Note: Shrinking might be data loss, so better take backup before shrinking (decreasing the disk size)
Step by Step Procedures:
Right Click VM and select Settings.
Select the Hard Drive and Click Edit.
Click Next.
Select the options as below,
- Compact – compacts the file size of the virtual hard disk and storage capacity of the virtual hard disk remains the same.
- Covert – Converts a virtual hard disk by copying the contencts to a new virtual hard disk. The new virtual hard disk can use a different type and format than the original virtual hard disk.
- Expand – Expands the capacity of the virtual hard disk.
Enter the New Size and click next.
Note: For expanding it should be greater than the existing size.
Review the summary and Click Finish.
Note: After expanding here, you need to extend the volume/partition in the Guest VM.
How to Extend Volume in Windows Server 2012
Greetings from California! I’m bored at work so I decided to check out your blog on my
iphone during lunch break. I love the info you present here
and can’t wait to take a look when I get home.
I’m surprised at how quick your blog loaded on my phone ..
I’m not even using WIFI, just 3G .. Anyways, very good
blog! http://www.yahoo.net
LikeLike