1

听起来很简单 - 我正在尝试仅为 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 :(

我究竟做错了什么?

4

1 回答 1

1

当我配置类似的东西时,我遇到了同样的错误

config.vm.hostmanager.aliases = %w(my.example.local)

但正确的是

config.hostmanager.aliases = %w(my.example.local)

也许你有类似的错字?

于 2015-09-22T07:38:48.763 回答