{"action":"closed","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/5652","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5652/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5652/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5652/events","html_url":"https://github.com/mitchellh/vagrant/issues/5652","id":71757264,"number":5652,"title":"Vagrant ignores provider specified in docker.vagrant_vagrantfile","user":{"login":"mstromb","id":5063115,"avatar_url":"https://avatars.githubusercontent.com/u/5063115?v=3","gravatar_id":"","url":"https://api.github.com/users/mstromb","html_url":"https://github.com/mstromb","followers_url":"https://api.github.com/users/mstromb/followers","following_url":"https://api.github.com/users/mstromb/following{/other_user}","gists_url":"https://api.github.com/users/mstromb/gists{/gist_id}","starred_url":"https://api.github.com/users/mstromb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstromb/subscriptions","organizations_url":"https://api.github.com/users/mstromb/orgs","repos_url":"https://api.github.com/users/mstromb/repos","events_url":"https://api.github.com/users/mstromb/events{/privacy}","received_events_url":"https://api.github.com/users/mstromb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/core","name":"core","color":"eb6420"},{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/provider/docker","name":"provider/docker","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-29T02:06:33Z","updated_at":"2015-07-08T22:24:46Z","closed_at":"2015-07-08T22:24:46Z","body":"So I have a Vagrantfile that looks like this:\r\n\r\n```\r\n  config.vm.define \"zk1\" do |zk1|\r\n    zk1.vm.provider :docker do |d|\r\n        d.build_dir = \"foo/\"\r\n        d.force_host_vm = true\r\n        d.vagrant_vagrantfile = \"foo/1/Vagrantfile\"\r\n        d.vagrant_machine = \"foo-1\"\r\n        d.name = 'foo-1'\r\n    end\r\n  end\r\n```\r\n\r\nI'm using the vagrant-openstack plugin (0.6.1) here in `foo/1/Vagrantfile`:\r\n```\r\n  config.vm.define \"foo-1\" do |zk1|\r\n    zk1.vm.box       = 'my-openstack-box'\r\n    zk1.vm.box_url   = 'http://path/to/my-openstack-box'\r\n    zk1.vm.hostname  = 'foo-1'\r\n\r\n    zk1.vm.provider :openstack do |os|\r\n      os.username           = creds['user']\r\n      os.password           = creds['pass']\r\n      os.flavor             = 'GEN.cpu1.ram2G.hd50G'\r\n      os.server_name        = 'foo 1'\r\n    end\r\n  end\r\n```\r\n\r\nWhen I do a `vagrant up` from inside `foo/1` things work just fine.\r\n\r\nWhen I do a `vagrant up` from the root, I get this message:\r\n```\r\nBringing machine 'zk1' up with 'docker' provider...\r\n==> zk1: Docker host is required. One will be created if necessary...\r\n    zk1: Vagrant will now create or start a local VM to act as the Docker\r\n    zk1: host. You'll see the output of the `vagrant up` for this VM below.\r\n    zk1:\r\n    zk1: Box 'my-openstack-box' could not be found. Attempting to find and install...\r\n    zk1: Box Provider: virtualbox\r\n    zk1: Box Version: >= 0\r\n    zk1: Adding box 'pqt-metacloud' (v0) for provider: virtualbox\r\n    zk1: Downloading: http://path/to/my-openstack-box\r\n    zk1: Progress: 100% (Rate: 157k/s, Estimated time remaining: --:--:--)\r\nThe box you attempted to add doesn't match the provider you specified.\r\n\r\nProvider expected: virtualbox\r\nProvider of box: openstack\r\n```\r\n\r\nAs you can see, vagrant has decided to use virtualbox as the provider for the Docker host, instead of the openstack provider I configure in the `vagrant_vagrantfile`.\r\n\r\nSetting `VAGRANT_DEFAULT_PROVIDER` to openstack for the root invocation might work, but there are required provider settings that aren't in the outer Vagrantfile, and feel like I shouldn't have to redefine them there when they're already specified in the other Vagrantfile - what if I have heterogeneous Docker hosts?\r\n\r\nThis is with version 1.7.2.\r\nHere's the debug output: https://gist.github.com/mstromb/ac6f259987e3aaad6003"}}