enabling gui in Vagrantfile settings

浪子不回头ぞ 提交于 2019-12-31 17:52:34

问题


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


来源:https://stackoverflow.com/questions/19013851/enabling-gui-in-vagrantfile-settings

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