在Vagrantfile设置中启用gui

Gui*_*ocs 27 vagrant

我试过configure.vm.boot_mode = :gui在Vegrantfile中使用,但是出现了这个错误:The following settings shouldn't exist: boot_mode

我现在修复它的方法是使用供应商配置(virtualbox):

config.vm.provider "virtualbox" do |v|
    v.gui = true
end
Run Code Online (Sandbox Code Playgroud)

但我想在没有必要时避免特定于供应商的任何事情.与供应商无关的替代方案是什么?有替代品boot_mode吗?

Emy*_*myl 23

vm.boot_mode与Vagrant 1.1一起消失了,但如果将它封装在V1配置块中,您仍然可以使用它:

Vagrant.configure("1") do |config|
  config.vm.boot_mode = :gui
end

Vagrant.configure("2") do |config|
  # V2 Config...
end
Run Code Online (Sandbox Code Playgroud)