VirtualBox is unable to allocate cached memory on windows (not considering it as available)

  • Host: Windows 7 64x bit, 6 GB of RAM
  • Guest: Red Hat 64x bit

Host machine resources without running any VMs:

Windows Resources

[Case I] Guest machine with 2 GB memory

When I run a memory consuimg process on the guest I get a fatal error from VirtulBox (it's fatal because it crashs the system)

 Error ID: HostMemoryLow
 Severity: Non-Fatal Error

Host memory during the error (MB):

 Total: 6002
 Cached: 2149
 Available: 2133
 Free: 9

Afaik cached memory has inactive data that are unused or already replicated in swap and system should be able to free it in need, and modern OSs keep cached memory to get best useful of larger memories. My guess is that the cause of the problem is either windows can't free large bulk of memory in a sudden, or that VirtualBox doesn't consider the cached memory as available for allocation and returns error as soon as the free memory is full (but still the cached).

[Case II] Guest with lazy memory allocation off

When turning off lazy memory allocation so the hypervisor allocats the full VM memory at its startup using:

VBoxManage setextradata "VM_name" VBoxInternal/RamPreAlloc 1

I faced even wrose scenario that the VM refuses to start with more than 1280 MB and shows error that no enough memory in host machine to allocate, and windows free memory drops to 8 for a moment but still the cached memory the same (reserves high amount of memory) and windows never free it!

 The fatal variant of VINF_EM_NO_MEMORY (VERR_EM_NO_MEMORY)
 Result Code: E_FAIL (0x80004005)
 Component: Console
 Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

VirtualBox isn't able to allocate more than 1280 MB memory regardless to the free or cached memory!

asked on Super User Apr 23, 2015 by M.Allam • edited Dec 17, 2017 by Donald Duck

1 Answer


Solved, the problem was installing 2 pieces of RAM with different bus bandwidth (1066 MHz and 1660 MHz) that made conflict After removing one of them VirtualBox was able to allocate more then 2GB of RAM to the VM even with only 4GB total memory in the host machine

answered on Super User Jun 7, 2015 by M.Allam

User contributions licensed under CC BY-SA 3.0