Shrinked free space from Hyper-V VM is not appearing in host machine

Kuppusamy S 6 Reputation points
2021-05-31T12:05:08.677+00:00

Hello All,

I have a VM server running on Hyper-V 2012 R2. I want to reduce the space from D-Drive around 1TB out of 1.8TB. I have shrink the space after shutdown the VM and it was done. VM server showing the new size of 800GB, but the free space of 1TB is not showing in my host server. Still the VM size is 1.8TB showing in Windows file explorer.

Please help us to get the unallocated space from VM into the Hyper-V host server.

Thanks in advance...

S.K. Samy

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
{count} votes

5 answers

Sort by: Most helpful
  1. Kuppusamy S 6 Reputation points
    2021-06-01T07:21:22.727+00:00

    Thanks Patrick & Yuhan,

    I was already shrink the VHDX disk inside VM using DISK MGMT and it was showing the free space as unallocated. I have shutdown the VM and resized (shrink again) the disk from Hyper-V manager using VM disk edit settings. It was completed successfully, but still that actual size of the VM after shrink (800GB) was not reflected in file size when I checked in the file properties (1.8TB).

    Also the shrink space of 1TB is not appearing/adding into my host server HDD space.

    Thanks in advance if anyone provide me the solution.

    1 person found this answer helpful.

  2. Anonymous
    2021-05-31T13:39:57.767+00:00

    After you Resize-VHD then you'll need to Optimize-VHD.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  3. Anonymous
    2021-06-01T02:11:48.327+00:00

    Hi Samy,
    To shrink a volume you can refer to this:
    https://learn.microsoft.com/en-us/windows-server/storage/disk-management/shrink-a-basic-volume

    Also as Patrick has mentioned, to apply the changes you made to the disk, you need to optimize it after resizing.
    For resizing:
    https://learn.microsoft.com/en-us/powershell/module/hyper-v/resize-vhd?view=windowsserver2019-ps

    And for optimizing:
    https://learn.microsoft.com/en-us/powershell/module/hyper-v/optimize-vhd?view=windowsserver2019-ps

    Thanks for your Time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Anonymous
    2021-06-01T08:47:40.663+00:00

    Hi Samy,
    Maybe you can refer to this:
    https://www.altaro.com/hyper-v/shrink-hyper-v-virtual-disk-vhd-vhdx/
    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    If it doesn’t work, you might want to try Powershell commands:
    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/shrink

    Thanks for your Time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  5. Anonymous
    2021-06-07T12:30:33.55+00:00

    Just checking if there's any progress or updates?

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.