Can't SSH connect to a Vagrant Machine. Works after restarting network.

545 views
Skip to first unread message

Roberto Aloi

unread,
Oct 19, 2011, 4:35:33 PM10/19/11
to vagra...@googlegroups.com
I have a perfectly working Vagrant VM running, which I then modify and
package into a new box:

vagrant package
That command creates a package.box file in the same directory. Good. I
add the newly created box to the list of boxes:

vagrant box add my_box package.box
I create a new folder, with a new Vagrantfile in it:

Vagrant::Config.run do |config|

config.vm.box = "my_box"

end
I try to boot the new machine, using the newly created box:

vagrant up
...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] Failed to connect to VM!
Failed to connect to VM via SSH. Please verify the VM successfully booted
by looking at the VirtualBox GUI.
Adding the following option to the Vagrantfile

config.vm.boot_mode = :gui
I notice that the machine actually boots fine and I can even login
into it. Just, vagrant ssh won't work. But, if I login into the
machine using the gui and I manually restart the network:

sudo /etc/init.d/networking restart
I suddenly can run:

vagrant ssh
Did anyone encounter a similar issue? Why do I need to manually
restart the network before I can ssh into the machine?

Regards,

Roberto

Hedge Hog

unread,
Oct 19, 2011, 5:00:58 PM10/19/11
to vagra...@googlegroups.com

This is a known issue.
If you check the vagrant issues list you'll see some experiences and
suggestions.
Perhaps you can add some experience/insight to what others describe there?

>
> Regards,
>
> Roberto
>

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
  Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://hedgehogshiatus.com

Reply all
Reply to author
Forward
0 new messages