question

ghust10-0825 avatar image
0 Votes"
ghust10-0825 asked DSPatrick answered

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

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-server-hyper-v
image.png (15.5 KiB)
image.png (29.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
1 Vote"
DSPatrick answered

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--






5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ghust10-0825 avatar image
0 Votes"
ghust10-0825 answered ghust10-0825 edited

Thanks @DSPatrick!

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



image.png (15.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered

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



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ghust10-0825 avatar image
0 Votes"
ghust10-0825 answered

Still don't have it.

105253-image.png



image.png (30.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered

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/











5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.