4

Windows 8.1, latest vagrant and VirtualBox versions. Running commands in git CLI on Windows.

I was able to start up ubuntu/trusty64 without any problem, and did not need to log in to atlas.hashicorp.com.

But when I tried ubuntu/xenial64 I got an error.

vagrant init ubuntu/xenial64; vagrant up --provider virtualbox

Also, trusty 64 did not cause any warnings about logging in with vagrant login, but since xenial 64 did cause such a warning, I immediately created an account at atlas.hashicorp.com.

I used vagrant login to log in, getting the message "You are now logged in."

I deleted the vagrant stuff from the folder and redid the init and up commands, but again I get the same error.

$ vagrant init ubuntu/xenial64; vagrant up --provider virtualbox
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'ubuntu/xenial64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/ubuntu/xenial64"]
Error:

But the "Error:" portion is blank.

I found a suggestion elsewhere to add the box's url to the Vagrantfile as such:

config.vm.box_url = "http://example.com/some_box_url.box"

https://stackoverflow.com/a/31538713/631764

Testing this now using the link suggested in the comments. Here is the full Vagrantfile excluding most comments:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/xenial64"
  config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box"


  # VirtualBox:
  #
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = true

    # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  end

end

But even with the url, I get an error:

$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'ubuntu/xenial64' (v0) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box
    default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

No error message showed.

  • Works for me. Are you sure your internet connection is working property? Do you need to use a proxy to access the internet? Try wget https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box. – Daniel B Jun 12 '16 at 20:09
  • @DanielB I don't have wget on my Windows git GUI, but I tried running that command on a dedicated server running in a completely different location (in case I'm having a local ISP issue) and I got a 404 not found. I do not use a proxy, I have a fast cable internet connection and as I mentioned, I was able to get trusty64. I tried again creating a trusty64 box in a new directory and it worked just fine. Why would I be having a problem with one this xenial box? – Buttle Butkus Jun 14 '16 at 1:09
  • @DanielB also, could you tell me, is it necessary to be logged into to hashicorp to download some virtual boxes? I thought they were all open source/free. – Buttle Butkus Jun 14 '16 at 1:14
6

I had the same problem with OSX and had to delete the embedded curl:

sudo rm /opt/vagrant/embedded/bin/curl

It will then use the system default curl instead of the embedded buggy one.

  • 1
    Works perfect for me on MacOS Sierra – Dayron Gallardo Dec 1 '16 at 17:15
0

I found the answer, it seems.

The latest versions of Vagrant (seemingly 1.8+) have a version of curl included that does not work on Windows 7, 8, 8.1, or 10 as is!

But the fix is very easy. Just install this, the Microsoft Visual C++ 2010 SP1 Redistributable Package:

https://www.microsoft.com/en-us/download/details.aspx?id=8328

That page does not list Windows 8.1 as a compatible operating system, but it worked for me. No system restart was required, and my virtual machine is already up and running.

Alternatively, downgrading to Vagrant version 1.7.4 also seems to solve the problem: https://releases.hashicorp.com/vagrant/

I found both of those solutions here: https://github.com/mitchellh/vagrant/issues/6852

Duplicate issues: https://github.com/mitchellh/vagrant/issues/6754 https://github.com/mitchellh/vagrant/issues/6861

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.