Go Premium for a chance to win a PS4. Enter to Win

  • Status: Solved
  • Priority: High
  • Security: Public
  • Views: 37
  • Last Modified:

Shrink Win 10 VHD hard drive

We have several Windows 10 Hyper-V virtual machines running on a Server 2016 server. These virtual machines have all been created with a 127 GB hard drive.

We have downloaded quite a bit of data onto these virtual machines which have almost completely filled up these virtual hard drives.

Now this data has been moved to other locations or deleted and these Windows 10 virtual machines now have over 100 GB of free space. However, the sizes of these Generation 2 Windows 10 virtual machine hard drives are still quite large.

Is there any way of compacting these Generation 2 Windows 10 virtual machine hard drives so that their size will only reflect the amount of space that is actually currently being used and so that these virtual hard drive sizes won't expand again until there is more data put on these Windows 10 virtual machines? How can this be done?
2 Solutions
Steve McCarthy, MCSE, MCSA, MCP x8, Network+, i-Net+, A+, CIWA, CCNA, FDLE FCIC, HIPAA Security OfficerIT Consultant, Network Engineer, Windows Network Administrator, VMware AdministratorCommented:
If you are using thin provisioning, it is already done.  If you use thick provisioning, that needs to be changed.
KnowledgeableAuthor Commented:
What are the steps to find out if I am using Thick or Thin provisioning?
Alex AppletonBusiness Technology AnalystCommented:
Here's a link that explains how to do this:


You'll find that you won't be able to reclaim all the white-space on the VHDx file.  Also run a defrag on the volume before attempting to shrink it.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now