How to assign more than 256MB of video memory in VirtualBox?
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.
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.
Jand
Updated on September 18, 2022Comments
-
Jand over 1 year
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.
-
Admin over 6 yearsVM weren't designed to run games.
-
Terrance over 6 yearsMaybe this might help? superuser.com/a/859647/440143
-
Rinzwind over 6 yearsThis is not off topic.
-
-
Jand over 6 yearsGood points, but the game that I wanna play does not understand these!
-
Admin over 6 years@Jand Then don't use it in a VM, it's quite simple! VMs were never designed to run (resource demanding) games. Most won't even install because they expect to fin one of the common graphics subsystems (Intel, Nividia, AMD), not the virtualized hardware. Run it in Ubuntu with Wine, if possible. If not install Windows in dual boot.
-
Rinzwind over 6 yearsUse a dual boot to play the game. A VM is not made for gaming.
-
Mike over 6 years@Rinzwind very good answer, thank you. But could you please clarify just for me, I would like to use Photoshop or a movie editor the same way, if I get you right, I can set VRAM to low amount and turn on 3D acceleration and it will work alright? If yes, why games do not work, but Photoshop with 512MB min. required amount of video memory going to work? I'm not looking for games, but very curious and afraid not to be able run all the software due to video memory requirements.
-
Rinzwind about 5 yearsYes it will. Games tend to look for specific drivers and stop when they see something awkward like a virtual driver. PS does not care. Though you do want to tweak your VM for photoshop. It is also one of few pieces of software I'd recommend VMWare Player over Virtualbox.
-
Velkan over 4 years@Rinzwind, well games are telling me that they can't allocate memory for textures after going from VirtualBox 5.4 to 6.1.It kinda worked on 5.4 but was flickery and messed up even on the clean desktop, with 6.1 the game doesn't load at all.
-
ReinstateMonica3167040 over 3 yearsI think you're confusing general RAM with video RAM. For example, a 13" 2020 Intel MacBook Pro has 1.5GB of video RAM, but 16GB of regular RAM. (Did you read the other answer?)
-
Brad over 3 yearsNo I'm not. I said and meant VRAM. I did accidentally say 16gig instead of 6 tho when commenting how much a cheap computer has theses days. The 6-year-old laptop that I sold for $200 had 5gig of Vram lol. 256mb is as the OP says is ridiculously low by today standards. 100% agree.