Virtual machines created in virt-manager fail to establish a connection on the NAT network

I’ve been trying to get virt-manager working to create some small VMs for work reasons. I’ve enabled the required modules, and I’ve enabled virsh net-autostart default.

programs.virt-manager.enable = true;
virtualisation.libvirtd.enable = true;
users.users.frontear.extraGroups = [ "libvirtd" ];

I created an Ubuntu virtual machine and tried to install the ISO into the VM, and I’ve immediately run into an issue where the network simply does not work.

Taking a look at Virt-manager - Official NixOS Wiki, I gave the virtual interface full access through the firewall and tried again, which did not do anything. Looking at virt-manager - ArchWiki, I checked that my system is using iptables, and I have already seen that the NixOS module correctly sets up the required config files with the appropriate settings, so that’s also a no go. At this point I really don’t know why it’s not working, and I have no clue how to proceed. Any ideas what’s going on?

Hello,

Are you using networking.stevenblack.enable by any chance?

1 Like

Why yes I am. Given how you’ve asked this question, I presume there must be something with that module?

There is currently an issue with the blocklist which crashes dnsmasq, it should be fixed in dnsmasq 2.93.

Here is the relevant issue stevenblack-blocklist: entry "fe80::1%lo0 localhost" crashes dnsmasq, breaking DHCP on libvirt networks · Issue #525573 · NixOS/nixpkgs · GitHub (sorry I did not have the link handy for my first message…)

2 Likes

Wow that’s so unexpected but good to know. I kind of wonder why using quickemu works fine, maybe its not using the same approach to setting up the network?

Either way I’ll be sure to check this out tonight, and will update if it works to update dnsmasq.