enabling gui in Vagrantfile settings

2019-03-14 08:58发布

问题:

I've tried using configure.vm.boot_mode = :gui in Vegrantfile, but got this error: The following settings shouldn't exist: boot_mode

the way I fixed it now is by using vendor configuration (virtualbox):

config.vm.provider "virtualbox" do |v|
    v.gui = true
end

but I would like to avoid vendor-specific anything when not necessary. what vendor-agnostic alternative is there to this? is there a replacement to boot_mode?

回答1:

vm.boot_mode is gone with Vagrant 1.1, but you can still use it if you enclose it in a V1 configuration block:

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

Vagrant.configure("2") do |config|
  # V2 Config...
end


标签: vagrant