2

I've recently upgraded to Vagrant 1.7.4 on a Ubuntu 12.04 host. I have a development vm that I've run everyday for the last year. After upgrading, vagrant no longer creates the network interface for the private network defined in the Vagrant file.

My Vagrantfile looks like this:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "devbox-4"

  config.vm.network :forwarded_port, guest: 11211, host: 11211
  config.vm.network :forwarded_port, guest: 5672, host: 5672
  config.vm.network :forwarded_port, guest: 5432, host: 5432

  config.vm.network :private_network, ip: "192.168.255.10"

end

ifconfig run inside the VM outputs the following

eth0      Link encap:Ethernet  HWaddr 08:00:27:83:e7:ad  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe83:e7ad/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26887 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26397 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1655137 (1.6 MB)  TX bytes:1481978 (1.4 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14275 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14275 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4278264 (4.2 MB)  TX bytes:4278264 (4.2 MB)

As you can see the defined private network just isn't there.

As far as I know the way to specify network interfaces hasn't changed in Vagrant 1.7.4, so what am I missing?

My versions for the various programs involved are:

Host OS: Ubuntu 12.04
Vagrant: 1.7.4
Virtualbox: 4.2.20
Guest OS: Ubuntu 12.04

Also, when I start the VM I see the following lines in the output:

default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...

The retrying line shows about a dozen times before the startup process continues. It ends with:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip addr flush dev eth1 2> /dev/null

Stdout from the command:

Stderr from the command:

But then I can ssh the VM with vagrant ssh just fine.

  • Do you get the same problem if you move the :private_network line above the :forwarded_port lines? – cricket_007 Dec 21 '15 at 22:59
  • Yes, the result is exactly the same – Patrick Larrivee-Woods Dec 21 '15 at 23:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.