Hyper-V VHD, Make a smaller VIrtual Hard Disk.

microchipmatt 6 Reputation points
2021-04-22T22:40:19.52+00:00

Hello Everyone, I have a Hyper-V Guest Machine Running Azure AD connect, and it has a 200 GB VHD attached that is running the OS, and the Azure AD connect tool. Right now only about 20 GB of it is being used. As a result, I would like to Make this VHD Smaller. I want to make the Fixed VHD itself smaller. What are my options for this? Basically I would want to make the VHD about 120GB. Thanks in advance for all your suggestions.

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

1 answer

Sort by: Most helpful
  1. JiayaoZhu 3,926 Reputation points
    2021-04-23T03:40:23.72+00:00

    Hi,

    Thank you for your posting!

    Based on your condition, I would like to firstly check:

    what is your Hyper-V host version and what is your guest VM version?

    This information is useful to make sure that you can conduct the following options.

    Secondly, for shrinking a fixed VHD disk, I suppose I can offer you two ways to complete your task:

    1) Create a new smaller fixed vhd and go to Hyper-V Manager>> Edit disk >> Convert, to copy your original vhd to the new smaller one. Microsoft does offer command Resize-VHD, while for shrinking a disk, it only supports vhdx, vhd file can only use this command for expanding. Besides, I think compacy option and Diskpart tool are not what you want since they only compact your file size of your vhd while the storage capacity of your vhd remains the same. In addition, compact option only works for dynamic vhd.

    2) You can always choose to use some third-party tools to help you shrink your fixed vhd.

    Thank you for your support and understanding! Hope you have a nice day! : )

    Best regards
    Joan


    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

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.