Can anyone explain why I am getting the following error
"Vagrant: Network type 'bridged' is invalid. Please use a valid network type."
when I try to bring vagrant up on Virtual Box with the following Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.hostname = "gitserver"
config.berkshelf.enabled = true
config.vm.box = "centos57"
config.vm.box_url = "http://xx.xx.xx.xx/os/centos-5.7-x86_64.box"
config.vm.network :bridged, :bridge => 'eth0'
# Provision VM using chef
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "mysqlserver"
end
config.vm.customize ["modifyvm", :id, "--memory", 1024]
end
I have tried all possible combinations with bridged configuration, but it simply does not like it. I cannot find any additional info as to why. Any help here would be hugely appreciated.
Since you are using a Vagrant config file version 2 (and therefore Vagrant 1.1+) instead of :bridge
there is now the new type :public_network.
To use v1 code, you can insert it into a config 1 block like this:
Vagrant.configure("1") do |config|
config.vm.network :bridged, :bridge => 'eth0'
end
For Vagrant 1.3.5 in used the following:
config.vm.network :public_network, bridge: "en0: Wi-Fi (AirPort)"
It worked for me.
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