question

protech-6243 avatar image
0 Votes"
protech-6243 asked LimitlessTechnology-2700 answered

Fixed vs Dynamic disks

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-server-hyper-v
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.

learn2skills avatar image
0 Votes"
learn2skills answered

Hi @protech-6243

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.


image.png (104.4 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.

protech-6243 avatar image
0 Votes"
protech-6243 answered

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

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.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello,

here is an official documentation on Hyper-V How To: Plan HA VMs
https://docs.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,

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.