Vagrant disable Guest Additions

2019-04-05 18:36发布

问题:

I would like to disable VirtualBox Guest Additions. I do not use them for folder syncing, etc. and for the box I am working on (e.g., centos/7), they fail to build anyway. Is there some way to tell vagrant not to try to install them at vagrant up?

回答1:

In your Vagrantfile, add the following param

Vagrant.configure("2") do |config|
    ....
    config.vbguest.auto_update = false
    ....
end


回答2:

Vagrant.configure("2") do |config|
  ....
  if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false
  end
  ....
end