Vagrant box has no networking

1,223 views
Skip to first unread message

Ittay Dror

unread,
Jul 15, 2015, 5:11:27 AM7/15/15
to vagra...@googlegroups.com

I've downloaded and installed VirtualBox and Vagrant and then used this file: https://github.com/spark-mooc/mooc-setup/archive/master.zip to setup a VM.

When the VM boots, vagrant complains

sparkvm: Warning: Connection timeout. Retrying...

This repeats many lines

In the guest console I see:

Cloud-init v. 0.7.5 running 'init-local' at Wed, 15 Jul 2015 10:31:17 +0000. Up 61.31 seconds.
cloud-init-nonet[67.15]: waiting 10 seconds for network device
cloud-init-nonet[77.14]: waiting 120 seconds for network device
cloud-init-nonet[197.24]: gave up waiting for a network device.

Rebooting the machine from the console, the networking works, but after vagrant down and vagrant up the problem returns

/etc/network/interfaces and /etc/network/interfaces.d look fine. eth0 appears only in eth0.cfg:

auto eth0
iface eth0 inet dhcp

I'm using Windows 7, Vagrant 1.7.3, VirtualBox 5

I'm completely new to Vagrant, so maybe I missed important details

Regards,

Ittay


Alvaro Miranda Aguilera

unread,
Jul 15, 2015, 5:27:25 AM7/15/15
to vagra...@googlegroups.com
On Wed, Jul 15, 2015 at 9:11 PM, Ittay Dror <ittay...@gmail.com> wrote:
> Ittay

Hello Ittay

I did test your sample, and got it working.

can you run

vagrant destroy
if you are running on cmd windows do

set VAGRANT_LOG=debug

if you are in any shell like OSX linux or bash on windows do

export VAGRANT_LOG=debug

then

vagrant up

and share the logs it generate?

Thanks

Ittay Dror

unread,
Jul 15, 2015, 7:54:14 AM7/15/15
to vagra...@googlegroups.com
--
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/kjvUllcx34M/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/CAHqq0eyijjo_thAJzz3BwtbNR%2Bo207yRyyt4BOUhanbP%3DJT%2BTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--

Sent from my Android

vagrant.zip

Alvaro Miranda Aguilera

unread,
Jul 15, 2015, 7:04:01 PM7/15/15
to vagra...@googlegroups.com
Hello,

I did check the logs and noting interesting that I could catch.

Since this is windows, can you please try:

- Disable firewall temporarily and see if works?
- If you have anti-virus, ensure this path is excluded?

C:\Users\idror\VirtualBox VMs\
C:\Users\idror\.vagrant.d


?
> 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/CAP972tHJs3JEaF6VN5oZO0skGhLQoce2%3DKXhHzkVsK08wqZDxQ%40mail.gmail.com.

Ittay Dror

unread,
Jul 16, 2015, 12:25:56 AM7/16/15
to vagra...@googlegroups.com
I turned off firewall, no change. I can't create the exceptions since this is a corporate laptop.


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

Ittay Dror

unread,
Jul 16, 2015, 12:29:22 AM7/16/15
to vagra...@googlegroups.com
BTW, I see that eth0 has an inet6 address: fe80::a00:27ff:fe22:44c6/64. 

Ittay Dror

unread,
Jul 16, 2015, 12:34:46 AM7/16/15
to vagra...@googlegroups.com
After a reboot the interface is up and has an IPv4 IP. So this doesn't sound like a firewall/antivirus issue. It looks like some kind of race where the host machine doesn't have the dhcp up/available when the guest first boots. 

Ittay Dror

unread,
Aug 6, 2015, 4:57:45 AM8/6/15
to Vagrant
So due to another problem I reset my TCP stack (https://iihelp.iinet.net.au/Resetting_TCP/IP_to_Default). Now when I boot the VM it has networking from the first boot. Not sure if this actually solved the problem or not (I didn't boot, saw no networking, reset and then saw there was, so something else might have solved it)


Alvaro Miranda Aguilera

unread,
Aug 6, 2015, 7:19:55 AM8/6/15
to vagra...@googlegroups.com
after you do a vagrant reload it should put the virtual machine back
into a healthy state

Can you test that?

Thanks
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/14f97cfc-a4db-4167-a27a-5390d5cad4df%40googlegroups.com.

Ittay Dror

unread,
Aug 6, 2015, 8:35:59 AM8/6/15
to vagra...@googlegroups.com
The machine is already in a healthy state, so I don't want to try reload for rear it may cause problems


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/kjvUllcx34M/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/CAHqq0eyQjXSkzRXG3Z%2BhkcCVnZhFUwa41kTYedVLPWbS9Udjdg%40mail.gmail.com.

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

dragon788

unread,
Aug 7, 2015, 12:04:05 PM8/7/15
to Vagrant
Reload is simply a reboot, it doesn't re-run provisioning or anything.

Ittay Dror

unread,
Oct 20, 2015, 1:06:03 AM10/20/15
to Vagrant
I started using the VM again and have the same problem. Resetting the windows networking didn't help nor did adding a NAT adapter to VirtualBox. I'm using vagrant 1.7.4 now. 

Trying to reload did not solve the issue.

Rebooting from the machines console doesn't solve the issue either....

I'm at home now, with only wifi, at work I have cable network. Maybe this has something to do with it?

Regards,
Ittay

Ittay Dror

unread,
Oct 20, 2015, 1:10:43 AM10/20/15
to Vagrant
While rebooting the VM, I noticed that Devices->Network->Connect Network Adapter was in an open state (at least I think it was, I clicked a few times before realizing the caption 'connect network adapter' never changes, but the icon does).

So I rebooted again, making sure the icon is in the connected state and the machine loaded with networking. 

Ittay Dror

unread,
Oct 20, 2015, 1:13:44 AM10/20/15
to Vagrant
After doing vagrant reload, the VM boots without networking (the icon is in the connected state).

Ittay Dror

unread,
Oct 20, 2015, 1:40:34 AM10/20/15
to Vagrant
BTW, I have VirtualBox 5.0.6

Ittay Dror

unread,
Oct 20, 2015, 5:49:09 AM10/20/15
to Vagrant
My current solution is to do vagrant reload, then watch the VM console and after it booted, but before vagrant gives up, do 'sudo ifdown eth0 & sudo ifup eth0' after that, vagrant picks the machine and finishes fine. this is of course a lengthy process. 

I made sure again that there is no eth0 in /etc/network/interfaces and just one file in /etc/network/interfaces.d. The file is eth0 and its contents are:
auto eth0
iface eth0 inet dhcp

Alvaro Miranda Aguilera

unread,
Oct 22, 2015, 6:03:55 AM10/22/15
to vagra...@googlegroups.com
Hello Ittay

Can you test a different box?

try:

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

Thanks
Alvaro.
> https://groups.google.com/d/msgid/vagrant-up/d23ac4ab-a004-4981-9cdf-8cc6aff5499f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages