How to assign more than 256MB of video memory in VirtualBox?

I'm trying to play a game on Virtualbox that needs 512MB of video memory. So as suggested here I shut the virtualbox down and tried to increase the memory to 512MB using this command:

VBoxManage modifyvm "win7" --vram 512

But I get this error

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

I'm wondering if there is any way to circumvent this 256MB limit, which is ridiculously low by today standards.


Solution 1:

You can not. And there is no need.

VirtualBox does not use the GPU. What you see as graphics RAM in your virtual machine is normal RAM from the host, not from your GPU.

which is ridiculously low by today standards.

Sorry, but no. With width, height, bits/pixel 3840x2160×32 that would be 33177600 bytes or 31 MB. So the 256 MB limit is more than enough to fill ...

  • either 8 4K screens
  • or 4 4K screens with double buffering
  • or 2 4K screens with quadruple buffering

So even if you could increase it there is NO reason to have more than 256Mb. It would never be used and even worse: it would make it -slower-: 3D accelerated graphics is rendered by the host, not the guest, so increasing the guest graphics RAM takes it away from the host.


What you need is PCI passthrough:

Essentially this feature allows to directly use physical PCI devices on the host by the guest even if host doesn't have drivers for this particular device. Both, regular PCI and some PCI Express cards, are supported. AGP and certain PCI Express cards are not supported at the moment if they rely on GART (Graphics Address Remapping Table) unit programming for texture management as it does rather non-trivial operations with pages remapping interfering with IOMMU. This limitation may be lifted in future releases.

Solution 2:

Use VMware player instead, it allows 3gig of VRAM.

enter image description here

which is ridiculously low by today standards.

Yes, it is. OP is 100% correct.

256mb is just too small for many applications, not just games. The other answer says its enough for an 8 x 4k displays, maybe (i highly doubt it will run at all well). Some software will disable features when less than 1GB of VRAM is available.

So even if you could increase it there is NO reason to have more than 256Mb.

There are many reasons to do so hence the OP asked and hence I run all my VM's with 2gb of Vram.