How to make Hyper-V VHDX Minimum Size/Size equal to "File Size"?

ghust10 21 Reputation points
2021-06-12T05:19:37.883+00:00

105030-image.png

105061-image.png

No Shrink Option even the VM is off/shutdown state.
[Resize-VHD -Path "D:\Virtual Machine\Hyper-V\Virtual hard disks\xxxx.vhdx" -tominimumsize] will only result to Minimum Size/Size equal.

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

Accepted answer
  1. Anonymous
    2021-06-12T12:04:47.77+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--

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. ghust10 21 Reputation points
    2021-06-13T17:56:28.75+00:00

    Thanks @Anonymous !

    Your answer was helpful but it did not really answer the question on how to make Hyper-V VHDX Minimum Size/Size equal to "File Size"?
    Is this even possible? Is there a way to lower down Minimum Size to match the File Size? Thanks.

    I am trying to achieve this because i only have limited SSD disk space and i cant create another partition anymore. Converting this VM to fixed size will result to a huge file size equal to Minimum Size/Size.

    105098-image.png

    0 comments No comments

  2. Anonymous
    2021-06-13T18:42:06.127+00:00

    I think you should get the option to Shrink after the partition in the VM has it's space freed up.

    0 comments No comments

  3. ghust10 21 Reputation points
    2021-06-14T02:55:46.817+00:00

    Still don't have it.

    105253-image.png

    0 comments No comments

  4. Anonymous
    2021-06-14T18:19:23.873+00:00

    Ok, since the Size and MinimumSize are identical it isn't a candidate for shrinking. A good explanation here by Eric
    https://www.altaro.com/hyper-v/resize-virtual-hard-disks-hyper-v-2016/

    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.