Reminder: Hyper-V virtual machine dynamic virtual hard disks are good for testing, but not for production

Posted: (EET/GMT+2)

 

So, you've got a brand-new Hyper-V server, and you want to set up some production virtual machines onto it. Hyper-V offers basically two options for storing the virtual disk images: static and dynamic.

With the static option, you create the virtual disk file (.vhdx, usually) initially to that size that is the maximum size of the disk seen by the virtual operating system. That is, if you want to create a 200 GB disk on the virtual machine, you create a physical file of the same 200 GB on the host system (physical server).

On the other hand, dynamic disks create a "virtual" space allocation to the virtual machine. The virtual machine believes it has a full disk at its disposal, but on the host, the .vhdx file only requires physical disk space equal to the amount that the virtual machine actually uses the disk. Thus, a dynamic disk .vhdx file starts small, but grows up to the maximum size, for example 200 GB.

Here lies the problem for using dynamic disks in production machines. If the physical host runs out of disk space while attempting to grow a dynamic disk, the complete virtual machine is suspended. Any operations in the virtual machine as stopped abruptly, and no applications there can run until the situation on the host is solved.

On the other hand, with statically allocated disks, the virtual OS might run out of disk space, but while this is critical, it is not fatal: most applications can still continue to run, even if in less-than-optimal mode.

Something to keep this in mind while allocating virtual machine disks!