Allocating over 4gb of RAM for a vm guest

Discussions related to using VirtualBox on Mac OS X hosts.
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post by Perryg »

Did you even try holding the 6 & 4 keys down when you booted?
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post by hinto »

Yes. That was the first thing I did.
-H
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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.
rpmurray
Volunteer
Posts: 918
Joined: 3. Mar 2009, 00:29
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, Mac OS X (various flavors)
Location: Between Heaven and Hell

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

Post by rpmurray »

Cool, but VirtualBox is not a 64-bit app.
hinto
Posts: 21
Joined: 16. Apr 2012, 15:12
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Win7

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

Post 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
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

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

Post by michaln »

rpmurray wrote:Cool, but VirtualBox is not a 64-bit app.
What are you talking about?
rpmurray
Volunteer
Posts: 918
Joined: 3. Mar 2009, 00:29
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, Mac OS X (various flavors)
Location: Between Heaven and Hell

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

Post by rpmurray »

Macs with 64-bit EFI have been around since 2008.
rpmurray
Volunteer
Posts: 918
Joined: 3. Mar 2009, 00:29
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, Mac OS X (various flavors)
Location: Between Heaven and Hell

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

Post 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.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

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

Post 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).
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

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

Post 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.
Post Reply