Ubuntu 18.04 upgrade
For /dev/kvm
specifically, add the user to the kvm
group with:
sudo usermod -a -G kvm $USER
and reboot the computer and the problem is solved.
I was getting that error message when passing the -enable-kvm
to qemu-system-x86_64
.
How I found it out: if we do:
ls -al /dev/kvm
it gives:
crw-rw---- 1 root kvm 10, 232 May 12 07:53 /dev/kvm
and:
id -a
gives:
uid=1000(ciro) gid=1000(ciro) groups=1000(ciro),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),118(lpadmin),128(sambashare)
did not contain the kvm
group.
Maybe access was previously granted through udev rules, but then they moved to the group mechanism? https://bugzilla.redhat.com/show_bug.cgi?id=1479558#c3
yes we dropped the kvm udev rules in the rawhide package, since rawhide systemd now provides them. However it looks like you are using the virt-preview repo on f26, so now there isn't anything setting /dev/kvm permissions to 666 and group=kvm
It does seem possible to add users to the kvm
group during upgrade: How to run a script only during first install of a package and during upgrades? but maybe it was not done because of security concerns?