libvirt: "Failed to initialize a valid firewall backend"
Installing ebtables
and dnsmasq
seems to fix the problem. Don't forget to restart the libvirtd
service.
The commands:
sudo pacman -Syu ebtables dnsmasq
sudo systemctl restart libvirtd
NOTE: do not forget to close and re-open your virt-manager
GUI (if you're using one).
EDIT: The original answer suggested also installing firewalld
. This doesn't seem to be necessary for many users, and may add an additional unwanted firewall to your system. However if you want to try it, you can add the following commands as well:
sudo pacman -Syu firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo systemctl restart libvirtd
This is the error that comes up if libvirtd was started without ebtables
and/or dnsmasq
installed. If you've got them installed and you're still having this issue, you probably need to restart the libvirtd
service:
sudo systemctl restart libvirtd.service
Credit to the comments on the other answer to this question for illuminating this. I'm submitting it as a new and separate answer to the original question because installing and starting firewalld
to solve the original problem is liable to cause new problems: once the firewall daemon is running, most of the services you'll want within your virtual machine, including DHCP, will be blocked by default, meaning that your VMs will not be able to reach the network on initialization.
I lost over an hour of my life trying to track down this problem, and tracing it to a firewall I had just enabled was one of the dumbest sources of a bug that I've ever run into. Don't let it take any time from yours.