Vagrant 禁用 Guest Additions
Vagrant disable Guest Additions
我想禁用 VirtualBox Guest Additions。我不将它们用于文件夹同步等,对于我正在处理的盒子(例如,centos/7),它们无论如何都无法构建。有什么方法可以告诉 vagrant 不要尝试将它们安装在 vagrant up
?
在您的 Vagrantfile 中,添加以下参数
Vagrant.configure("2") do |config|
....
config.vbguest.auto_update = false
....
end
用户可能没有 vagrant-vbguest 插件,您可以将其使用包含在条件中以避免混淆。
Vagrant.configure("2") do |config|
....
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
....
end
我想禁用 VirtualBox Guest Additions。我不将它们用于文件夹同步等,对于我正在处理的盒子(例如,centos/7),它们无论如何都无法构建。有什么方法可以告诉 vagrant 不要尝试将它们安装在 vagrant up
?
在您的 Vagrantfile 中,添加以下参数
Vagrant.configure("2") do |config|
....
config.vbguest.auto_update = false
....
end
用户可能没有 vagrant-vbguest 插件,您可以将其使用包含在条件中以避免混淆。
Vagrant.configure("2") do |config|
....
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
....
end