Virtmanager unable to create VM successfully

Hey guys whenever I try to finalize my virtmanager configuration it fails.

When I clicked on “Finish” I get this pop up message and I click “Yes” to it.

I then get these two error messages:

Could not start virtual network 'default': internal error: firewalld is set to use the nftables backend, but the required firewalld 'libvirt' zone is missing. Either set the firewalld backend to 'iptables', or ensure that firewalld has a 'libvirt' zone by upgrading firewalld to a version supporting rule priorities (0.7.0+) and/or rebuilding libvirt with --with-firewalld-zone

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/device/netlist.py", line 208, in _check_network_is_running
    netobj.start()
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/network.py", line 69, in start
    self._backend.create()
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 3547, in create
    raise libvirtError('virNetworkCreate() failed')
libvirt.libvirtError: internal error: firewalld is set to use the nftables backend, but the required firewalld 'libvirt' zone is missing. Either set the firewalld backend to 'iptables', or ensure that firewalld has a 'libvirt' zone by upgrading firewalld to a version supporting rule priorities (0.7.0+) and/or rebuilding libvirt with --with-firewalld-zone

and

Unable to complete install: 'Requested operation is not valid: network 'default' is not active'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createvm.py", line 2008, in _do_async_install
    installer.start_install(guest, meter=meter)
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 695, in start_install
    domain = self._create_guest(
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 637, in _create_guest
    domain = self.conn.createXML(initial_xml or final_xml, 0)
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 4481, in createXML
    raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active

I have already installed sudo pikaur -S --needed qemu virt-manager ebtables and I did do the following then for libvirtd

sudo systemctl enable libvirtd
sudo systemctl start libvirtd
sudo usermod -G libvirt -a joe

So yeah not too sure why this is happening?

Generally for networking you need these for the default nat/dhcp nic

iptables-nft dnsmasq dmidecode

or

bridge-utils

for bridged, you can just install all those if you want to.

my usual install for it is

sudo pacman -Syu virt-manager qemu-desktop dnsmasq iptables-nft bridge-utils dmidecode

be sure to check the libvirt archwiki for other information
https://wiki.archlinux.org/title/Libvirt

1 Like

Try
KVM - Fix Missing Default Network or forum.endeavouros.com …

1 Like

Did you reboot after installing those? You might be able to get it working with just

sudo firewall-cmd --reload

libvirt adds a firewalld zone.

2 Likes

what do dnsmasq iptables-nft bridge-utils dmidecode all do though?

Still have issues but will check out your link, thanks :slight_smile:

Thanks that works :slight_smile:

1 Like

THanks for the link.

Nice profile pic by the way :slight_smile:

1 Like

By the way why do I have to run this?

No, but if you don’t then you’ll have to input your root password every time you open virt-manager.

1 Like

Dnsmasq provides network services like dhcp,etc

Iptables-nft is a firewall

Bridge-utils utilities for network bridging

Dmidecode does what it says on the tin, decodes dmi (which contains hardware info)

1 Like

Now I am again having hte same network issues for some odd reason.

I tried running sudo firewall-cmd --reload still got same issues:

Error starting domain: Requested operation is not valid: network 'default' is not active

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 1373, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active

I just checked libvirtd and it says it is enabled but preset is disabled.

joe@joe-z97xsoc ~> sudo systemctl status libvirtd
[sudo] password for joe: 
● libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-01-29 10:45:31 AEDT; 2min 2s ago
TriggeredBy: ● libvirtd-ro.socket
             ● libvirtd.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 735 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 46.3M
        CPU: 306ms
     CGroup: /system.slice/libvirtd.service
             └─735 /usr/bin/libvirtd --timeout 120

Jan 29 10:45:31 joe-z97xsoc systemd[1]: Starting Virtualization daemon...
Jan 29 10:45:31 joe-z97xsoc libvirtd[735]: libvirt version: 9.0.0
Jan 29 10:45:31 joe-z97xsoc libvirtd[735]: hostname: joe-z97xsoc
Jan 29 10:45:31 joe-z97xsoc libvirtd[735]: Libvirt doesn't support VirtualBox API version >
Jan 29 10:45:31 joe-z97xsoc systemd[1]: Started Virtualization daemon.

delete and remake the NIC in the VM settings. That should resolve the issue, I had that in a VM a few times and thats how i fixed it

1 Like

That fixed it thanks

The Default network does not start automatically

-In virt-manager right click on QEMU/KVM, select Details
-Change to the Virtual Networks tab
-On this tab, at the bottom, click the arrow (2nd from left, should say Start Network when you hover over it)
-You can also place a check in Autostart above (4th line down), and the Default network will always start when you reboot
-Click Apply bottom right

image

1 Like

I will do that now thanks :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.