I have a hyper-v server that I originally created several partitions on but moved those to attached drives.
Here is the drive now:
I'd like to remove the 160gb Unallocated space. I tried to compact the drive but that did nothing.
I am running Windows 2012R2 as my dedicated server and the virtual machine is Windows 2008.
Is there a way to remove this unallocated space?
Any suggestions?
Best Answer
There is no native way to shrink VHD files. VHDX files can be shrunk from the user interface or powershell, but that feature doesn't exist for the older VHD format.
Not to worry however - someone wrote a tool to resize VHD files for you. This requires the virtual machine be taken offline, and will generate a new, smaller VHD to replace it with.
http://www.bursky.net/index.php/2013/02/resize-vhd-volumesize/ has instructions on using it, as well as a download link since the original site seems to be gone.