Page 2 of 4

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 16:06
by hinto

Code: Select all

sudo systemsetup -setkernelbootarchitecture x86_64
is supposed to switch, but maybe the install gremlins left the 64 bit kernel off.
Thanks for the info on where I need to check.
-Hinto

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 16:10
by Perryg
Did you even try holding the 6 & 4 keys down when you booted?

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 17:22
by hinto
Yes. That was the first thing I did.
-H

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 20:09
by hinto
OK...
Looks like it is a VirtualBox bug. I'm running a MacPro1,1 (Late 2006)
It has a 64 bit CPUs and is 64 bit capable, but it runs the 32 bit kernel.
From Apple's site, the 32 bit kernel is fully capable of running 64 bit applications.
I can verify that since I am developing 64 bit applications in Xcode.
Is there a way to force VirtualBox to run in 64 bit mode? If not, then it's a bug in VB on the OSX platform.

-Hinto

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 20:17
by Perryg
hinto,
You are running the guest is 64-bit mode or it would not work at all. The issue with the 4GB threshold is the host is running in 32-bit mode.
You can over-ride this by using the CLI and VBoxManage to set the memory higher, but the GUI is set to 4GB max to the guest if on 32-bit hosts.

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 20:22
by hinto
Yes,
I know it's the 32 bit Kernel, but Apple says it can run 64 bit applications.
I'll try the override.
-H

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 20:26
by hinto
Nope...
This is what it gives

Code: Select all

VBoxManage modifyvm "LiveCD" --memory 5120
VBoxManage: error: Invalid RAM size: 5120 MB (must be in range [4, 3584] MB)
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
Context: "COMSETTER(MemorySize)(ValueUnion.u32)" at line 409 of file VBoxManageModifyVM.cpp

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 21:15
by hinto
From: http://www.anandtech.com/show/4485/back ... -review/21
Core 2 Duo-equipped Macs that don’t support OS X’s 64-bit kernel or 64-bit EFI can still run 64-bit apps, which can address more than 4GB of RAM.

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 21:23
by rpmurray
Cool, but VirtualBox is not a 64-bit app.

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 21:30
by hinto
Bummer.
The 64 bit chip has been around since 2003. That's ancient these days.
http://www.answers.com/topic/x86-64
-H

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 22:01
by michaln
rpmurray wrote:Cool, but VirtualBox is not a 64-bit app.
What are you talking about?

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 22:03
by rpmurray
Macs with 64-bit EFI have been around since 2008.

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 22:04
by rpmurray
michaln wrote:What are you talking about?
I'm saying that when I run VirtualBox on my Mac Pro it tells me that it's a 32-bit app.

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 22:07
by michaln
hinto wrote:Bummer.
The 64 bit chip has been around since 2003. That's ancient these days.
http://www.answers.com/topic/x86-64
-H
Well, yeah. The Core 2 Duo is ancient too, so by that token you'd better toss it out and get something better ;)

FYI, on my MacBook Pro, (running OS X Lion), I have no trouble giving more than 4GB RAM to a VM. But that's on the 64-bit OS X kernel.

In case you care... the OS X design is "interesting" (another word for crazy) and can run 64-bit apps on top of a 32-bit kernel. Sure, you can run 64-bit apps, but VirtualBox isn't any old app and runs quite a lot of code in kernel context. Since the kernel code is 32-bit, that kind of puts a damper on things.

Yes, it would be technically possible to support more than 4GB RAM even on 32-bit OS X kernels. So far no one provided a business case for that ("it's a bug" is not one).

Re: Allocating over 4gb of RAM for a vm guest

Posted: 17. Apr 2012, 22:16
by michaln
rpmurray wrote:
michaln wrote:What are you talking about?
I'm saying that when I run VirtualBox on my Mac Pro it tells me that it's a 32-bit app.
The bitness of the VirtualBox app follows the kernel bitness, on OS X and all other platforms. Linux, Windows, and Solaris all had 64-bit kernels in 2004-2005, with OS X it took until 2009. And the algorithm to decide which systems will run the 64-bit kernel and which won't is, shall we say, interesting.