Share via


Freeing memory for Hyper-V VMs on Windows 8/8.1


Alexander Miloev takes us through an interesting exercise in tuning the memory for Windows client Hyper-V.


Sometimes when I try to start a VM on my Windows 8.1 laptop, I get an error message saying that there is not enough free memory to match the start-up RAM of my VM:

An Error Occured While Attempting To Start the Selected Virtual Machine
On a “normal” Hyper-V server, it is strongly recommended not to run anything other than management software and security agents in the Management OS. The parent partition, where Management OS is running, is just another virtual machine, although crucial and privileged. Because services and processes needed for operation of Hyper-V are running inside Management OS, hypervisor monitors its runtime health and dynamically determines how much memory can be safely allocated to virtual machines.

Now, when I enable Hyper-V on my Windows 8.1 laptop, the installed copy of Windows becomes the Management OS, and this is where I run every bit of software I use, from Outlook and Excel to PowerShell scripts, IE, and even Spotify client.
Usually, my applications use a lot of RAM, and when I try to start a VM, there might not be enough free RAM for the hypervisor to allow it and I get the error on the screenshot above.

 

Physical Memory Allocation

Most people will start closing desktop applications like Outlook or Word in order to free RAM, but I like my Outlook open, thank you, so I will show you a better way by using a free Sysinternals tool by Mark Russinovich, called RAMmap.

When you start RAMMap, it shows a “map” of the memory:

Sysinternals RAMMAP

On the top there is an “Empty” menu, so I click on “Empty Working Sets”

Sysinternals RAMMAP - Enpty Working Sets

 

..and press F5 to refresh:

Sysinternals RAMMAP - After Refresh

Wow, now I have more that 5GB on standby, all my apps are still working and I can start my VM(s) nowSmile with tongue out:

VM Now Able To Start

 


Published by MSPFE editor Rhoderick Milne, who is currently wondering if three venti coffees a day are actually a bit much! 


Comments

  • Anonymous
    February 05, 2014
    Thanks great tip
  • Anonymous
    February 09, 2014
    Nice, Im already using it...
  • Anonymous
    March 21, 2014
    Thanks a lot for the post..it was really helpful
  • Anonymous
    May 15, 2014
    Pingback from Freeing memory with RAMMap (sysinternals) | Jacques DALBERA's IT world
  • Anonymous
    January 16, 2015
    Many thanks!!! You saved me!