Virt-Manager | KVM kernel module: Permission denied

Do you get the same error if you try to connect with virsh -c qemu:///system ?

Strangely enough…no

GUI bug?

1 Like

It could be a bug in virt-manager or a dependency. I have version 1.4.3 on vanilla Arch 4.13.3-1 on KDE Plasma 5.10.5 if that helps.

That’s exactly the same as me, except the DE. I have Cinnamon.
I’m going to try KDE.


Nope. Still get the same error through the GUI.
Do you only have KDE?

Because honestly, I can’t think of another difference :stuck_out_tongue:

One other thought, are you able to connect if you launch virt-manager from terminal?

And yes I only have KDE.

Launching the GUI from the terminal results in the same dead-end.

Well, I have 3 DE’s. I installed Antergos with Gnome because Cnchi just crapped out near the end if i chose Cinnamon.
I then installed Cinnamon because I don’t like Gnome, and now KDE.

Maybe there could be some conflict here?

I may try doing a fresh install of Antergos with KDE on Saturday…

Hi Kaizer,

I just want to note, that the error messages from virt-manager are often pretty useless. As Wendel stated Apparmor is a great source of trouble. I my cases as long the apparmor config is wrong, I’ll get the error that Ryzen with “host-Passthrough” CPU Setting does not support hyperthreading. The error will disappeared after removing of all USB devices and adding them again after the start of the VM.
With Wendels tipps for Ubuntu 17.04 GPU Passthrough & Apparmor Config my problems are gone!

For some reason my user was in a single instance not in the libvirt-qemu group what resulted in similar issues you encountered. Maybe I messed up the Setup…

BTW: I sport Ubuntu 17.04 with standard Unity Desktop and Mainline Kernel 4.13.2-041302-generic. The QEMU/KVM Hypervisor “connection” is default in Ubuntu. I can choose QEMU/KVM User Session but I end up with a bunch of issues and I stopped investing them further.

Possibly? Are you able to connect using sudo virt-manager?

You could try to remove/reinstall virt-manager for fun.

Thank’s for chipping in!

I also have that “problem” (CPU Setting does not support hyperthreading). I have to tick the “copy host settings” box and it works.

Can you link that livestrem he did on Ubuntu? I tried looking for it but I only see the recent one he did on Fedora.

Thing is, the libvirt-qemu group does not exist on Arch afaik.

Huhu Kaizer,

i missed the livestream to, but here are Wendels How To for Ubuntu GPU Passthrough: Ubuntu 17.04 -- VFIO PCIe Passthrough & Kernel Update (4.14-rc1)

Look at the apparmor section:

Wendel: "Edit the /etc/apparmor.d/abstractions/libvirt-qemu file and find the # for usb access section and modify it thusly:

for usb access

/dev/bus/usb/** rw,
/etc/udev/udev.conf r,
/sys/bus/ r,
/sys/class/ r,
/run/udev/data/* rw,"

Thos settings are pretty messy in Ubuntu. But with this config - its fine.

Ah…

So the livestream isn’t on Youtube…That’s why I wasn’t finding it!

I’ll give that article a read and see if I can implement that fix.

Thank’s.

Some more informations, here you’r find Wendels original Post to PCIe Passthrough:

There is a Youtube video for that :wink:

And 2. here are a great how To what kickstarted my on Ubuntu with my Ryzen system:

Because of more mature nature of Intel Systems - there are less problems with Apparmor etc. But its my be helpful!

:slight_smile:

You may try the KVM Group fix from the wiki as well https://wiki.archlinux.org/index.php/Libvirt#KVM_Group_Fix

Googled around and found this from a month ago which descibes the same thing https://www.reddit.com/r/archlinux/comments/6wfe2u/fix_for_libvirt_failed_to_initialize_kvm/

It’s solved!

I didn’t pay close enough attention to the libvirt article on the Arch Wiki.

At the end there is literally a section that mentions KVM group fix.

At least on Arch, there is this file /etc/libvirt/qemu.conf that mentions what group libvirt should initialize in.
By default it is set to group 78.
Change it to kvm and it works without a hitch…

2 Likes

Hej Kaizer!

great to hear! I wish you many fun in virtulize … what ever… :wink:

BTW: I suggest Windows 10 for a Windows VM. With KVM and GPU Passthrough I had trouble to get Windows 7 starting and Windows 8 does not find my Sapphire RX 560. Just FYI… I had to investigate that…

I don’t know how I didn’t see your comment, but that’s exactly what fixed it!

Thank’s.

Marf, thank you for the tip.
However, I don0t get how virtualization like that works, Whenever i create a VM there is always quite noticeable input lag with mouse and keyboard.

How do you get around this? Do you have to pass through a separate set of peripherals?

If you are doing gpu passthrough, the best way I’ve found to reduce input lag is pass through peripherals. For a while, I used synergy to share between the host and VM, but lately I’ve been steam in-home streaming.

Hi Kaizer,

I agree to ww2m1911a1. I don’t use the virt-manager play, I pass through my Graphics Card (Sapphire RX 560) to the VM and also a second mouse and keyboard as sugessted in the HowTo from ycnrg.org https://forum.level1techs.com/clicks/track?url=https%3A%2F%2Fycnrg.org%2Fvga-passthrough-with-ovmf-vfio%2F&post_id=2134254&topic_id=120055
I will buy a KVM Switch (Keyboard Video Mouse…) soon to switch my input peripherals in a simple way.

If you have some Performance Issues try my findings about IO (virtual) Devices that I posted here: Ubuntu 17.04 -- VFIO PCIe Passthrough & Kernel Update (4.14-rc1) at the end of my reply.