Virt Manager VM Cannot Connect to Virtual Network (NAT) - Fedora Kinoite

I am struggling to find a fully functional vm solution that has sufficient access to my host and is fairly configurable. I was hoping that virt-manager could be the one, yet the VMs produced cannot connect to virtual network.

  • Tried both with win11 (PE) and Fedora KDE VMs, Fedora does recognize network presence yet refuses to connect.
  • Reinstalled OS, same.
  • Tried different NAT configs with different virt device models, the same.
  • Tried sysctl net.ipv4.ip_forward=1, the same.
  • Modified /etc/libvirt/network.conf with firewall_backend="iptables", the same.

Just some more context, when I enable the libvirtd at the first time, it works; but, after a reboot it fails to work. Also virtual network does work on vm-curator, on vm-curator, folder share does not work (topic for anothe post). Can anyone help me?

Edit: here are the list of packages layered for context: qemu qemu-char-spice qemu-device-display-virtio-gpu qemu-device-display-virtio-vga qemu-device-usb-redirect qemu-img qemu-system-x86-core qemu-user-binfmt qemu-user-static libvirt libvirt-nss edk2-ovmf

Hello @ahmutkadim ,
To start with:
cat /etc/qemu/bridge.conf
allow virbr0

If you have configured a libvirt VM as default using NAT then it is very difficult to interact between the VM and the host, and all connections will need to originate from the guest to the host. Additionally, the guest must use the host external IP to connect.

If, instead, you chose to use a bridge device and set it to use virbr0 then it is very easy to communicate in both directions, guest to host and host to guest. The virtual address for the host should then be either 192.168.124.1 or 192.168.122.1 and the guest will have an IP on that same subnet.

When using bridging the affects of NAT are no longer in the picture.

yes its enabled.

I do understand; but, I am not concerned with network access of my vms, if I were to, I would have removed their NIC device, is there a simple way to fix NAT for virt-manager? If not I guess I can do bridge network; but, is there an easy guide for this?

libvirt will not create bridge for you. You need to create the bridge with the network configuration and libvirt can then create a network using that bridge.

You could ask your favorite google with “how do I create a network bridge with NetworkManager”. I would look at this guide.

If you install nm-connection-editor-desktop the connection editor can create a bridge the gui way. The network editor that comes with gnome is a bit cribbled in comparison with nm-connection-editor.

Be aware that the bridged network in the guest systems are just as open as the host system so the firewall on the guest system must be configured accordingly.

I have tried to create a bridge with both nm-connection-editor and plasma-nm, in plasma, I was able to add wifi as the bridge interface, on the former, it did not; hence, left it empty, both of them got stuck when I tried to connect to their produced networks (they got stuck on collecting an ip address). I did not see a tutorial about this that is specific to fedora, I assume fedora does something different since NAT does not work. Can you specifically give me which configurations I must provide to make this bridge network connect, also, again, I would much prefer fixing NAT since this bridge network adds an extra level of complexity for a thing I will heavily depend on. Any help would be appreciated.

wifi does not work well with a bridge set-up. For many years I have used the default nat configurations as it is set up by default by libvirt, and it has always worked. It is using dnsmasq as dns and dhcp server for the clients, and the configurations is also handled by libvirt when choosing the default network setup.

Sorry for not testing atomic versions, but in ‘normal’ Fedora installing VM looks like this
sudo dnf in @virtualization
and both Wifi and Wired connection work out of the box with the default settings.

I did figure out that when I first start virtnetworkd then libvirtd, it works; I have no idea why or how, can I make systemd start in the order I specify? Does anyone have any other ideas?

sudo virsh net-start default
sudo virsh net-autostart default

May help you. Then check status:

sudo virsh net-list --all

[sudo] password for <user>
 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes

The status was already as this when I am having this issue, it still cannot connect to network unless I manually start libvirtd and virtnetworkd in order (tried your suggestion after fully disabling virtnetworkd, only having libvirtd enabled)

This is not recommended, see:
Changes/LibvirtModularDaemons - Fedora Project Wiki

