Vagrant: [third party] disksize plugin calls out to VirtualBox provider which errors out if virtualbox is not installed

Created on 27 Jun 2019  ยท  4Comments  ยท  Source: hashicorp/vagrant

Vagrant version

Vagrant 2.2.2

Host operating system

macOS 10.14.5

Guest operating system

Ubuntu 18.04

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = "bento/ubuntu-18.04"
  config.vm.box_check_update = false

  config.vm.provider "vmware_desktop" do |vmware|
    vmware.gui = true
    vmware.vmx["memsize"] = 1024
    vmware.vmx["numvcpus"] = 1
  end

  config.vm.provision "shell", inline: <<-SHELL
    echo "Hello world!"
  SHELL

end

Debug output

https://gist.github.com/dalma/791586b1ce2a9ec63c9569c479ace2c5

Expected behavior

The Vagrant VM should be launched and use the vmware_fusion provider (not anything about VirtualBox!)

Actual behavior

It shows that try bring up the VM with vmware_desktop provider, but next lines
shows it try check the VirtualBox provider (I didn' t install the VirtualBox on my macOS)!

Bringing machine 'default' up with 'vmware_desktop' provider...
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

Steps to reproduce

Just run vagrant up

References

N/A

question upstream waiting-reply

Most helpful comment

@briancain it works after uninstall the vagrant-disksize plugin! Thanks a lot, I have been blocked by this for a whole week!

It is great that to have my stack up with this, thanks again!

All 4 comments

By the way the latest version 2.2.4 also not working!

As our IT policy did not allow to use VirtualBox, and this vmware_desktop can not working it really block my works!!!

I pay both the VMware license and this vmware_desktop provider license, so please help me fix this asap!

Otherwise I think you need give us a refund for this!

@mitchellh

Hi there @dalma - Thanks for opening an issue on Vagrant!

From the log you posted, it looks like the actual issue is with your disksize plugin. It is attempting to load the virtulalbox provider, which then tries to validate that virtualbox is on your machine. That plugin is only for virtualbox, so if you aren't using it you should remove it. I believe removing it will solve your problem.

From the error and stacktrace, you can see it's the disksize plugin calling out to the virtualbox provider here:

ERROR vagrant: /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/driver/meta.rb:51:in `rescue in block in initialize'
/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/driver/meta.rb:45:in `block in initialize'
/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/driver/meta.rb:41:in `synchronize'
/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/driver/meta.rb:41:in `initialize'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:11:in `new'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:11:in `<class:ResizeDisk>'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:5:in `<class:Action>'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:3:in `<module:Disksize>'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:2:in `<module:Vagrant>'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize/actions.rb:1:in `<top (required)>'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize.rb:27:in `require_relative'
/Users/i502927/.vagrant.d/gems/2.4.4/gems/vagrant-disksize-0.1.3/lib/vagrant/disksize.rb:27:in `block in <class:Plugin>'
/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:42:in `block (2 levels) in run'

This isn't an error with the vmware provider. So I recommend removing the plugin and seeing if that solves your issue. Thanks!

@briancain it works after uninstall the vagrant-disksize plugin! Thanks a lot, I have been blocked by this for a whole week!

It is great that to have my stack up with this, thanks again!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbaassssiiee picture bbaassssiiee  ยท  3Comments

hesco picture hesco  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments

luispabon picture luispabon  ยท  3Comments

jazzfog picture jazzfog  ยท  3Comments