Choosing the right format for the right scenario is critical when it comes to performance and management of virtual hard disks (VHDs). We'll look at the pros and cons of the three methods -- fixed, pass-through and dynamic disks -- and highlight some necessary steps to maintain VHDs and reduce unnecessary I/O in your virtual environment.
Pass-through disks: Best performance, greatest loss of benefits (Hyper-V only)
In short: Pass-through allows Hyper-V VMs to directly access physical hard drives.
Pros: One major advantage of Hyper-V is its inherent ability to directly access the host's hardware (Type 1 Hypervisor).There's no need to handle the virtual hard disk layer, which, thanks to a decrease in CPU utilization, gives you the best performance of all three choices. There's also the advantage of mapping a SAN (Storage Area Network) unit to Hyper-V, giving you more flexibility. Another plus: You're not stuck with Hyper-V's current 2 TB VHD limit -- you can essentially throw in multiple TB hard disks and use within your virtual machines. If your scenario requires such massive storage options at maximum performance, you are basically forced to use pass-through (or wait for Hyper-V 3.0).
[ Windows 8 Hyper-V and MinWin: A game changing strategy? | Sign up for ITworld newsletters ]
Cons: In most scenarios, however, the possible downsides outweigh the benefit. First of all, you lose the ability to take snapshots, which is a no-go for some admins. Second, the physical hard disk must be taken offline -- you must exclusively use it with your Hyper-V machine, as outlined here.
Fixed VHDs: Great performance and portability
In short: Fixed-size VHDs occupy a pre-defined amount of disk space.
Pros: A fixed-size VHD has the best performance of all virtual hard disk formats; there's barely a difference in speed when compared to the pass-through method. For an extremely advanced performance analysis of VHDs, check out this Microsoft whitepaper entitled "Virtual Hard Disk Performance" (35 pages of pure performance considerations for all three disk formats). Obviously, having a single VHD file that contains all VM data makes it easy to manage, migrate and backup. Besides, by imposing a limit to its size, the VM is in no position to run amok and eat up your physical server's hard disk space, which might bring it down (and other VMs with it!).
Cons: Creating a fixed size VHD takes a bit of time as Hyper-V needs to zero out the allocated space in order to create the VHD file. However, Microsoft greatly improved disk creation performance with R2, so this is only an issue if you're deploying new VHDs regularly. And keep in mind: the size of your VHD needs to be calculated based on your needs in order to avoid wasting disk space or running into problems later.
Dynamic VHDs: Good performance and saves space
In short: Dynamically sized (or differencing) VHDs expand based on current needs. They always start at a couple of KB and expand as the OS, applications and data get written to the VM.
Pros: Dynamic disks were often frowned upon. That changed a bit when Hyper-V 2 came out as part of Windows Server 2008 R2, which sported improved performance of dynamic VHD files. According to this MSDN post, writes to a fixed drive were up to 3x faster than writes to a dynamic drive in WS08 SP2 when compared to R2. A dynamically sized VHD sports good overall performance (still a bit lower than a fixed drive) and it also saves disk space -- if that is an issue in your scenario. And you can use the VHD compactor to reduce its size again.
Cons: During the expanding process, write performance still suffers momentarily. If your VMs need to deliver top performance 24/7, you should consider going with a fixed-sized VHD.