1

To preface, I realize this is a common error message with several different causes and solutions, but nothing I've found has worked so far. I have Vagrant 2.1.5 with Virtualbox 5.2.18, running on Windows 10.

I was testing Vagrant with a very simple Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
end

Running vagrant up then gives the typical "Timed out while waiting for the machine to boot" error:

    Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: vargrantTest_default_1537805339381_15444
==> 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.

Things I have tried:

  1. Ensuring virtualization is enabled in BIOS
  2. Increasing boot timeout in vagrantfile
  3. Ensuring the VMs network settings are correct in Virtualbox (NAT adapter with cable connected)
  4. Using vb.gui = true to watch the VM boot. It boots fine and waits at the login screen.
  5. Using --debug flag on vagrant up. This doesn't give any obvious errors that I found, though before timing out it runs VBoxManage showvminfo --machinereadable several hundred times, resulting in a log file of over 80k lines.

As well as several other things I forgot to write down. I'm out of ideas and quite new to Vagrant, so I don't really know what the next step of troubleshooting this is. Any help would be appreciated.

Edit: Not sure why I didn't think to do it myself, but Marco gave me the idea to try to ssh directly to the VM. I tried doing so using the key file in "/.vagrant.d/insecure_private_key" created by Vagrant, but it timed out. I then tried to simply ping the VM, but doing so gives a seemingly random mix of "Request timed out" and "Destination host unreachable", so there's probably a bigger network issue somewhere (my machine, the VM, or Virtualbox) I'm unaware of.

Greesy
  • 71
  • 7
  • I appreciate that you are using the latest Vagrant and VirtualBox! I can think of two tests you can make. What happens If you use VirtualBox independently from Vagrant ? What happens if, after getting the above error, you try to ssh into the box ? To do this, you can use "vagrant ssh-config" and then adapt the output to Putty or the SSH client you use on Windows. – marco.m Sep 24 '18 at 18:47
  • Using Virtualbox by itself works fine, though it seems there may be a networking issue as trying to ssh directly to the VM results in a timeout, and pinging it gives "Destination unreachable". I'll look into it a bit more, thanks marco. – Greesy Sep 24 '18 at 19:12
  • have you tried logging in at the screen with {username: vagrant, password: vagrant}? – dillon.harless Dec 21 '18 at 14:16

1 Answers1

0

Are you declaring some kind of network for this box? Either private or public, but something?

Also, how long is your boot timeout? Go overboard and give it 900=>15mn.

  • Timeout of 1000 was the longest I tried. I'm not explicitly declaring any network, I was under the impression Vagrant does the majority of networking for you since one of my coworkers can run the same simple vagrantfile on Mac and it works fine. – Greesy Sep 24 '18 at 21:09
  • Ah, but you know, windows is not an easy beast... Why don't you declare a network explicitly and make sure that's not your problem? – George M Reinstate Monica Sep 24 '18 at 22:32