vagrant provider特定的hostmanager设置

时间:2015-06-02 01:33:22

标签: vagrant vagrant-plugin

听起来很简单 - 我试图仅为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

这不会引发错误,但它也不会运行主机管理员:(

我做错了什么?

1 个答案:

答案 0 :(得分:0)

当我配置类似

的内容时,我遇到了同样的错误
config.vm.hostmanager.aliases = %w(my.example.local)

但是正确的是

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

也许你有类似的拼写错误?

相关问题