How to install virt-manager and missing KVM support

Hello,

I just ran

sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq bridge-utils openbsd-netcat
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service

At this point I did not realize, I only have LXC connection option in virt manager.

When it complained about it cannot start 'default' network interface, I just ran (reading this)

sudo virsh net-start default
sudo virsh net-autostart default

but it did not work.

I just restarted libvirtd with sudo systemctl restart libvirtd and then ran

sudo virsh net-start default
sudo virsh net-autostart default

then it worked...

But unfortunately, I still do not really know why don't I haveKVM connection in virt-manager.

Am I missing something?

Thanks!

Armand

KVM capability needs to be enabled in your BIOS setup. It will have a different name depending on your CPU, VT-x for Intel, or AMD-V for AMD.

Hello,

Thanks for your answer! I did not express my problem precisely, sorry.
SVM is enabled in UEFI (I use a Ryzen 7 3700X) and virtualization works fine. Let's say if I install virt-manager on a default Fedora 31 install, and do the required things by this how-to it works fine.

Doing the same on Manjaro does not have the desired effect.

lsmod |grep kvm says:

kvm_amd 110592 0
kvm 811008 1 kvm_amd
irqbypass 16384 1 kvm
ccp 106496 1 kvm_amd

So as I can see kvm is operational, but virt-manager still does not see it or connect to it.

How can I solve this?

Thanks!

Armand

Manjaro has no extensive information on KVM

This Arch Linux wiki page has a list of topics

what is the status of libvirtd.service? is it running or not?
$ systemctl status libvirtd.service

It says

libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2020-03-26 11:36:47 CET; 16min ago
TriggeredBy: ● libvirtd-admin.socket
             ● libvirtd.socket
             ● libvirtd-ro.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 10072 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 81.1M
     CGroup: /system.slice/libvirtd.service
             ├─ 1333 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
             ├─ 1334 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
             └─10072 /usr/bin/libvirtd

Mar 26 11:36:47 Prometheus systemd[1]: Started Virtualization daemon.
Mar 26 11:36:47 Prometheus dnsmasq[1333]: read /etc/hosts - 5 addresses
Mar 26 11:36:47 Prometheus dnsmasq[1333]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Mar 26 11:36:47 Prometheus dnsmasq-dhcp[1333]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Mar 26 11:36:57 Prometheus libvirtd[10072]: libvirt version: 5.10.0
Mar 26 11:36:57 Prometheus libvirtd[10072]: hostname: Prometheus
Mar 26 11:36:57 Prometheus libvirtd[10072]: operation failed: pool 'default' already exists with uuid 3879048b-83eb-4ee4-8ad3-27d817af9e01
Mar 26 11:36:57 Prometheus libvirtd[10072]: this function is not supported by the connection driver: virConnectGetAllDomainStats
Mar 26 11:46:45 Prometheus libvirtd[10072]: operation failed: pool 'default' already exists with uuid 3879048b-83eb-4ee4-8ad3-27d817af9e01
Mar 26 11:46:45 Prometheus libvirtd[10072]: this function is not supported by the connection driver: virConnectGetAllDomainStats

Thanks!

I suspect the problem:

and

As I remember I follow this step in this link below:
https://tails.boum.org/doc/advanced_topics/virtualization/virt-manager/index.en.html

If you get the error message "Error starting domain: Requested operation is not valid: network 'default' is not active", then try to start the default virtual network:

1. Click on localhost (QEMU).
2. Choose Edit ▸ Connection details to administer the connection to your local QEMU system.
3. Click on Virtual Networks tab, then select the default virtual network in the left pane.
4. Click on the [?]-manager&page=media-playback-start.png)media-playback-start.png icon on the bottom of the left pane to start the default virtual network.

Try to run sudo virt-manager and check if the QUEMU/KVM wil be available. If yes add your regular user account to the libvirt group: sudo usermod -aG libvirt

1 Like

Thank you for all of your replies. Unfortunately none of the things you mentioned helped in my case, but all of them turned me into the right direction which is great! Thank you for that! (It is even better than a step-by-step solution).

I just reverted my system to a previous state, then headed to Manjaro wiki from where I ran the listed command. Installed required dependencies, started libvirt, and so on. Then I started virt-manager where LXC was listed as a current connection. I just used File > Add connection where I was able to add KVM connection, and now my VM works as it should.

Moral of the story:

  • I should read error messages more carefully from now on.
  • I must use official sources of information since not all how-tos are equal.

Thanks,
Armand

1 Like

Forum kindly sponsored by