听起来很简单 - 我正在尝试仅为 Virtualbox 打开 vagrant hostmanager 插件。
所以我尝试覆盖:
config.hostmanager.enabled = false
...
config.vm.provider "virtualbox" do |vb|
vb.hostmanager.enabled = true
...
end
config.vm.provider "azure" do |azure|
# do nothing
...
end
然而,流浪者抱怨它:
There are errors in the configuration of this machine. Please fix the following errors and try again:
VirtualBox Provider:
* The following settings shouldn't exist: hostmanager
编辑:我也试过......
config.vm.provider "virtualbox" do |vb,override|
override.hostmanager.enabled = true
...
end
这不会引发错误,但也不会运行 hostmanager :(
我究竟做错了什么?