Hyper-V and VM memory allocation

I am very new to Hyper-V configuration, so please forgive me if this question seems very easy and ignorant.

I have a Windows 2008 R2 server that I have setup as a Hype-V server with 5 VM instances on it.

The problem I am having is with the last, (5th), VM instance.  No matter what I do to manipulate the memory of the server, I still get the error message of, "Not enough memory in the system."

Here is the configuration of the server:

- 16GB available RAM on host instance at boot
- 4 VMs x 2GB RAM (static) start w/o error; each has single disk of 127GB
- 6.6 GB RAM free on host instance after starting above VMs
- 5th VM configured at either 2GB, 3GB or 4GB RAM (static) will not launch -- "Not enough memory in the system"

Here is what I have done so far to try and fix the problem with no success:

- removed File Server role so that only role installed is Hyper-V
- disabled Print Spooler service
- created / set HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\MemoryReserve at the minimum recommended (512MB)

Has anyone run into this issue?  And if so, how did you rectify it.  ANY suggestions would be greatly appreciated.

Thank you,
Jeff
jgrammer42Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

R_EdwardsCommented:
do you have enough HD space for the VM?
jgrammer42Author Commented:
R_Edwards,
I believe so yes.  As noted above each VM is allocated 127GB's.  The server itself has 1TB of disk space.

Currently there is 665 GB's of used space, and 449 GB's of free space available.  (And this is after all of the VM's had been allocated.)

Was there something else with regard to disk space I should be looking for?

Thank you,
Jeff G.
R_EdwardsCommented:
Jeff,
     No i was just looking at other reasons for your error.  Have you started the physical machine up with no running VM's (completely off, not paused) and started Task Manager, then onr by one started the VM's?  This will tell you what each VM is doing on startup.  if there is nothing odd, try reducing the sizes of each VM to 1GB and see if the 5th will start.

-=Richard
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

jgrammer42Author Commented:
Richard,
To your first question:  Yes.  I have booth the physical machine up with no VM's at all running.  When I have TaskMgr running and starting each VM session one by one, here is what I am seeing after loading 4 VM's.

Total Mem  16358 (MB)
Cached   395 (MB)
Available 6660 (MB)
Free  6300 (MB)

When I start the 5th one, I get a window pop-up with the error: "Not enough memory in the system to start virtual machine QAHC with ram size of 2048 megabytes"

I will drop each VM to 1MB and see what happens, and report back here when I get the information.

Thank you,
Jeff
jgrammer42Author Commented:
Richard,
Ok, here is what happens with all five VM's set to 1024MB of RAM.  Everything works great.  All 5 VM's come up and run fine with all of them defined with only 1GB of RAM.  

So, I shutdown all of the VM's again.  Changed 4 of them to 2048MB's of RAM and left the 5th VM set to 1024MB of RAM.

Again all 5 VM's came up and were running then.

However, because of the applications that I am going to be running on these VM's I must have 2GB's of RAM for each VM.

Do you have any idea why the 5th VM has to have only 1GB of RAM when there is at least 6GB available as "free"?

(I should also note it does not matter WHICH of the VM's I designate as the 5th one, it will happen regardless of which one I randomly select to be the 5th one to bring up)

Thank you,
Jeff
R_EdwardsCommented:
Jeff,
     Have you enabled NUMA spanning in your HyperV settings?  if not enable it i bet that will solve your issue.

Non Uniform Memory Access (NUMA) relates to machines with multiple processors with each processor controlling and directly connected to specific blocks of memory via a bus known as local memory. The best performance comes from processes running on processor cores using local memory, rather than having to "span" NUMA nodes. This means the memory required is connected to another processor, known as foreign memory or remote memory and has a higher latency than using local memory.

By default, Windows Server 2012 enables NUMA spanning, which provides the most flexibility as virtual machines (VMs) can access and use memory in any NUMA node. But it may result in lower performance compared to forcing VMs to use memory on the same NUMA node as the processor cores.

By disabling NUMA spanning, you ensure that VMs use memory and processor cores in the same NUMA node, giving the best performance. However,  it could also mean there is a potential that VMs may not be able to start if the required amount of memory for the VM isn't available on a single NUMA node.

This should only be changed once, if, as an administrator, you feel comfortable with NUMA and the implications of disabling and also if you have some additional management suite that can help ensure best configuration.

To configure NUMA spanning, open the Hyper-V Settings and select the NUMA Spanning option

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jgrammer42Author Commented:
Richard,
That DOES appear to have fixed the problem!!

Apparently, when I installed Hyper-V NUMA was disabled.  I thought it was Enabled by default.  Once I enabled NUMA, and then rebooted the physical server. ALL 5 VM's came up and were running with 2GB of RAM.

Thank you very, very much!

Jeff
jgrammer42Author Commented:
Excellent support.  Thank you very much!
R_EdwardsCommented:
My pleasure.  Glad you are up and working
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Virtual Server

From novice to tech pro — start learning today.