-1

Im running a vagrant file to bring up a CentOS Virtual Box on OSX, but when running vagrant up it always fails at default: Configuring and enabling network interfaces... with the error:

The following SSH command responded with a non-zero exit status.

Vagrant assumes that this means the command failed!

/sbin/ifup eth2 2> /dev/null

Stdout from the command:


Determining IP information for eth2... failed.


Stderr from the command:

I had a member of my team find a workaround for this relatively quickly, I believe they disabled the adaptor somehow either on the host or the guest but I have tried for hours and cannot seem to figure out how they did it.

I've tried a lot of the solutions suggested, such as disabling en2 on the host using ifconfig en2 down.

I've tried editing and removing the files on the guest at /etc/udev/rules.d/70-persistent-net.rules but these are always rebuilt by vagrant.

I've tried editing the files on the guest at /etc/sysconfig/network-scripts/ifcfg-eth2 to set ONBOOT=no but again these are rebuilt by vagrant.

The problem is that I do not have access to the original Virtual Box to edit any of the configuration before it is packaged.

This is a company Mac and this is the second one I have tried it on, although on a non-company Mac it did not have the same issue.

I know that there is a way to stop Vagrant trying to configure eth2, I just cant figure out how to do it (or any other workaround) without having the original Virtual Box.

JackalopeZero
  • 201
  • 2
  • 8

1 Answers1

0

It turns out that eth2 is the adaptor to connect the VirtualBox directly to the outside Internet, so commenting out

config.vm.network :public_network

from the VagrantFile stopped the public network interfaces being loaded and so solved the issue.

JackalopeZero
  • 201
  • 2
  • 8