title: vagrant box add not recognizing local metadata json file
body: <p>I am trying to provide my own vagrant basebox in combination with a metadata json file to handle the versioning. However if I try to add the box using to vagrant it fails. Vagrant does not seem to recognize the file as metadata and instead tries to add it as a box, which does not work. </p>
  
  <p><em>vagrant box add</em></p>
  
  <pre><code>PS C:\Vagrant\Boxes&gt; vagrant box add C:\Vagrant\Bento\builds\metadata.json
  ==&gt; box: Box file was not detected as metadata. Adding it directly...
  A name is required when adding a box file directly. Please pass
  the --name parameter to vagrant box add. See
  vagrant box add -h for more help.
  </code></pre>
  
  <p><em>metadata.json</em>  </p>
  
  <pre><code>{
      "name": "devops",
      "description": "Bla",
      "versions": [{
          "version": "0.1.0",
          "providers": [{
              "name": "virtualbox",
              "url": "file://C:/Vagrant/Bento/builds/debian-9.3.virtualbox.box"
          }]
      }]
  }
  </code></pre>
  
  <p><em>vagrant box add --debug</em></p>
  
  <pre><code> INFO runner: Preparing hooks for middleware sequence...
   INFO runner: 1 hooks defined.
   INFO runner: Running action:  #&lt;Vagrant::Action::Builder:0x000000000482b258&gt;
   INFO warden: Calling IN action: #&lt;Vagrant::Action::Builtin::BoxAdd:0x00000000046d7640&gt;
   INFO environment: Running hook: authenticate_box_url
   INFO runner: Preparing hooks for middleware sequence...
   INFO runner: 2 hooks defined.
   INFO runner: Running action: authenticate_box_url #&lt;Vagrant::Action::Builder:0x000000000464dbe8&gt;
   INFO warden: Calling IN action: #&lt;VagrantPlugins::LoginCommand::AddAuthentication:0x0000000005444fd0&gt;
  DEBUG client: No authentication token in environment or C:/Users/a.b/.vagrant.d/data/vagrant_login_token
   INFO warden: Calling OUT action: #&lt;VagrantPlugins::LoginCommand::AddAuthentication:0x0000000005444fd0&gt;
   INFO box_add: Downloading box: file:///C:/Vagrant/Bento/builds/metadata.json =&gt; C:/Users/a.b/.vagrant.d/tmp/boxed9966a6bed3c379b7650df171216dd6eb5788c8
   INFO interface: output: Box file was not detected as metadata. Adding it directly...
   INFO interface: output: ==&gt; box: Box file was not detected as metadata. Adding it directly...
  ==&gt; box: Box file was not detected as metadata. Adding it directly...
  ERROR warden: Error occurred: A name is required when adding a box file directly. Please pass
  the `--name` parameter to `vagrant box add`. See
  `vagrant box add -h` for more help.
   INFO warden: Beginning recovery process...
   INFO warden: Recovery complete.
   INFO environment: Running hook: environment_unload
   INFO runner: Preparing hooks for middleware sequence...
   INFO runner: 1 hooks defined.
   INFO runner: Running action: environment_unload #&lt;Vagrant::Action::Builder:0x00000000056cc0f0&gt;
  ERROR vagrant: Vagrant experienced an error! Details:
  ERROR vagrant: #&lt;Vagrant::Errors::BoxAddNameRequired: A name is required when adding a box file directly. Please pass
  the `--name` parameter to `vagrant box add`. See
  `vagrant box add -h` for more help.&gt;
  ERROR vagrant: A name is required when adding a box file directly. Please pass
  the `--name` parameter to `vagrant box add`. See
  `vagrant box add -h` for more help.
  ERROR vagrant: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builtin/box_add.rb:136:in `add_direct'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builtin/box_add.rb:120:in `call'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/warden.rb:34:in `call'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builder.rb:116:in `call'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:66:in `block in run'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/util/busy.rb:19:in `busy'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:66:in `run'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/commands/box/command/add.rb:78:in `execute'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/commands/box/command/root.rb:66:in `execute'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/cli.rb:42:in `execute'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:308:in `cli'
  C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:138:in `&lt;main&gt;'
   INFO interface: error: A name is required when adding a box file directly. Please pass
  the `--name` parameter to `vagrant box add`. See
  `vagrant box add -h` for more help.
  A name is required when adding a box file directly. Please pass
  the `--name` parameter to `vagrant box add`. See
  `vagrant box add -h` for more help.
   INFO interface: Machine: error-exit ["Vagrant::Errors::BoxAddNameRequired", "A name is required when adding a box file directly. Please pass\nthe `--name` parameter to `vagrant box add`. See\n`vagrant box add -h` for more help."]
  </code></pre>
  
  <p>Adding the box directly works</p>
  
  <pre><code>PS C:\Vagrant\HoBo&gt; vagrant box add C:\Vagrant\Bento\builds\debian-
  9.3.virtualbox.box --name devops
  ==&gt; box: Box file was not detected as metadata. Adding it directly...
  ==&gt; box: Adding box 'devops' (v0) for provider:
  box: Unpacking necessary files from: file:///C:/Vagrant/Bento/builds/debian-
  9.3.virtualbox.box
  box:
  ==&gt; box: Successfully added box 'devops' (v0) for 'virtualbox'!
  </code></pre>
  
  <p>I already checked for the Visual Studio C++ Redistributable 2015 to be installed both in x64 and x86 versions (<a href="https://stackoverflow.com/questions/34578834/vagrant-box-add-fails-with-local-file">Vagrant box add fails with local file</a>) and already tried to replace the curl file (<a href="https://stackoverflow.com/questions/34556929/vagrant-box-add-fail">Vagrant box add fail</a>)</p>
  
  <p>System: Windows 10 Pro x64<br>
  Vagrant Version: 2.0.1</p>
  
  <p>Any help would be appreciated as I do not know why vagrant does not recognize the json file correctly :-/</p>