vagrant up fails with "Vagrant::Errors::VMBootTimeout" with windows guest and ssh communicator

235 views
Skip to first unread message

Bryan Berry

unread,
Mar 17, 2016, 3:22:23 AM3/17/16
to Vagrant
Folks,

I have an odd issue when executing `vagrant up` for a windows server 2012 guest using SSH as the communicator. The guest UI boots up fine but
`vagrant up` hangs and ultimately fails w/ the error:

hitman@localhost:~/tmp/cycle-vbox/tmp$ 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: Adapter 2: hostonly
==> 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: password
INFO interface: Machine: error-exit ["Vagrant::Errors::VMBootTimeout"]
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.

After this fails, i can successfully execute `vagrant ssh` to get a login shell into the same machine. I can also ssh into it (using port 2222) using the ssh command directly. However,
vagrant halt and vagrant reload do nothing.

`vagrant up` works when I change the communicator to winrm

here are the details of my setup
  • host: mac os x 10.9.5
  • virtualbox 5.0.16
  • vagrant 1.8.1
  • guest os windows server 2012 R2 eval
  • bitvise SSH server in guest

The bitvise SSH server shows my host connected to the guest while `vagrant up` hangs


Here are the important bits in my Vagrantfile


Vagrant.configure(2) do |config|
  config.vm.guest = :windows
  config.vm.box = "cycle-win2k12"
#  config.vm.communicator = "ssh"                                                                                           
  config.vm.communicator = "winrm"
  config.ssh.insert_key = false
  config.ssh.username = 'vagrant'
  config.ssh.password = 'vagrant'

  config.vm.provision "shell", inline: 'echo hello world'

end


I realize that this is likely a virtualbox error. For that reason, I have tried reinstalling virtualbox and rebooted, to no success. I also see no errors in the VBox.log for my machine


Any suggestions folks have would be most appreciated.


Alvaro Miranda Aguilera

unread,
Mar 17, 2016, 4:05:30 AM3/17/16
to vagra...@googlegroups.com
Hello,

In Windows server, change all the services from Start to Delayed Start.

That will be start the non-essential services after the boot. 

That will cut down the time to get ssh working, and Vagrant should boot just fine after that.

If the service is essential, it won't allow you put it as delayed, so you can be confident changing as many services as possible.

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/eba201c0-f61a-4a4f-be39-cccbea0e1bf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bryan Berry

unread,
Mar 17, 2016, 4:09:10 AM3/17/16
to vagra...@googlegroups.com
Tks for your quick response Alvaro,

I'm not sure changing services to delayed start would help. I can ssh into the windows long before `vagrant up` times out. in fact, i only have to wait a minute or two after startup whereas `vagrant up` takes ~ 10 minutes to time out.

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/oFvBvjNoH04/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/CAHqq0ewadsRrNkwLvyxdkW7EXG2jezmn0qh60U_z-GbujiAD6Q%40mail.gmail.com.

Alvaro Miranda Aguilera

unread,
Mar 18, 2016, 5:06:37 PM3/18/16
to vagra...@googlegroups.com
Hello,

It will help to have ssh sooner on first boot, so vagrant up won't error.

Alvaro.

dcs...@ed.ac.uk

unread,
Jan 20, 2017, 11:28:24 AM1/20/17
to Vagrant

Hi ...

Did anyone ever resolve this?

I'm seeing a very similar hang with a similar configuration,
although it doesn't seem to timeout (at least within a few minutes).
Everything actually seems to have been set up OK, and if I kill
the process, the VM looks fine.

Many Thanks

  Paul


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: Running 'pre-boot' VM customizations...

==> 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
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /Users/paul/Work/Research/L3/Git/Support/Vagrant/Windows

Alvaro Miranda Aguilera

unread,
Jan 20, 2017, 3:20:39 PM1/20/17
to vagra...@googlegroups.com
hello

i did long time a ago.. just made it a bit more simple..


cd dockerhost-vagrant/sampleapp
vagrant up

then open browse to http://localhost:8080

that should show phpinfo from a container

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d8a231dd-f431-4783-abfe-64cf199b3825%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages