Is it possible to assign more video memory in VirtualBox?

24

4

I am currently using VirtualBox to run a Fedora 15 VM. While changing my settings, I allocated 128MB of video memory, as well as enabling 3D acceleration.

Is there any way to assign more video memory? If not, why is it limited to 128MB?

Simon Sheehan

Posted 2011-06-06T20:55:32.417

Reputation: 8 641

@Zoredache I amazed!!! why users don't have any solution about a question and just keeping ask why you want to do that? – QMaster – 2018-08-03T16:54:29.803

@QMaster, I ask why, because I am partly here to learn, and knowing why someone wants to do something may help me learn something. I ask why because sometimes the person asking is approaching a problem in an unusual way, and sometimes I can provide an alternative that is better. I ask why so the question will have a better description so that it may be easier for someone else with the same problem that wants to find it. TL;DR Asking why a person wants to do something when it isn't clear usually improves the question/answer. – Zoredache – 2018-08-03T19:10:05.633

@Zoredache You right, But I didn't see any other advice from you about the problem. So after 2 days of searching and just getting this type of "WHY?!" answers and nothing else without any success, I'm sure you understand my irritation. – QMaster – 2018-08-04T10:55:03.607

1What are you doing in a VM that you think would be helped by providing more video memory? – Zoredache – 2011-06-06T22:34:36.723

I was interested in testing Compiz on there for fun, and figured a little extra memory may help. I also wondered why i was limited anyway – Simon Sheehan – 2011-06-06T22:46:33.363

Answers

17

You can do it from the command line. This example will increase the video memory to 256MB:

<~> $ vbm showvminfo WinXP-SP3 | grep VRAM
VRAM size:       128MB

<~> $ vbm modifyvm WinXP-SP3 --vram 256

<~> $ vbm showvminfo WinXP-SP3 | grep VRAM
VRAM size:       256MB

Note:vbm is actually an abbreviation for vboxmanage.

Joe Casadonte

Posted 2011-06-06T20:55:32.417

Reputation: 3 945

1Worth mentioning for those who don't use virtualbox that often (like me): vbm is an alias for vboxmanage, so you either need to create this alias or just replace vbm with vboxmanage in the above commands. – joelostblom – 2014-04-21T02:41:57.590

8

The upper limit provided by VirtualBox is 256Mb, regardless of the capability of your host hardware/GPU.

For example running:

vboxmanage modifyvm MyVMBoxName --vram 1024

Gives this error:

VBoxManage: error: Invalid VRAM size: 1024 MB (must be in range [1, 256] MB)
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
Context: "COMSETTER(VRAMSize)(ValueUnion.u32)" at line 417 of file VBoxManageModifyVM.cpp

Would be great if there was a way to assign more video memory to a VM as my Win7 use is pretty extensive e.g. for Photoshop.

Leo Sen

Posted 2011-06-06T20:55:32.417

Reputation: 81

3

go to your virtual machine display properties and put monitor count at max; this will also give you the max ceiling for video memory just above it. go on and move your slider for video memory all the way to max and ok it. start your virtual machine. let your virtual machine run for a few minutes then shut it down. go back into the virtual machine display properties and bring monitor count back down to one. video memory will remain at max level from now on.

MOS

Posted 2011-06-06T20:55:32.417

Reputation: 31

This worked well for me - don't need to install anything or mess with any commands. Thanks! – DMan – 2016-11-13T18:17:58.053

Worked perfectly for me as well. Thanks. – Shai – 2019-08-22T17:58:00.583

0

Alternatively (if you are using mac),

1) in virtualbox, right click on the VM -> showinfinder

2) edit the xxxxxxx.vbox file with an editor

3) scroll down to the line

... Display VRAMSize="128" monitorCount="1" accelerate3D="true" accelerate2DVideo="false"/>

4) change the value to 256

... Display VRAMSize="256" monitorCount="1" accelerate3D="true" accelerate2DVideo="false"/>

and save.

Note: Remember to backup /clone your current image for safety. As above try to set within 256 mb. And finally do not run this while your VM is running. :) good luck.

PC should be similar, you just have to find the vbox file.

Jimmy M.G. Lim

Posted 2011-06-06T20:55:32.417

Reputation: 111