Libvirt, bridging, eth0: no such device...

869 views
Skip to first unread message

HiFi

unread,
Sep 29, 2017, 11:19:04 AM9/29/17
to Vagrant
Hello, 

I am working on a CentOS7 libvirt hypervisor running Vagrant 2.0.0 and using the vagrant box found here: https://app.vagrantup.com/centos/boxes/6.

I am trying to configure a vagrant box with a bridged interface using the documentation examples at vagrant-up.com. When I add this line to my Vagrantfile:
config.vm.network "public_network", bridge: "br0"

Then do:
vagrant up

I get this error:
Call to virDomainCreateWithFlags failed: Unable to get index for interface eth0: No such device

I've had to use this syntax in order for it to work:
config.vm.network "public_network", :dev => "br0", :mode => 'bridge', :type => "bridge"


I have 2 questions:
  1. Is the documentation outdated?
  2. When this does work, it creates a second network device (eth1) on the vagrant box which is connected to the host via br0. Eth0 is connected to the host via (vagrant-libvirt). Is there a way to have my bridge as eth0?


Thanks...
Reply all
Reply to author
Forward
0 new messages