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?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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?

gustavrod
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b88a8077-21cb-45aa-8666-862005597e1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.