Networking not working in windows 10 kvm/qemu guest

Hello,

I’m running an up to date installation of manjaro-plasma. I’ve installed all the dependancies for kvm/qemu to work. The other night I created a virtual machine for windows and installed a trial version of windows 10 pro. The installation was a simple default installation and it went fine I completely updated the vm and even added a cd-rom drive to the vm to install the virtio-win drivers in the the virtual machine. However when I rebooted my pc the vm won’t start because it’s reporting the default newtork device was not found.
This is the error I get 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 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 1330, in startup
self._backend.create()
File “/usr/lib/python3.8/site-packages/libvirt.py”, line 1234, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirt.libvirtError: Requested operation is not valid: network ‘default’ is not active
I’ve made sure the libvirt service is started with : sudo systemctl restart libvirtd.service
An idea what’s going on?

Update: I went to install a linux vm in qemu/kvm. I again used the vm creation wizard and aside from picking the .iso I’d use to install from and the hard drive size I just went with the defaults. After the machine was created and I went to start it a window popped up saying the network wasn’t started and would I like to start networking along with the vm. I selected yes and went through with the install and the vm installed without a hitch. I tried starting the win10 vm and that started as well. So…why isn’t qemu’s networking starting when I start the virtual machine manager?

Solution

Type sudo virsh net-autostart default on the CLI press enter and and KVM’s networking will start automatically

:+1: Thank you for sharing! :+1:

However, could you do me a favour and:

  • edit your question by pressing the 3 dots and the pencil icon
  • make it into a real question
  • cut and paste the solution into a reply to your own question
  • click the 3 dots below your own answer to mark a solution like this:
    Solution
    so that the next person that has the exact same problem you just had will benefit from your post as your question will now be in the “solved” status.

:crossed_fingers: