Hyper-V Host Freezes When Dynamic Memory VM’s Use All RAM

This is a scenario I saw today when I configured a pair of virtual machines with Dynamic Memory and used up all available RAM.  The Hyper-V parent partition locked up and became non responsive.  The VM’s were fine; they continued working away.

The fault as I found, was mine, and mine alone.  Virtual Machines with Dynamic Memory enabled could consume all memory on the host, leaving nothing for the parent partition.  That’s why we have a new registry key:

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion Virtualization
  • RED_DWORD value
  • Name = MemoryReserve
  • Setting = amount of MB to reserve for the parent partition, e.g. 2GB RAM (search my blog for details on memory for the parent partition).

You must reboot the host after setting this registry value.  I forgot to do this and the setting did not become effective.

My host has 8GB RAM.  Both VM’s were configured with 512-4096MB RAM.  The parent was using around 1.5GB.  You can do the maths: 4096 + 4096 + 1536 > 8192.  Every byte of RAM appeared to be consumed when I pushed the VMs to their achievable maximum.  The parent partition was locked up because it had no RAM to do anything.  The only recourse was to do a hard reset.

BTW, the tool I used to force the VMs to consume memory was consume.exe from the Windows SDK.  It’s a free download.

EDIT #1

Just to repeat: the problem was caused by my mistake.  I should have rebooted after setting the registry value.  And thanks to Serdar who has patiently answered a whole bunch of questions.

Please follow and like us:

2 Replies to “Hyper-V Host Freezes When Dynamic Memory VM’s Use All RAM”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.