Vagrant: Inputting bridge interface doesn't work

Created on 7 Oct 2016  ยท  9Comments  ยท  Source: hashicorp/vagrant

Vagrant version

Vagrant 1.8.6

Host operating system

Debian GNU/Linux stretch/sid (next-stable)

Guest operating system

debian/jessie64, ubuntu/trusty64

Vagrantfile

    config.vm.network "public_network", ip: "10.0.2.2"

Expected behavior: Vagrant accepts the interface to bridge the network to which was input. Instead, it simply keeps prompting forever.

==> default: Available bridged network interfaces:
1) eth0
2) docker0
3) eth1
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to? eth0
    default: Which interface should the network bridge to? docker0
    default: Which interface should the network bridge to? eth1
    default: Which interface should the network bridge to? 

Most helpful comment

Did you try inputting 1 2 or 3?

==> default: Setting the name of the VM: vagrant-test_default_1475847524816_57809
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) Intel(R) Ethernet Connection I217-LM
2) Marvell Yukon 88E8070 PCI-E Gigabit Ethernet Controller
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: bridged

All 9 comments

Did you try inputting 1 2 or 3?

==> default: Setting the name of the VM: vagrant-test_default_1475847524816_57809
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) Intel(R) Ethernet Connection I217-LM
2) Marvell Yukon 88E8070 PCI-E Gigabit Ethernet Controller
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: bridged

@ageis as @shrmrf has pointed out, the prompt is expecting a number, not the actual name of the device. Using 1 instead of eth0 should get you fixed up. Cheers!

Ha, that makes sense. Thanks.

@chrisroberts Quick question, if I may. Is there any way to set public_network so that it's the address for the Vagrant VM's eth0 instead of an additional interface eth1?

Hello,

I have got similar problem. I know it is probably due to my lack of networking knowledge. I am getting this:

Vagrant 1.9.7

default: Fixed port collision for 22 => 2222. Now on port 2200.
default: Clearing any previously set network interfaces...
default: Available bridged network interfaces:
default: When choosing an interface, it is usually the one that is
default: being used to connect to the internet.
default: Which interface should the network bridge to? 1

I tried to put number of network interface.

It occurs when I am disconnected from the internet(I did that on purpose to see if I will be able to develop without internet access).

I have default Vagrantfile. Only changes made:

  • config.vm.box_check_update = false

    • added provisioning script

I can't pass this issue. Could someone just point me in the right direction here?

I am trying to get to the point where if there is internet connection I am able to use it on my guest if no I should still be able to log into it and work.

Regards,
Rob

I recommend to let users know that they should pass with the number. Currently, it makes users confused

Enter the number on the left hand side. Such as 1 for eth0 in your example.

This is horrible from a usability standpoint. If you do not tell the user to enter a number and ask for a "network interface" anyone would reasonably expect the name of a network interface to be the correct answer and not a number.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barkingfoodog picture barkingfoodog  ยท  3Comments

OtezVikentiy picture OtezVikentiy  ยท  3Comments

jsirex picture jsirex  ยท  3Comments

Cbeck527 picture Cbeck527  ยท  3Comments

tomhking picture tomhking  ยท  3Comments