Can't start virtual network in Virtmanager

I am having some trouble configuring network access for Virtmanager. I have had a look at the NixOS wiki and tried to find a relevant answer elsewhere with no luck.

When creating a new VM, Virtmanager attempts to start the Virtual Network and fails:

Could not start virtual network 'default': internal error: Failed to apply firewall rules [nix-store-id]/bin/iptables -w --table filter --insert LIBVIRT_FWO --in-interface virbr0 --jump REJECT: Warning: Extension REJECT revision 0 not supported, missing kernel module? iptables v1.8.8 (nf_tables): RULE_INSERT failed (No such file or directory): rule in chain LIBVIRT_FWO

I have followed all the steps in the NixOS wiki and also added:

trustedInterfaces = [ "virbr0" ];
virtualisation.libvirtd.enable = true;

I am on the default Linux kernel and disabling the firewall does not make a difference.

What more do I need to do?

4 Likes

My libvirt used to work fine, but at some point it stopped working as well with the same error message. I assume I did an update somewhere along the line.

Did you ever figure out what caused your issue?

I’m able to get it to work by manually running sudo virsh net-start default but haven’t quite figured out why I now need to do that.

3 Likes

Has anyone already found a solution for this?

same.

At least this narrowed down the problem for me quite a bit. … and it’s a decent workaround. Maybe I’ll come back with an actual fix in nixos.

according to the wiki we have to do some imperative commands for it to work. Not sure why this isn’t added to the nixos option by default and it even is explicitly mentioned in the nixos wiki: