Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vagrant 特定于提供程序的主机管理器设置_Vagrant_Vagrant Plugin - Fatal编程技术网

Vagrant 特定于提供程序的主机管理器设置

Vagrant 特定于提供程序的主机管理器设置,vagrant,vagrant-plugin,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 ... en

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


我做错了什么?

我在配置以下内容时也出现了相同的错误

config.vm.hostmanager.aliases = %w(my.example.local)
但这是正确的

config.hostmanager.aliases = %w(my.example.local)
也许你也有类似的打字错误