0

I've just met Vagrant, trying to pass Getting Started instructions https://www.vagrantup.com/intro/getting-started/index.html

Before diving into your first project, please install the latest version of Vagrant. And because we will be using VirtualBox as our provider for the getting started guide, please install that as well.

My host machine is Windows 7 x64. Virtualbox is 5.1.14r112924. Virtualization is enabled: I successfully use Windows XP virtual machine.

So I installed the latest Vagrant version 2.0.0. And I updated Powershell from 2.0 to 5.0 to fix vagrant up does nothing issue.

So, the instructions from Getting started:

  1. vagrant init hashicorp/precise64: okay, file Vagrantfile appeared;
  2. vagrant up, getting started says:

After running the above two commands, you will have a fully running virtual machine in VirtualBox running Ubuntu 12.04 LTS 64-bit.

but I see:

E:\VM\v_demo>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'hashicorp/precise64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, 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://vagrantcloud.com/hashicorp/precise64"]
Error: error setting certificate verify locations:
  CAfile: /mingw64/ssl/certs/ca-bundle.crt
  CApath: none

and in my working folder following file tree:

|   Vagrantfile
|
\---.vagrant
    \---machines
        \---default
            \---virtualbox
                    vagrant_cwd

Internet search of this error shows results about curl и git but they are not used here.

Recommendations about trying vagrant login from the error message are also not clear. As said at https://www.vagrantup.com/docs/cli/login.html

Command: vagrant login

The login command is used to authenticate with the HashiCorp's Vagrant Cloud server. Logging is only necessary if you are accessing protected boxes or using Vagrant Share.

Logging in is not a requirement to use Vagrant. The vast majority of Vagrant does not require a login. Only certain features such as protected boxes or Vagrant Share require a login.

I don't think that test example is private. And I cannot find Create account button anywhere.

What am I missing?

UPD

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.box_download_insecure = true
end

Value config.vm.box_download_insecure = true didn't helped: same result.

UPD2 I've found how to create account https://app.vagrantup.com/account/new (before I used mobile version). vagrant login didn't helped: same results

and1er
  • 749
  • 8
  • 18
  • try adding `config.vm.box_download_insecure = true` in your vagrantfile – Frederic Henri Oct 10 '17 at 07:38
  • @FrédéricHenri, does not help, the same result. – and1er Oct 10 '17 at 07:55
  • curl/wget is used as its used to download the box, you can run `curl -O https://hashicorp-files.hashicorp.com/precise64.box` to download the box – Frederic Henri Oct 10 '17 at 08:18
  • @FrédéricHenri, does `curl`/`wget` are really used for `Windows 7x64`? I suppose only for `Linux` machines. I'm downloading it directly from `https://hashicorp-files.hashicorp.com/precise64.box` link. Need time to download and explore how to `vagrant up` from the file. – and1er Oct 10 '17 at 08:21
  • vagrant still need a way to download the machine even for windows, and they use curl internally – Frederic Henri Oct 10 '17 at 09:01

2 Answers2

1

Actual problem was proxy server. Setting Windows environment variable https_proxy=http://192.168.x.xxx:3128 solved the problem.

and1er
  • 749
  • 8
  • 18
0

Manual solution:

  1. Manually download the .box-file from https://hashicorp-files.hashicorp.com/precise64.box to local folder local_box\precise64.box;
  2. Add path to local .box-file inside Vagrantfile:

    Vagrant.configure("2") do |config|
    
      config.vm.box = "local_box/precise64.box"
    
    end
    
  3. vagrant up now works as expected.

and1er
  • 749
  • 8
  • 18
  • I tried your solution but I want to know, do I make a new folder called `local_box` in the `vagrant` folder? – Nick King Oct 10 '17 at 16:04
  • @NickKing `local_folder` was created manually in `Windows 7` just for testing relative paths in the command. It is not necessary – and1er Oct 10 '17 at 16:44