Always have to select the same interface when booting the VM, is there a way to set this somewhere so I don't have to manually press 1 all the time?

15 views
Skip to first unread message

gust...@gmail.com

unread,
Dec 27, 2017, 5:05:58 PM12/27/17
to Vagrant
Hello, 

I've been using vagrant for several years now, and I'm a bit tired of always having to press 1 when it prompts for "Which interface should the network bridge to?"

No matter what, over several years of use in every possible combination, WiFi, Ethernet, etc, it's always been 1, i've pressed 1 when booting my machine thousands of times already, how can I simply select the first one automatically?

Example logs that ask me to press 1, always the same.

==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: A newer version of the box 'ubuntu/xenial64' is available! You currently
==> default: have version '20171006.0.0'. The latest is version '20171221.0.0'. Run
==> default: `vagrant box update` to update.
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Specific bridge '1' not found. You may be asked to specify
==> default: which network to bridge to.
==> default: Available bridged network interfaces:
1) en0: Wi-Fi (AirPort)
2) p2p0
3) awdl0
4) en4: Thunderbolt 3
5) en2: Thunderbolt 4
6) en3: Thunderbolt 1
7) en1: Thunderbolt 2
8) en5: USB Ethernet(?)
9) en7: AX88179 USB 3.0 to Gigabit Ethernet
==> 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
... 

In my Vagrant file I have 

config.vm.network "public_network", ip: "192.168.0.102", bridge: "1"

Clearly, "1" is not working, also, don't want to hardcode a string like "Wi-Fi (AirPort)" or something like that because sometimes I need to set the machine in the public lan through Ethernet, but it will always and has always been 1, a waste of time, sometimes I just want to boot up the machine and while it's booting I go make a coffee and I come back and I have to press 1 and wait the other half of the booting process.
Reply all
Reply to author
Forward
0 new messages