Fixed vs Dynamic disks

pro tech 46 Reputation points
2021-09-21T11:29:36.317+00:00

Hi

Can anyone point me to a link that shows the correct official guidance from Microsoft as to if fixed or dynamic VHD's or VHDX's should be used in a production enviroment?

Thanks

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

3 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 15,256 Reputation points MVP Volunteer Moderator
    2021-09-21T13:23:10.367+00:00

    Hi @pro tech

    Dynamic VHDs
    All VHDs are just files. They have a specialized format that Hyper-V and other operating systems can mount in order to store or retrieve data, but they are nothing more than files. A dynamic VHD has a maximum size but is initially very small. The guest operating system believes that it just a regular hard disk of the size indicated by the maximum. As it adds data to that disk, the underlying VHD file grows. This technique of only allocating a small portion of what could eventually become much larger resource usage is also commonly referred to as “thin-provisioning”.

    Dynamic VHD Benefits
    Quick allocation of space. Since a new dynamic VHD contains only header and footer information, it is extremely small and can be created almost immediately.
    Minimal space usage for VM-level backups. Backup utilities that capture a VM operate at the VHD-level and back it up in its entirety no matter what. The smaller the VHD, the smaller (and faster) the backup.
    Over-commit of hard drive resources. You can create 20 virtual machines with 40GB boot VHDs on a hard drive array that only has 500GB of free space.
    Dynamic VHD Drawbacks
    Slower than fixed disks.
    Substantially higher potential for VHD fragmentation.
    The block allocation table always exists in a dynamic VHD, so a fully expanded dynamic VHD will be somewhat larger than a fixed VHD of the same usable size.
    Thin-provisioned volumes in an overcommitted environment could cause the underlying storage to become completely full and lead to other problems.

    Fixed VHDs
    After pass-through and dynamic disks, fixed disks are essentially what you have left. When created, they allocate 100% of the indicated space on the underlying physical media. There is no block allocation table to be concerned with, so the extra I/O load above a pass-through disk is only what occurs within the virtualization stack.

    Fixed VHD Benefits
    Fastest VHD mechanism
    No potential for causing over-commitment collisions
    Always same fragmentation level as at creation time
    Fixed VHD Drawbacks
    VM-level backups capture all space, even unused
    Larger size inhibits portability
    Realistically, the biggest problems with this system appear when you need to copy or move the VHD. The VHD itself doesn’t know which of its blocks are empty, so 100% of them have to be copied. Even if your backup or copy software employs compression, empty blocks aren’t necessary devoid of data. In the guest’s file system, “deleting” a file just removes its reference in the file allocation table. The blocks themselves and the data within them remain unchanged until another file’s data is saved over them.

    Generally, the biggest reason most people will avoid dynamic VHDs is because of the performance difference. Refer to the following illustration to understand where it is different.

    133889-image.png

    more details

    If the Answer is helpful, please click Accept Answer and up-vote, so that it can help others in the community looking for help on similar topics.

    3 people found this answer helpful.
    0 comments No comments

  2. pro tech 46 Reputation points
    2021-09-21T14:18:18.403+00:00

    Thanks for the info, but I was looking for something clarifying Microsoft's current take on this?

    0 comments No comments

  3. Limitless Technology 39,916 Reputation points
    2021-09-21T14:26:22.683+00:00

    Hello,

    here is an official documentation on Hyper-V How To: Plan HA VMs
    https://learn.microsoft.com/en-us/archive/blogs/tonyso/hyper-v-how-to-plan-ha-vms

    I hope that the answer will be helpful for you.

    Regards,

    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.