Daniel Forrester
asked on
Shrink VHDX Server 2012 Hyper V 2012
I have an exchange server 2013 that I've recently free'd up lots of space on, it was 1.6 TB but is now 400Gb, I therefore thought if i compact the vhdx file through the disk management in Hyper V, it would then show as 400gb rather than 1.6TB but it hasnt changed, is there something i'm missing?
Hello, first things first, backup your data before proceeding.
In prior Hyper-V versions, you had to shutdown the VM and then run the pre-compact tool which would reorganize the data in the VHD file and zero out free space in the VHD, so as to make the actual compact process possible. I think it is also this way in 2012 but not sure about 2012 R2.
So in addition to the defrag above, shutdown the VM, run the precompact tool (you may have to download it), then re-run the compact function in Hyper-V Manager. With 1.6 TB, this process can take several hours.
In prior Hyper-V versions, you had to shutdown the VM and then run the pre-compact tool which would reorganize the data in the VHD file and zero out free space in the VHD, so as to make the actual compact process possible. I think it is also this way in 2012 but not sure about 2012 R2.
So in addition to the defrag above, shutdown the VM, run the precompact tool (you may have to download it), then re-run the compact function in Hyper-V Manager. With 1.6 TB, this process can take several hours.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it was the best solution
Fastest thing might be to create another VHDX on another set of spindles, shut down exchange, move the database to that other VHDX. Then try to shrink the drive and then move the VHDX back.