Page 1 of 2

Max RAM size for VM

Posted: 13. Sep 2016, 18:53
by Selin
Please, help me to find any official information about maximum RAM size which can be assigned to one VBox VM.
The reason of my request - is in very unstable behavior of VM if more than 128GB RAM is assigned to it.
I have a server with 256GB RAM (FreeBSD 10.3; VBox 5.1.4.110228)
I need to test some applications on Windows Server 2008+ with different size of RAM.
I'd created VM, Installed Windows with all updates and VBox Guest Addition and created clean snapshot.
Everything works perfect until I assign more than 128GB RAM to the VM.
But when I assign more than 128GB RAM to the VM - the guest system may crash even without any activity on it (i.e. simply boot with clean snapshot and do nothing for some time - it crashes).
I've tested the physical RAM - everything is OK.
I'd tried to run several VMs with 252GB VM RAM in total (i.e. two VM clones with 128GB and 124GB) - no problem even with full load of both of them.
But when I try to assign more than 128GB RAM to one VM - it crashes. It may lead even to halting the host.
Guest OS supports up to 2TB of RAM and works ok on this physical server, but I prefer to have VMs to easily switch between OSes, snapshots; change RAM size, CPU numbers, etc.

If anyone know how to fix/workaround this problem - I'll appreciate for sharing the know-how.
Thank you.

Re: Max RAM size for VM

Posted: 13. Sep 2016, 20:32
by Selin
Updated to the latest VirtualBox 5.1.6 - nothing changed.

Re: Max RAM size for VM

Posted: 14. Sep 2016, 00:31
by socratis
Selin wrote:help me to find any official information about maximum RAM size which can be assigned to one VBox VM.
Well, it's not a matter of what is the maximum memory that can be assigned. If you have it, you can assign it, like you did. The problem is that it crashes if it is above 128 GB. This sounds more like a bug. So you should head to the bugtracker and file a bug report.

Finally, do you have a spare system that I can test this on? I promise I'll return it soon... ;)

Re: Max RAM size for VM

Posted: 14. Sep 2016, 01:13
by Selin
Thanks for reply, socratis
Unfortunately, I cannot share the server, but I can provide any info/logs/etc you need to investigate.
I can run almost any test you need to investigate this issue as well.

Re: Max RAM size for VM

Posted: 14. Sep 2016, 01:23
by socratis
Well, since you asked for it, I can take a look. But I don't expect to see too much, that's why I didn't suggest it.
  1. Start the VM. Not from a saved or suspended state. Clean start.
  2. Wait for the VM to crash.
  3. Right-click on the VM in the VirtualBox Manager. Select "Show Log..."
  4. Save it (just the first log), ZIP it and attach it in your response (see the "Upload attachment" at the bottom of the form).

Re: Max RAM size for VM

Posted: 14. Sep 2016, 12:53
by Selin
Ok.
I'll do it this evening.
Thanks.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 00:03
by Selin
Here is the log (attached).
I've installed new Windows guest with 128GB RAM
Install VBox Guest Addition
Increase RAM size up to 252GB
Start VM
In a few minutes after starting it fails.
Please, review and suggest possible solution/workaround.
Thank you.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 12:39
by mpack
Well here's something you don't see every day...
VBox.log wrote: 00:00:00.011697 Host RAM: 262002MB total, 825MB available
...
00:00:00.851983 RamSize <integer> = 0x0000003f00000000 (270 582 939 648, 252 GB)
Note the distinction between MB and GB.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 12:57
by Selin
I'm sorry, but what does that mean?
And what shall I do to fix it?
Shall I adjust VM RAM size (decrease it to leave more RAM for the host) or take into account some non-obvious VBox feature (which way?), something else... ?

Thank you

Re: Max RAM size for VM

Posted: 15. Sep 2016, 14:11
by scottgus1
It says you have a warehouse of memory available, and the warehouse is almost entirely full of other boxes. So to speak...
Out of almost 256 gigabytes, or 262,002 megabytes, you have only 825 megabytes available to run your guest in.
Something else on your host is really chewing up your ram.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 14:57
by mpack
You can't squeeze a quart into a pint pot. The fix is to provide an empty quart pot.

A VM is not an emulated processor. It's running a real OS on a real processor with real RAM. You can't give it RAM you don't have (which includes RAM already being used for something else).

VT-x is way more than a CPU mode. I found a page which explains it quite well here: http://www.hardwaresecrets.com/everythi ... hnology/2/. Note that this is basic CPU virtualization using VT-x. It doesn't cover the newer Haswell features.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 18:19
by Selin
Maybe I'm simply tired, but still not clear with the issue and solution :(
Do you mean 'simply reduce RAM size for the VM' ?
Does it mean I cannot assign more than a half of RAM to one VM?

I have an Intel Xeon E5 1650 v3 CPU: http://ark.intel.com/products/82765/Int ... e-3_50-GHz
Looks like it supports VT-x as well as all other technologies related to virtualization...
Or I've miss the key from the article you suggested?

Re: Max RAM size for VM

Posted: 15. Sep 2016, 18:29
by Selin
Maybe I need to disable PAE/NX?
As I understand from this MSDN article - it is needed for 32 bit systems only.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 18:41
by socratis
Selin, when you launched that VM you had less than 1 GB free. You tried to assign 252 GB to the guest. Do you see the problem?

Actually do me a favor. Repeat the run. Assign not 252, but 192 GB of RAM. Before you launch the VM use 'top' to see how much free RAM you have on your host. Wait for the crash and post the log, along with the information you got from 'top'.

Re: Max RAM size for VM

Posted: 15. Sep 2016, 18:47
by Selin
Aha... I've got it. Thank you.
But it looks strange that VBox reports so low RAM available. The native FreeBSD monitor (top) reports quite different values...
On the other hand - with the same RAM available (from the VBox point of view) it runs VM with 128GB of RAM perfectly.
I'll try to continue investigation this evening and provide you new logs.
Thank you for assistance.