7

I am trying to set up virtual machine using virtual box. I have got virtual box and vagrant installed in my windows 7 64-bit machine. I have also built an environment using puphpet. But whenever I try to install the box ubuntu1404-x64 it throws the error

Bringing machine 'machine1' up with 'virtualbox' provider...
==>Machine1: Box 'puphpet/ubuntu1404-x64' could not be found. Attempting to find and install...
machine1: Box Provider: virtualbox
machine1: Box Version: >= 0
machine1: Box file was not detected as metadata. Adding it directly...
machine1: Adding box 'puphpet/ubuntu1404-x64' (v0) for provider: virtualbox
machine1: Downloading: puphpet/boxes/ubuntu1404-x64
machine1:
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.

I checked the URL https://atlas.hashicorp.com/puphpet/boxes/ubuntu1404-x64/ and the box puphpet/ubuntu1404-x64 does exist.

Also when it says The error message, if any, is reproduced below it does not show any description at the terminal.

I googled the issue, tried some of the answers here at stackoverflow but no result. Please help.

Sid
  • 834
  • 8
  • 23
  • I have gone through its documentation and it says there the box requires a metadata.json file in it. Now when I run vagrant up through my cmd it says box file not detected as metadata. – Sid Sep 06 '16 at 06:12

2 Answers2

8

I've had a similar situation in the past, and it helped me to download the box using vagrant command line, instead of having it be downloaded automatically ( from the URL in Vagrantfile ):

$ vagrant box add USER/BOX

see more here. Could you try the same approach? It might work for you as well.

EDIT: on a windows box, Microsoft Visual C++ 2010 redist looks to be needed to perform the provisioning of the box. It can be downloaded here. More info on the puhpet issuet: here

Geo
  • 85,654
  • 109
  • 315
  • 497
  • Thanks for the info Geo, I looked through their documentation but the problem persists. The box could not be found. – Sid Sep 05 '16 at 07:24
  • Does the URL for the box exist and is valid? If so, here's an example of how I used it: `vagrant box add ubuntu-1464 https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/14.04/ubuntu-14.04-amd64.box` . And then, in my vagrant file I just configured the box name to be `ubuntu-1464` and I removed the URL. This made vagrant find it in the list of locally installed boxes. – Geo Sep 05 '16 at 09:05
  • I tried downloading from github as well but still the same. Also I downloaded the box file manually and tried to `vagrant box add name local_box_file` but still it is throwing the same error. – Sid Sep 05 '16 at 12:36
  • And in your Vagrantfile, you referenced it as the local name, and removed the URL, right? – Geo Sep 05 '16 at 13:34
  • Yes, I deleted the complete box URL line – Sid Sep 05 '16 at 13:39
  • Could it be related to the version of vagrant? I notice that I have `1.8.5` locally. – Geo Sep 05 '16 at 13:41
  • Mine is the same. – Sid Sep 05 '16 at 13:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/122707/discussion-between-sid-and-geo). – Sid Sep 06 '16 at 04:49
3

I ran into a similar problem and fixed it by installing the latest version of vagrant.

IKavanagh
  • 5,704
  • 11
  • 38
  • 44
Assain
  • 49
  • 8