Skip to main content
Topic: Could not start virtual network (Read 4626 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Could not start virtual network

Attempting to create a windows 10 virtual machine using qemu, when I set my network selection to NAT it tells me it's inactive, so when I click "finish" to complete the creation of a new virtual machine, it tells me (first image).
Then I click "Yes" and it tells me "Unable to complete Install:'Requested operation is not valid: network 'default' is not active'"
and also "Could not start virtual network 'default': Unable to find dnsmasq binary in $PATH: No such file or directory".

First log:
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

Second log:
Could not start virtual network 'default': Unable to find 'dnsmasq' binary in $PATH: No such file or directory

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: Unable to find 'dnsmasq' binary in $PATH: No such file or directory

Re: Could not start virtual network

Reply #1
Install dnsmasq and dnsmasq-<your-init> , and enable and start the service

artist

Re: Could not start virtual network

Reply #2
I started up libvirtd and dnsmasq and now it tells me when I try to start the vm:
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

Re: Could not start virtual network

Reply #3
I'm not familiar with virt-manager's log.
let's clarify. check the following:

1. libvirtd deamon is up an running with no error in log
2. virtlogd deamon is up and running with no error in log
3. you have ran the following command and gives no error. (if network is already active it fails)
Code: [Select]
sudo virsh net-start default
4.at least one virtual network is connected. (seems you are connected to one)

Re: Could not start virtual network

Reply #4
network thing was not started, now i started it using the command you gave me but, the vm says this:

Re: Could not start virtual network

Reply #5
probably during creating virtual machine you have made an mistake and didn't choose the ISO properly.
Or it's second time you are opening an virtual machine, if I'm not mistaken virt-manager will not load ISO in second run. the action of loading ISO is not permanent. (it's intended and expects you to install OS rather than loading a live ISO).

in case you want a permanent live ISO, you can change  that in properties of each machine.

if you wish to install an OS, create a new one and follow the step again (It's easier)

Re: Could not start virtual network

Reply #6
ok now the vm works for some reason but i don't have kvm, how do i set it up or install it? the program tells me:
"Warning, KVM is not available."


Re: Could not start virtual network

Reply #8
use virt-manager to create and setup a machine.

here wiki index page of what you lookingQemu, KVM and ...

just read the information for hypervisor you want to work with.

the wiki has installation guide and troubleshooting steps for most common problems.

1'st method

external link:
https://christitus.com/windows-inside-linux/
https://christitus.com/setup-qemu-in-archlinux/
https://christitus.com/vm-setup-in-linux/

Re: Could not start virtual network

Reply #9
when i input "lsmod | grep kvm" it only outputs:
kvm 1323008 0
irqbypass 16384 1 kvm

And it doesn't output the rest, what do I do?

Re: Could not start virtual network

Reply #10
check the third external link in my previous reply. there's a great youtube video.

you probably haven't enabled virtualization,
Code: [Select]
grep -E -c '(vmx|svm)' /proc/cpuinfo
output of this shouldn't be zero

Re: Could not start virtual network

Reply #11
when I do that command it outputs 12.
Now when I start the vm, it doesn't even show me windows anymore but just a shell UEFI.

Re: Could not start virtual network

Reply #12
Your VM is set up to boot UEFI?
In that case add the EFI boot entry to startup.nsh or via the Boot Manager in the UEFI shell.
And make sure package edk2-ovmf  is installed.

artist