Public bug reported: In trying to launch a standard ubuntu/bionic64 Vagrant box on 18.04 LTS I found it fails with the report:
Call to virDomainCreateWithFlags failed: Unable to get index for interface eth0: No such device" which is directly from libvirt (same error in syslog). For many hours I thought it was due to my not getting a config.vm.network :public_network, ... statement correct in Vagrantfile. Finally I commented it out and the error still occurred! At that point I realised the culprit is the 'hidden' management_network configuration. I dived into the source-code and see that there is no attribute exposed to set the @device value and therefore it uses the default of "eth0": lib/vagrant-libvirt/action/create_network_interfaces.rb:85: @device = iface_configuration.fetch(:dev, 'eth0') This is becoming even more of an issue now that most distributions are using systemd/udevd > v197 "Predictable Network Interface Names" ( https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ ). It is definitely something to be solved in this module rather than requiring what could be disruptive changes to the host configuration via kernel command-line net.ifnames=0 biosdevname=0. This needs documenting as a gotcha up-front for newcomers especially (in docs and in the generated Vagrantfile) and an attribute provided to over-ride the interface device name at a minimum. It would be preferable to detect the host's interface. Manually that is achieved with: brctl show $(virsh net-info vagrant-libvirt | awk '/^Bridge:/{print $2}' ) | awk 'NR != 1{print $4}' I did try working around it using an alias, but that isn't exposed in any useful way as an alternate name, as in: sudo ip link set virbr1-nic alias eth0 Upstream have added an attribute to control @device since: commit 7f50ca2 Author: qazokm qaz...@users.noreply.github.com Date: Fri Feb 23 12:09:49 2018 +0800 Add basic networking support for qemu session which has added this among many other additions: @management_network_device = 'virbr0' if @management_network_device == UNSET_VALUE @system_uri = 'qemu:///system' if @system_uri == UNSET_VALUE ** Affects: vagrant-libvirt Importance: Unknown Status: Unknown ** Affects: vagrant-libvirt (Ubuntu) Importance: Undecided Status: New ** Bug watch added: github.com/vagrant-libvirt/vagrant-libvirt/issues #609 https://github.com/vagrant-libvirt/vagrant-libvirt/issues/609 ** Also affects: vagrant-libvirt via https://github.com/vagrant-libvirt/vagrant-libvirt/issues/609 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1784229 Title: 18.04: VM fails to start due to management_network assuming non- existent interface eth0 To manage notifications about this bug go to: https://bugs.launchpad.net/vagrant-libvirt/+bug/1784229/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs