A lot of answers out there are only applicable version 1 of Vagrant file configuration. e.g.
config.vm.network :hostonly, :adapter => 2
public network does not support this feature. e.g. this line here
config.vm.network "public_network", bridge: 'vboxnet0'
Will throw an error because
vboxnet0 is not a network interface like
en0. Here is a screen shot:
I have also tried
config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet0"]
But it has no effect on the virtual machine.
How can I create a new interface like this?
I am using
- Mac OS X 10.10.1
- VirtualBox 4.3.20
- Vagrant 1.6.5