What should I add in Vagrant file to prevent asking (after vagrant up command)
Which interface should the network bridge to?
Available bridged network interfaces: 1) Intel(R) 82579LM Gigabit Network Connection 2) VMware Virtual Ethernet Adapter for VMnet1 3) VMware Virtual Ethernet Adapter for VMnet8
I want to select the #1 option. Current I need to enter "1" manually. Please help!
Default Network Interface If more than one network interface is available on the host machine, Vagrant will ask you to choose which interface the virtual machine should bridge to. A default interface can be specified by adding a :bridge clause to the network definition.
The IP address can be determined by using vagrant ssh to SSH into the machine and using the appropriate command line tool to find the IP, such as ifconfig .
To configure private or host-only networking in Vagrant with static IP address, open the Vagrantfile, find the following line and uncomment it. Here, 192.168. 121.60 is the IP address of the VM. Replace this with your own IP.
in your Vagrantfile, you should add
config.vm.network "public_network", bridge: "Intel(R) 82579LM Gigabit Network Connection"
Then it should make vagrant happy (actually its more VirtualBox that is getting happy in this case) and select the correct network adapter for the VM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With