Celeb Glow
news | March 22, 2026

There was an error talking to Libvirt: Call to virDomainCreateWithFlags failed: Unable to get index for interface eth0: No such device

My computer is Ubuntu Desktop 16.

I am using Vagrant and KVM libvirt to create virtual machines.

However, I want my machines to connect to the Wi-Fi of my home and have IP addresses of the Wi-Fi network.

When I mention the "public network" option in Vagrantfile, and I "vagrant up", I get the following error:

There was an error talking to Libvirt. The error message is shown
below:
Call to virDomainCreateWithFlags failed: Unable to get index for interface eth0: No such device

And I have the following as my Vagrantfile code:

Vagrant.configure("2") do |config| config.vm.network "public_network" config.vm.define "master" do |master| master.vm.hostname = "master" master.vm.box = "s3than/trusty64" end
end

How can I fix the problem? Please I need the exact commands I am a very basic beginner in Linux. HELP ASAP!!

Thanks.

2 Answers

If you don't have an eth0 in your interfaces, then as a workaround you can edit your wireless interface to be eth0 as it is hardcoded somewhere in the module to look for that name. You need to create /etc/udev/rules.d/70-rename-wireless.rules and insert the following into it:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0

Where ATTR is the HWaddr field from ifconfig -a.

9

I followed the README.md example at the root of the repo, which worked for me

 config.vm.network :public_network, :dev => "virbr0", :mode => "bridge", :type => "bridge"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy