Windows 10: Compact a Hyper-V VHD

  1.    28 Jan 2015 #1

    Compact a Hyper-V VHD

    I have Hyper-V VM with the Windows 10 Pro Technical Preview Build 9926 as the guest, and Windows 8.1 Pro as the host OS. I've been running it for 3 months now, with at least 2 build updates. But I can't compact the VHD. The used drive space on the VM guest is 16.8 GB, while the size of the .vhdx is 24.8 GB. That is 8 GB space that could be removed.

    I've tried doing the compact within Hyper-V Manager. But I can't get the .vhdx file to shrink any more. I don't want to defrag the virtual drive from the guest OS because my host OS is running from a solid state drive.

    So how do I recover those 8 GB on my host machine?
      My ComputerSystem Spec

  2.    28 Jan 2015 #2

    You will probably have to defrag it. One defrag isn't going to kill your SSD.
      My ComputerSystem Spec

  3.    29 Jan 2015 #3

    Hi there

    You could do it "The brute force way"

    1) From the VM run an image backup (Acronis etc). Backup to an external HDD.
    2) delete the original Vhd files
    3) Re-create a NEW VM but don't install the OS. Define disk size to what you want now.
    4) Recover the old image via Acronis - your VM should be able to boot from an ISO initially so no probs running a recovery. Use Macrium or similar if you don't have Acronis.

      My ComputerSystem Spec


Related Threads
Solved Hyper-V in Gaming
Hi, As anyone tried Hyper-V yet, as isn't it suppose to be an emulator so we can play old games like Silver etc...
Solved Hyper-V no sound in Virtualization
Is there anyway to get sound with the various VM's that I have created in Hyper-V ? I am currently using it in 8.1 Pro. Larry
Source: How Windows 10 achieves its compact footprint
Hyper-V & Win10 #2 in Installation and Upgrade
Is there a way to create a Desktop shortcut to the Hyper-V Windows 10 Client so when I double click it I launch Windows 10 under Hyper-V? I've seen suggestions for Powershell and VB scripts, none of which I could get to work.
Solved Windows 10 and Hyper-V in Installation and Upgrade
I tried to install the preview as a virtual machine and everything went fine until after a reboot following the download and installation of the updates. Both 8.1 & 10 locked up with a strange crackling noise through the speakers every few seconds....
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 14:31.
Find Us