Vagrant disable Guest Additions

故事扮演 提交于 2020-01-01 04:16:30

问题


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:


Users might not have the vagrant-vbguest plugin, and you could wrap its use in a conditional to avoid confusion.

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


来源:https://stackoverflow.com/questions/37556968/vagrant-disable-guest-additions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!