Thursday, 16 January 2014

Hyper-V: Not Enough Memory to Start Virtual Machine

Just a quick post, to point out the obvious (which wasn't so obvious to me last night)...


You have several Hyper-V machines, all configured to use Dynamic Memory.

You add a new virtual machine, and set the range for the dynamic memory. You specify a range that includes a minimum value for the RAM that is low enough (when combined with the minimum amount of RAM configured on all other virtual machines) not to exceed the total RAM available on the Hyper-V host.

You attempt to start the virtual machine. The virtual machine fails to start, with the error "Not enough memory in the system to start the virtual machine {virtual machine name}."

Oh dear...


Check the amount of "startup RAM" allocated to the virtual machine. If the virtual machine is configured with more startup RAM that the minimum RAM, Hyper-V will attempt to use smart paging. However, when you are installing or upgrading the operating system for a virtual machine (which I was), the virtual machine ignores the dynamic memory settings, and uses only the value configured for the startup RAM.

In this scenario, if there is not enough available memory on the Hyper-V host to satisfy the startup RAM requirements, the virtual machine won't start!

In my environment, changing this value to 8192MB lowered the total used RAM (including the RAM required by the new virtual machine) to a value under 32000MB, which allowed me to start my virtual machine.