Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Insufficient graphic memory for boot2docker Vbox VM when using docker provider with force_host_vm #81

Open
olberger opened this issue Feb 27, 2015 · 0 comments

Comments

@olberger
Copy link

Here's a repost of hashicorp/vagrant#5287 :

I'm testing the docker provider using force_host_vm = true to instantiate a VirtualBox boot2docker VM on Linux (trying to test what would happen when on Windows).
It seems that the VM is created using only 8 Mb of graphic memory, which VirtualBox reports as insufficient for displaying the graphic console (tells that 9 Mb is the minimum),
Hence, the VirtualBox gui = true won't apply and the VM stays headless, which doesn't help when vagrant ssh won't work, which renders it complex to login to the VM for debugging.

I'd suggest to change the defaults so that 9 Mb are used.

AFAIU, it is possible to workaround this by using a custom Vagrantfile for boot2docker, like:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.define "app" do |app|
    app.vm.provider "docker" do |d|
      d.force_host_vm = true
      d.build_dir = "."
      d.vagrant_vagrantfile = 'Vagrantfile_hostVM'
    end
  end

where Vagrantfile_hostVM contains:

 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "mitchellh/boot2docker"

  config.vm.provider "virtualbox" do |vb|
    vb.gui = true

    vb.customize ["modifyvm", :id, "--vram", "36"]
  end
...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant