If you are trying to figure out how much RAM you have left for virtual machines then this is the post for you.
When Microsoft launched Dynamic Memory with W2008 R2 SP1, we were introduced to the concept of a host reserve (nothing to do with the SCVMM concept); the hypervisor would keep so much memory for the Management OS, and everything else was fair game for the VMs. The host reserve back then was a configurable entry in the registry (MemoryReserve [DWORD] in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization). Things changed with WS2012 when we were told that Hyper-V would look after the reserve and we should stay away from it. That means we don’t know how much memory is left for VMs. I could guess it roughly but I had no hard facts.
And then I saw a KB article from about a month ago that deals with a scenario where it appears that a host has free memory but VMs still cannot start.
There’s two interesting piece of information in that post. The first is how to check how much RAM is actually available for VMs. Do not use Task Manager or other similar metrics. Instead, use PerfMon and check Hyper-V Dynamic Memory Balancer\Available Memory (instance: System Balancer). This metric shows how much memory is available for starting virtual machines.
The second fact is is the size of the host reserve, which is based on the amount of physical RAM in the host. The following table is an approximation of results of the algorithm:
Microsoft goes on to give an example. You have a host with 16 GB RAM:
- The Mangement OS uses 2 GB.
- The host reserve is up to 2.5 GB.
- That leaves you with 11.5 GB RAM for VMs.
So think about it:
- You log into the host with 16 GB RAM, and fire up Task Manger.
- There you see maybe 13.5 GB RAM free.
- You create a VM with 13 GB RAM, but it won’t start because the Management OS uses 2 GB and the host reserve is between 2-2.5 GB, leaving you with 11.5-12GB RAM for VMs.