63

I have just installed Ubuntu 14.04 on VirtualBox, including the guest additions.

However, the display is really slow. Looking at the display settings I can see that the video memory is only 12MB but I can't move the slider to increase it. The checkboxes for extended features are greyed-out too. See screenshot.

.

How do I increase the amount of memory?

TIA

ksl
  • 844

10 Answers10

95

Virtual Box supports up to 256 MB of video RAM. This can not be set using the slider of the Virtual Box Manager.

To make full use of all supported memory we can issue the following command in a terminal:

VBoxManage modifyvm "Name of VM" --vram 256

Before we change settings such as the video RAM a pre-existing virtual machine has to be shut down.

Note that for 3D video hardware acceleration from the guest addition's video driver the physical RAM of the host graphics card will be passed through. The video RAM settings of the virtual machine will not affect this.

Takkat
  • 144,580
51

You need to shut down the virtual OS before you can edit settings.

19
  1. Stop the virtual machine and close virtualbox
  2. Using a text editor like "Sublime Text" open YOUMACHINE.vbox. Make a backup beforehand.
  3. Look for vram entry and change its value

    <Display VRAMSize="256" monitorCount="1" accelerate3D="true"
      accelerate2DVideo="false"/>
    
  4. Save the file.

Now you can increase the video memory above 128.

elsadek
  • 299
9

Set Monitor Count to 8 and you will have the ability to increase the video memory at 256 MB.

7
  1. Shutdown your VM
  2. From an elevated command prompt:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Ubuntu" --vram 256

Replace Ubuntu with the name of your VM. If your installation path for Virtualbox is different, replace C:\Program Files\Oracle\VirtualBox\ with the directory you installed it to.

Verify it works.

And of course from the terminal from the VM Ubuntu:

  1. sudo apt-get install dkms & sudo apt-get install virtualbox-guest-dkms
  2. Reboot your VM
2

As Marvin stated, you need to shutdown the VM before you change things. You also need to sudo apt-get install virtualbox-guest-dkms in the virtual ubuntu. And be advised that 3d acceleration might not work, and Unity is heavy on 3D. Thus using a less graphic intensive desktop like xfce4 might be a better/faster option. Please enable 2D acceleration at least. It should provide some speedup.

2

In VB v5.1.x, if you enable 3D Acceleration first in the UI, VRAM automatically jumps to 256M.

alboko
  • 129
1

You can set the monitor count to 8 and then it will allow you to set the video ram all the way to 256 MB

0

Running vboxmanage itself to find that --vram option but could not, however, using the command in top answer worked. Someone has posted that your VM doesn't need more RAM assigned to your display than needed so am posting my settings for Win7 running in 4k without any acceleration enabled that it complained about "not enough ram". Hope someone will find this useful. The last post is from Feb18 so this is an update that it works. Since someone posted here that it went black screen - advice is - clone your VM and test it there first if it works.

Settings before the change: Settings before the change

Settings after the change: Settings after the change

ThunderBird
  • 1,963
  • 13
  • 22
  • 31
Vlad
  • 1
0

As mentioned in the other answers, shutdown your vm and use this command in the cmd.exe

  • In some cases, the vm is acting buggy while increasing it to 256 mb, so 128 mb of vram is sugested
  • Change the Name Ubuntu with the name of your vm.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Ubuntu" --vram 128