Better do the following:

sudo systemctl enable virtnetworkd.service --now 

Try and post the result of systemctl status libvirtd virtnetworkd

That should by default show the following (on the host) with no VM running.

$ systemctl status libvirtd virtnetworkd
○ libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: ○ libvirtd-admin.socket
             ○ libvirtd.socket
             ○ libvirtd-ro.socket
       Docs: man:libvirtd(8)
             https://libvirt.org/

○ virtnetworkd.service - libvirt network daemon
     Loaded: loaded (/usr/lib/systemd/system/virtnetworkd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: ● virtnetworkd-admin.socket
             ● virtnetworkd.socket
             ● virtnetworkd-ro.socket
       Docs: man:virtnetworkd(8)
             https://libvirt.org/

and it shows the same on the VM when running while still having the network active within the VM.

$ systemctl status libvirtd virtnetworkd
\u25cb libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/libvirtd.service.d
             \u2514\u250010-secret.conf
             /usr/lib/systemd/system/service.d
             \u2514\u250010-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: \u25cb libvirtd-ro.socket
             \u25cb libvirtd-admin.socket
             \u25cb libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org/

\u25cb virtnetworkd.service - libvirt network daemon
     Loaded: loaded (/usr/lib/systemd/system/virtnetworkd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             \u2514\u250010-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: \u25cf virtnetworkd.socket
             \u25cf virtnetworkd-admin.socket
             \u25cf virtnetworkd-ro.socket
       Docs: man:virtnetworkd(8)
             https://libvirt.org/


$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=6.71 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=6.51 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=8.16 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 6.507/7.125/8.163/0.738 ms


$ ip r
default via 192.168.124.1 dev enp1s0 proto dhcp src 192.168.124.232 metric 100 
192.168.124.0/24 dev enp1s0 proto kernel scope link src 192.168.124.232 metric 100 

On the host with the VM running I see this.

$ systemctl status libvirtd virtnetworkd
○ libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: ○ libvirtd-admin.socket
             ○ libvirtd.socket
             ○ libvirtd-ro.socket
       Docs: man:libvirtd(8)
             https://libvirt.org/

● virtnetworkd.service - libvirt network daemon
     Loaded: loaded (/usr/lib/systemd/system/virtnetworkd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Mon 2026-10-12 19:52:21 CDT; 5min ago
 Invocation: c8a0ee60dc9c42aebff6cd8428b2abc6
TriggeredBy: ● virtnetworkd-admin.socket
             ● virtnetworkd.socket
             ● virtnetworkd-ro.socket
       Docs: man:virtnetworkd(8)
             https://libvirt.org/
   Main PID: 1624350 (virtnetworkd)
      Tasks: 21 (limit: 38337)
     Memory: 6.7M (peak: 13.2M)
        CPU: 148ms
     CGroup: /system.slice/virtnetworkd.service
             ├─1624350 /usr/bin/virtnetworkd --timeout 120
             ├─1624421 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
             └─1624422 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Oct 12 19:52:21 eagle.home.domain dnsmasq[1624421]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth DNSSEC l>
Oct 12 19:52:21 eagle.home.domain dnsmasq-dhcp[1624421]: DHCP, IP range 192.168.124.2 -- 192.168.124.254, lease time 1h
Oct 12 19:52:21 eagle.home.domain dnsmasq-dhcp[1624421]: DHCP, sockets bound exclusively to interface virbr0
Oct 12 19:52:21 eagle.home.domain dnsmasq[1624421]: reading /etc/resolv.conf
Oct 12 19:52:21 eagle.home.domain dnsmasq[1624421]: using nameserver 127.0.0.53#53
Oct 12 19:52:21 eagle.home.domain dnsmasq[1624421]: read /etc/hosts - 21 names
Oct 12 19:52:21 eagle.home.domain dnsmasq[1624421]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names
Oct 12 19:52:21 eagle.home.domain dnsmasq-dhcp[1624421]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Oct 12 19:52:41 eagle.home.domain dnsmasq-dhcp[1624421]: DHCPREQUEST(virbr0) 192.168.124.232 52:54:00:b6:54:f7
Oct 12 19:52:41 eagle.home.domain dnsmasq-dhcp[1624421]: DHCPACK(virbr0) 192.168.124.232 52:54:00:b6:54:f7 f45

When the VM is started the socket is created that then launches virtnetworkd with no user action. The Triggered By in that status report shows what starts it even when disabled.

Unless there’s a difficult to reproduce race condition resulting in a deadlock that matches the symptoms described by the OP.

Since I have personally experienced a similar issue in the past, I now have this service enabled with a custom preset to eliminate any possibility of the problem happening again.

I’ve also faced this race condition on Kinoite. I’ve had some success in fixing it by running systemctl restart libvirtd.service (it is initially started automatically). Only as a temporary solution, though.

For completeness: The followin lists the libvirt unites that are enabled by default and disabled by default. Most of the services are socket activated, that is, started if and when needed.

virtinterfaced-admin.socket                     enabled
virtinterfaced-ro.socket                        enabled
virtinterfaced.socket                           enabled
virtlockd-admin.socket                          enabled
virtlockd.socket                                enabled
virtlogd-admin.socket                           enabled
virtlogd.socket                                 enabled
virtnetworkd-admin.socket                       enabled
virtnetworkd-ro.socket                          enabled
virtnetworkd.socket                             enabled
virtnodedevd-admin.socket                       enabled
virtnodedevd-ro.socket                          enabled
virtnodedevd.socket                             enabled
virtproxyd-admin.socket                         enabled
virtproxyd-ro.socket                            enabled
virtproxyd.socket                               enabled
virtqemud-admin.socket                          enabled
virtqemud-ro.socket                             enabled
virtqemud.service                               enabled
virtqemud.socket                                enabled
virtsecretd-admin.socket                        enabled
virtsecretd-ro.socket                           enabled
virtsecretd.socket                              enabled
virtstoraged-admin.socket                       enabled
virtstoraged-ro.socket                          enabled
virtstoraged.socket                             enabled

libvirt-guests.service                          disabled
libvirtd-admin.socket                           disabled
libvirtd-ro.socket                              disabled
libvirtd-tcp.socket                             disabled
libvirtd-tls.socket                             disabled
libvirtd.service                                disabled
libvirtd.socket                                 disabled
virtinterfaced.service                          disabled
virtlockd.service                               disabled
virtlogd.service                                disabled
virtnetworkd.service                            disabled
virtnodedevd.service                            disabled
virtproxyd-tcp.socket                           disabled
virtproxyd-tls.socket                           disabled
virtproxyd.service                              disabled
virtsecretd.service                             disabled
virtstoraged.service                            disabled

As suggested, I did try to use individual new services as the replacement libvirt and enabled invidually virtnetworkd,virtproxyd,virtqemud,virtstoraged,virtinterfaced, it still does not work.

Destroying and re-starting the default interface from virsh kinda fixes the issue; but, the fix does not persist through a reboot.

While I am not sure whether this is related, I heard that vpns can interfere with network stuff and I have unofficial flatpak of protonvpn on my system; but, closed during these troubleshooting info given on this thread.

here is the systemd log/info from the session, excuse the locale mismatch:

Eki 14 21:47:47 ahmet-casper-dizustu systemd\[1\]: Started virtnetworkd.service - libvirt network daemon. 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: started, version 2.92rel2 cachesize 150 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n I> 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq-dhcp\[1664\]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lea> 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq-dhcp\[1664\]: DHCP, sockets bound exclusively to interface virbr0 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: reading /etc/resolv.conf 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: using nameserver 127.0.0.53#53 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: read /etc/hosts - 8 names 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq\[1664\]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names 
Eki 14 21:47:48 ahmet-casper-dizustu dnsmasq-dhcp\[1664\]: read /var/lib/libvirt/dnsmasq/default.hostsfile

also here are relevant journalctl logs (at least they are from the correct timeframe idk, whether they are informative)

b4/4-3/4-3:1.0/host1/target1:0:0/1:0:0:0/block/sda has been removed.
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=disk reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-disk="?" new-disk="/var/lib/libvirt/images/fedora-test.qcow2" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=net reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-net="?" new-net="52:54:00:71:f0:a3" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=dev reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 bus=usb device="004.002" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=dev reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 bus=usb device=555342207265646972646576 exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=dev reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 bus=usb device=555342207265646972646576 exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=chardev reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-chardev="?" new-chardev="/dev/pts/1" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=chardev reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-chardev="?" new-chardev="/run/libvirt/qemu/channel/2-fedora-test/org.qemu.guest_agent.0" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=rng reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-rng="?" new-rng="/dev/urandom" exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=mem reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-mem=0 new-mem=8388608 exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2501 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm resrc=vcpu reason=start vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 old-vcpu=0 new-vcpu=4 exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu audit[1401]: AUDIT2500 pid=1401 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtqemud_t:s0 msg='virt=kvm op=start reason=booted vm="fedora-test" uuid=919b2737-2898-4da7-bb41-9d94cc794b92 vm-pid=5393 exe="/usr/bin/virtqemud" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:43 ahmet-casper-dizustu virt-manager[2734]: Warning no automount-inhibiting implementation available
Eki 14 22:03:44 ahmet-casper-dizustu avahi-daemon[1118]: Joining mDNS multicast group on interface vnet1.IPv6 with address fe80::fc54:ff:fe71:f0a3.
Eki 14 22:03:44 ahmet-casper-dizustu avahi-daemon[1118]: New relevant interface vnet1.IPv6 for mDNS.
Eki 14 22:03:44 ahmet-casper-dizustu avahi-daemon[1118]: Registering new address record for fe80::fc54:ff:fe71:f0a3 on vnet1.*.
Eki 14 22:03:45 ahmet-casper-dizustu kernel: virbr0: port 1(vnet1) entered learning state
Eki 14 22:03:46 ahmet-casper-dizustu kwin_wayland[2176]: qrc:/qt/qml/org/kde/kwin/overview/qml/Main.qml:851:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Eki 14 22:03:47 ahmet-casper-dizustu NetworkManager[1126]: <info>  [1792040627.1516] device (virbr0): carrier: link connected
Eki 14 22:03:47 ahmet-casper-dizustu kernel: virbr0: port 1(vnet1) entered forwarding state
Eki 14 22:03:47 ahmet-casper-dizustu kernel: virbr0: topology change detected, propagating
Eki 14 22:03:47 ahmet-casper-dizustu kwin_wayland[2176]: Could not delete render time query because no context is current
Eki 14 22:03:53 ahmet-casper-dizustu systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Eki 14 22:03:53 ahmet-casper-dizustu audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Eki 14 22:03:58 ahmet-casper-dizustu kernel: usb 4-3: reset SuperSpeed USB device number 2 using xhci_hcd
Eki 14 22:07:14 ahmet-casper-dizustu kwin_wayland[2176]: qrc:/qt/qml/org/kde/kwin/overview/qml/Main.qml:851:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Eki 14 22:07:14 ahmet-casper-dizustu kwin_wayland[2176]: Libinput: event6  - SYNA3602:00 093A:0255 Touchpad: kernel bug: Touch jump detected and discarded.
                                                         See https://wayland.freedesktop.org/libinput/doc/1.31.3/touchpad-jumping-cursors.html for details
Eki 14 22:07:16 ahmet-casper-dizustu kwin_wayland[2176]: Could not delete render time query because no context is current
Eki 14 22:07:16 ahmet-casper-dizustu kwin_wayland[2176]: Could not delete render time query because no context is current

I found this from Gemini and ashamably it works, had to edit the libvirtd service:

[Unit]
After=network-online.target firewalld.service NetworkManager.service
Wants=network-online.target firewalld.service

I would be surer if someone gave this a look and/or its actually upstreamed so that I would not need to do this every install.