Hyper-V Program Manager
I have had a couple of days off for Christmas, and once the children were happily playing with their new presents, my mind naturally turned to some outstanding server maintenance that I needed to do.
Top of my list was completing the process of switching all of my servers over to fixed virtual hard disks.
There are two reasons why you should use fixed virtual hard disks in production environments:
Given that my servers are only used by me and my family – performance is not a big concern. And for a long time now I have been using dynamically expanding virtual hard disks for all my server virtual machines. But recently I had a big problem. One of my virtual machines started chewing up huge amounts of space. The result was that my Hyper-V server ran out of space and paused all of my virtual machines (to stop any of them from crashing). When this happened I did some emergency space management, but left most of the virtual machines still using dynamic virtual hard disks.
Converting a virtual machine from a dynamic virtual hard disk to a fixed virtual hard disk can be quite tricky. So this week I am going to blog about some of the tips-and-tricks that I have picked up in the process of switching over to fixed virtual hard disks.
I deal with the risk of disk space oversubscription slightly different. I create dynamic virtual disks at maximum size. After setting up a virtual machine I resize the partition inside the VM to an appropriate size. Maybe 40GB for OS partition. That limits the maximum size of this disk, but still enables me to extend it easily if more space is required. This should be part of everyone VM best practice.
It sure would be nice of Hyper-V had an option for Dynamic with Max size. Short of that I really like @magriiiii's comment of setting the partition size inside of the VM to limit growth.
Are their any guidelines regarding the free space left on the host's HDD when using fixed VHDs? 5-10%?
Suggestion: It would be very helpful for people researching in the future, to know what version of server/Hyper-V you are talking about in these posts. Thanks.