Fail to launch VM made in qemu/kvm

I just recently started to use Qemu/KVM.
So far I have created only one VM for LinuxMint.
After some initial successful starts, reboots and shutdowns, I am getting the following error now when trying to launch the VM:

qemu-kvm

Details
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 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, 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 1329, in startup
    self._backend.create()
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 1353, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active

Virtual Network Interface

Network source: Virtual Network ‘default’: NAT (Inactive)
Device model: virtio
Link state: :ballot_box_with_check: active

I’ll be grateful for any and all suggestions, pointers and advice for resolving the issue!

If you Google “Error starting domain: Requested operation is not valid: network ‘default’ is not active” you get a whole lot of returns…here’s one from the libvert Wiki

You’ll probably still get a lot of returns even if you’re scared of Google and use some other search engine.

3 Likes

KVM - Fix Missing Default Network

1 Like

Sure! Funny it didn’t occurred to me this time :sweat_smile:

One of the most common causes for a libvirt virtual network’s failure to start is that the dnsmasq instance required to serve DHCP and DNS requests from clients on that network failed to start. To determine if this was the cause, run the following command from a root shell:

virsh net-start default

If it is successful, the problem was some other intermittent condition that has now passed.

https://wiki.libvirt.org/page/Virtual_network_"default"_has_not_been_started

$ sudo  virsh net-start default 
Network default started

Looks that the command took care of it. Hopefully it will stay like that.

Thanks @Stagger_Lee and @EOS for the replies and the links!
Shame on me that I didn’t do the homework myself this time. I usually do :innocent: :blush:

2 Likes

To have the network automatically start up in future run:

sudo virsh net-autostart --network default

2 Likes
$ sudo virsh net-autostart --network default
Network default marked as autostarted

That’s great! Thank yo so much @EOS !

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