'vagrant up' not working on windows 7

1,061 views
Skip to first unread message

Rohit Kohli

unread,
May 9, 2016, 12:53:40 AM5/9/16
to Vagrant
Hi,

'vagrant up' on my windows 7 machine is failing with following message:
=================
C:\HashiCorp\Vagrant\bin>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
=================

I have tried-
1) Checking and making sure support for virtualization is enabled at BIOS level.
2) Uninstalling and Installing Virtualbox and Vagrant again.

but the issue still remains.

Any pointers toward the possible reason or suggestions would be appreciated.

Alvaro Miranda Aguilera

unread,
May 9, 2016, 1:16:21 AM5/9/16
to vagra...@googlegroups.com
Hello,

Please test with these boxes first:

hashicorp/precise32
hashicorp/precise64

you can do something like this:

mkdir precise32
cd precise32
vagrant init -m hashicorp/precise32
vagrant up

That will help to identify where the error is comming from.

Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/254807de-097c-4518-9bf1-aec56ab8a8d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rohit Kohli

unread,
May 9, 2016, 1:57:30 AM5/9/16
to Vagrant
Thanks for helping out Alvaro

So I tried with both precise32 and precise64 boxes, however for both, same problem appears while running 'vagrant up'.
While trying to for precise64, following was thrown:
======================
C:\HashiCorp\Vagrant\bin\precise64>vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find an
d install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'hashicorp/precise64'
    default: URL: https://atlas.hashicorp.com/hashicorp/precise64
==> default: Adding box 'hashicorp/precise64' (v1.1.0) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/hashicorp/boxes/precise64/
versions/1.1.0/providers/virtualbox.box
    default: Progress: 100% (Rate: 6155k/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'hashicorp/precise64' (v1.1.0) for 'virtualb
ox'!
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: precise64_default_1462772511405_18359
==> default: Fixed port collision for 22 => 2222. Now on port 2201.

==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2201 (host) (adapter 1)

==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2201

    default: SSH username: vagrant
    default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

C:\HashiCorp\Vagrant\bin\precise64>vagrant box list
hashicorp/precise32 (virtualbox, 1.0.0)
hashicorp/precise64 (virtualbox, 1.1.0)
======================

Alvaro Miranda Aguilera

unread,
May 9, 2016, 4:43:06 PM5/9/16
to vagra...@googlegroups.com
Hello,

Once the VM has been created, can you open Virtualbox gui, stop the VM and start it fromt here?

Hopefully the console of Virtualbox should tell more information on whats going on.

Alvaro.

Rohit Kohli

unread,
May 10, 2016, 12:26:51 AM5/10/16
to vagra...@googlegroups.com
So I can see both precise32 and precise64 VMs in VirtualBox Manager. I am able to pause, power off, start and then also able  log in with vagrant/vagrant in into the shell console of started VM.

The problem is that I need to use Test Kitchen along with vagrant and when test kitchen tries to create a VM through Vagrant it fails with same error. But the basic issue exist at Vagrant level only as described in my initial post.

You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/QedGb_ihl-Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyTbH1pMKNVRPzBBycSNC4xbdQfwETxCOSonO40v-UkPw%40mail.gmail.com.

Alvaro Miranda Aguilera

unread,
May 10, 2016, 12:34:15 AM5/10/16
to vagra...@googlegroups.com

On Tue, May 10, 2016 at 4:26 PM, Rohit Kohli <rohitk...@gmail.com> wrote:
The problem is that I need to use Test Kitchen along with vagrant and when test kitchen tries to create a VM through Vagrant it fails with same error.


Just to confirm, without test kitchen, hashicorp/precise32 works ?

If doesnt can you share this output

for cmd.exr

vagrant halt
set VAGRANT_LOG=debug
vagrant up

And share a gist with the generated output

Thanks
alvaro.

Rohit Kohli

unread,
May 10, 2016, 10:56:32 AM5/10/16
to vagra...@googlegroups.com
So I tried as suggested but nothing extra showed up in output, it failed with same error output as originally posted.

I checked vagrant up -h but did not find any command to make vagrant up command run in debug mode. Is there any other way to get output in debug mode?

Thanks,
Rohit

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/QedGb_ihl-Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
May 10, 2016, 5:26:17 PM5/10/16
to vagra...@googlegroups.com
in cmd.exe

set VAGRANT_LOG=debug

in bash
export VAGRANT_LOG=debug

then

vagrant up


alvaro.

You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CADu1NvyKWVycxxCyozdCENg5hXg%2BwfDMJcdqHQCLi6eXTEP9tA%40mail.gmail.com.

Rohit Kohli

unread,
May 16, 2016, 3:08:15 AM5/16/16
to vagra...@googlegroups.com
Thank you very much Alvaro!

Your debug solution did work and now Vagrant up is working.

Short story- After setting path of Git in environment variable 'Path', the issue got resolved.

Long story:
So, after setting the mode to debug level, I was able to see following during 'Vagrant Up' execution:
======
 INFO ssh: SSH not ready: #<Vagrant::Errors::NetSSHException: An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.
======

then, I ran 'Vagrant ssh' command, its output showed:
======
ERROR warden: Error occurred: `ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/Users/Rohit.Kohli/.vagrant.d/insecure_private_key
....
......
======

I checked my computers environment variable-Path and did find path of some of the ssh tools I had installed on my computer. Then I checked Path variable for another guy in my team and found that path for Git was also set. And after setting Git, 'Vagrant Up' started working.


Alvaro Miranda Aguilera

unread,
May 16, 2016, 6:16:53 AM5/16/16
to vagra...@googlegroups.com
Hello,

There is no good / better / optimal way to setup a windows computer, so is good to test and see what works best.

When you install msysgit for example, you will get ssh and lots of linux like feeling and is a nice environment to run vagrant from there.

Other people feel more confortable with cmd/powershell, so yes, a ssh in the path is required since vagrant will ssh to the box to do some configuration.

Thanks for sharing back what you found.

Alvaro

Reply all
Reply to author
Forward
0 new messages