Maarten
Maarten

Reputation: 319

Vagrant Windows 10 'hangs" on vagrant up

I've been having a problem with Vagrant (1.8.1, using VirtualBox 5.0.20) on Windows 10.

When I follow the getting started tutorial https://www.vagrantup.com/docs/getting-started/ after I have typed vagrant up, my console is stuck on:

==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key

It does not continue, i can see the VM boot inside of VirtualBox, and i can use the VirtualBox GUI to log in with the default credentials, so the VM itself is working.

According to https://www.vagrantup.com/docs/virtualbox/common-issues.html I should run VirtualBox as admin and do vagrant up from a cmd.exe with admin rights, but when i do that i get the message:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "1b9d4f9b-04d8-48bf-8d16-d3aed99d341b", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

This seems different from the 100's of posts all around the net like these: https://github.com/Varying-Vagrant-Vagrants/VVV/issues/375 since I am not getting antying after the output listed above, it just sits there and after alike 10 minutes it comes up with the message:

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've also read Vagrant stuck in "Waiting for VM to Boot" but it did not help me.

Is there anything else I am missing here?

Upvotes: 1

Views: 7664

Answers (4)

Ia Tid
Ia Tid

Reputation: 26

Hope it will work for you as it worked for me I'm still investigating why, but as a solution it works.

our case - when typed in cmd (inside vagrand image directory) "vagrant up" it open virtual box vm and stuck on "default: SSH auth method: private key" as mentioned in question

so fix by this steps:

  1. open manually virtual box (besides what already opened by vagrant up)
  2. run the vm that had added to the list (by vagrant up)
  3. open CMD
  4. type "Vagrant ssh"

and it will work

hope it helped, best regards

Upvotes: 1

Francozen
Francozen

Reputation: 389

In my case, vagrant up was hanging on 'Syncing VM folder' , on Windows 7 with Vagrant 1.9.3 and VBox 5.1.18 . It turned out that it requires Powershell >= 3.0. I downloaded it from https://www.google.ca/search?q=powershell+3.0+download&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=x0fdWLfsBubQXu2OorAD, and worked fine afterwards.

Upvotes: 2

Maarten
Maarten

Reputation: 319

I actually already found my problem. It was a .dll from some addware scanner that was preventing the virtualbox VM from starting. I lost the link to the forum topic which helped me solve this unfortunately.

What i did was open the logs from the VM in VirtualBox and had a read trough. At some point, a line indicating an error appeared with a .dll name which was the culprit. I deleted the offending .dll files from my pc and it was fixed.

If i find the link again to the topic explaining exactly what dll it was i will post it here. Im not at the machine that i fixed the problem on now so i can't access my search history.

Upvotes: 0

Frederic Henri
Frederic Henri

Reputation: 53713

try to turn off the VM from VirtualBox or from command line

C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe controlvm default poweroff

then restart the VM from vagrant. In case you get an error when powering off the VM, force the shutdown

C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe startvm default --type emergencystop

Then vagrant up will should work nicely

Upvotes: 1

Related Questions