Unable to allocate and lock memory

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
manavid
Posts: 1
Joined: 3. Dec 2009, 11:32
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: FreeBSD 8 AMD64, Linux 2.6 AMD64, Windows 2003 32 Bit

Unable to allocate and lock memory

Post by manavid »

I have a MacPro with 12GB mem.

I was trying to install Windows 2003 with 3584 MB memory. During the installation I get the following error:

Code: Select all

...
00:01:09.664 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VERR_NO_MEMORY rcSeed=VINF_SUCCESS cHandyPages=0x10
00:01:09.664      cAllPages=0xe846f cPrivatePages=0xbbcf2 cSharedPages=0x0 cZeroPages=0x2c77d
00:01:09.665 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VERR_NO_MEMORY rcSeed=VINF_SUCCESS cHandyPages=0x10
00:01:09.665      cAllPages=0xe846f cPrivatePages=0xbbcf2 cSharedPages=0x0 cZeroPages=0x2c77d
00:01:09.665 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2)
00:01:09.665 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
00:01:09.665 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
00:01:09.666 ERROR [COM]: aRC=NS_ERROR_INVALID_ARG (0x80070057) aIID={e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000} aComponent={Display} aText={Argument address is NULL} aWarning=false, preserve=true 
00:01:09.666 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"
I should note when the error occurred I had about ~7.5 GB free mem and ~3.5 GB wired.

Any suggestions?

Attached is the complete log file.

Cheers,

- Moe
lmj
Posts: 1
Joined: 3. Dec 2009, 15:25
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu 9.10 64bit, win xp pro

Re: Unable to allocate and lock memory

Post by lmj »

Hi,

I'm getting the same thing. I'm running MacOSX Snow Leopard 10.6.2 on a early-2009 macpro with 16gb memory. My guest is Ubuntu 9.10 in 64 bit. The guest OS boots fine and is usable until I run a program that requests 2.6gb of memory.

--L
masonlee
Posts: 5
Joined: 14. Jul 2009, 00:49
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: OpenSolaris 2009.6

Re: Unable to allocate and lock memory

Post by masonlee »

I have a bug ticket filed for a similar sounding problem when running a guest with 3.5GB ram. Changing the guest ram to 3GB worked around the problem.

http://www.virtualbox.org/ticket/5649
buffyg
Posts: 3
Joined: 29. Oct 2009, 03:17
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: OpenSolaris, Ubuntu, OpenBSD

Re: Unable to allocate and lock memory

Post by buffyg »

Any update on this? I'm seeing a version of this problem on an early 2008 Mac Pro with 12GB RAM running Mac OS X 10.5.8. Even with about twice as much memory free as what I'm trying to give the VM, I've been having problems getting VirtualBox to use even the full amount available to a 32-bit process and have updated your ticket with the details of the errors I'm seeing.
jj-
Posts: 1
Joined: 7. Jun 2010, 21:05
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Windows 2003, Qimo4Kids,

Re: Unable to allocate and lock memory

Post by jj- »

Same problem here. I am using VirtualBox 3.2.0 r61806 on a Macbook Pro OS X 10.6.3 with 8GB of RAM as host. Windows 2003 as guest. If I allocate 3584 MB of RAM, I get the "unable to allocate and lock memory" error mentioned here. If I lower the RAM (I randomly picked 2892 MB), then it works. I haven't try to figure out the exact threshold. I have verified in Activity Monitor that there is sufficient RAM available to run at 3584 MB.
tjm
Posts: 5
Joined: 15. Jul 2010, 06:54
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: windows XP 64-bit

Re: Unable to allocate and lock memory

Post by tjm »

Would love some feedback on this issue! I, too, am having this problem. I'm using VirtualBox 3.2.6 on Mac OS X 10.6.4 with Windows XP 64-bit guest. It seems to halt/pause right around 3gb of memory allocation.

Thanks for any help that can be given!
tjm
Posts: 5
Joined: 15. Jul 2010, 06:54
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: windows XP 64-bit

Re: Unable to allocate and lock memory

Post by tjm »

***SOLUTION***

Run your host OS in 64-bit mode! To do this: hold down '6' and '4' when booting up or right after restart. To go back to 32-bit: '3' and '2'. After some digging I found out that Mac OS X 10.6.x runs a 32-bit kernel by default... no wonder we couldn't allocate more than 3-4gb of memory! From what I understand about a 32-bit OS (kernel) is that it won't recognize more than 2gb of memory, I think. So, anyways, this makes sense now!

Thank you and good luck all!!!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Unable to allocate and lock memory

Post by Sasquatch »

tjm wrote:From what I understand about a 32-bit OS (kernel) is that it won't recognize more than 2gb of memory, I think. So, anyways, this makes sense now!
A 32 bit OS can see 4 GB max, but due to some miscalculations in the past, the last 512 MB is reserved for hardware addresses, so you have 3,5 GB available tops. In some cases, you end up with 3.2 or even 3.0 GB.
But yeah, running in 32 bit mode isn't going to cut it if you're trying to allocate more than 4 GB RAM.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
akj850
Posts: 1
Joined: 12. Nov 2010, 17:27
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP, Ubuntu

Re: Unable to allocate and lock memory

Post by akj850 »

Has anyone found a workaround for this problem? I have a Mac Pro 2006 with 13G of memory. Apparently, the 64-bit kernel mode is not possible on this device and the highest I can reliably set my memory for a virtual machine is 1G, which is quite limiting.

I have updated to 3.2.10 and still have this problem.

Any help is appreciated!
Post Reply