I am trying to spin up a VM using KVM on Ubuntu. I am faced with an error when trying to set up Network settings no matter the choice:
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/dist-packages/libvirt.py", line 4529, in createXML
raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active
the error remains even when i change the default network settings with sudo virsh net-edit default
. for relevance this is the output of sudo virsh net-dumpxml default
:
<network>
<name>default</name>
<uuid>b0eca941-5334-4c98-b372-ecf3d44661c4</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:2d:68:a5'/>
<ip address='192.168.88.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.88.2' end='192.168.88.254'/>
</dhcp>
</ip>
</network>
when running sudo virsh net-start default
i get this output:
error: Failed to start network default
error: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper) unexpected exit status 2:
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
i found solutions claining that downgrading with sudo apt install dnsmasq-base=2.86-1.1
should solve the issue but that version is sadly not available on my instance.
those errors are reflected once again in systemctl status libvirtd
:
● libvirtd.service - libvirt legacy monolithic daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-06-21 12:10:40 UTC; 1h 47min ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd-ro.socket
● libvirtd.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Main PID: 1359677 (libvirtd)
Tasks: 20 (limit: 32768)
Memory: 13.4M (peak: 45.4M)
CPU: 17.337s
CGroup: /system.slice/libvirtd.service
└─1359677 /usr/sbin/libvirtd --timeout 120
Jun 21 12:48:03 homeserver dnsmasq[1413717]: FAILED to start up
Jun 21 12:48:03 homeserver libvirtd[1359677]: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/>
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
Jun 21 12:49:45 homeserver libvirtd[1359677]: operation failed: network 'default' already exists with uuid b0eca941-5334-4c98-b372-ecf3d44661c4
Jun 21 13:29:50 homeserver dnsmasq[1478276]: failed to create listening socket for 192.168.122.1: Address already in use
Jun 21 13:29:50 homeserver dnsmasq[1478276]: FAILED to start up
Jun 21 13:29:50 homeserver libvirtd[1359677]: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/>
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
Jun 21 13:32:52 homeserver libvirtd[1359677]: internal error: range 192.168.122.2 - 192.168.122.254 is not entirely within network 192.168.88.1/24
Jun 21 13:33:39 homeserver dnsmasq[1484116]: failed to create listening socket for 192.168.88.1: Address already in use
Jun 21 13:33:39 homeserver dnsmasq[1484116]: FAILED to start up
Jun 21 13:33:39 homeserver libvirtd[1359677]: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/>
dnsmasq: failed to create listening socket for 192.168.88.1: Address already in use
from my understanding libvirt
has its own dnsmasq
, therefore i have tried to disable the system dnsmasq
to see if that would help.. sadly no.
I am having hard time understanding the source of the issue and what approach do i need to take to solve it.. any advice is really apretiated.