I start a Vagrant instance with a totally new box ubuntu/trusty64
When vagrant up, it stopped and ask me to choose the options.
==> default: Available bridged network interfaces:
1) eth0
2) docker0
==> 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...
Seems to me that's a new feature I didn't see before, how can I fix it? I'd like it to be eth0.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 443, host: 8443
config.vm.network "private_network", ip: "192.168.33.10", :auto_network => true
config.vm.network "public_network"
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
# enable when need debug
# vb.gui = true
vb.memory = "1024"
end
config.vm.provision "shell", :path => 'vagrant.sh'
end
ubuntu@ip-172-31-13-13:~$
Hi @SydOps
Please see the documentation for bridged networking: https://docs.vagrantup.com/v2/networking/public_network.html
You can specify the adapter like this:
config.vm.network "public_network", bridge: "eth0"
@sethvargo @SydOps thanks this helped me was struggling on this for a while now.
Just a quick note for others
My vagrant up log showed me this.
==> default: Clearing any previously set network interfaces...
==> default: which network to bridge to.
==> default: Available bridged network interfaces:
1) en0: Wi-Fi (AirPort)
2) en1: Thunderbolt 1
3) en2: Thunderbolt 2
4) p2p0
5) bbptp0
6) awdl0
7) bridge0
and I had to add full name of adapter as displayed. won't work if you only give initial en0
config.vm.network "public_network", bridge: "en0: Wi-Fi (AirPort)"
@PriteshJain thx
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.
Most helpful comment
@sethvargo @SydOps thanks this helped me was struggling on this for a while now.
Just a quick note for others
My
vagrant uplog showed me this.and I had to add full name of adapter as displayed. won't work if you only give initial
en0