Hey Guixters ! On my laptop running Guix System, I try to execute a VM from the script generated by "guix system vm". But I issue the following message : $ /gnu/store/dxrwz82s34zi33n9h9cpn8sqw5pv4qyz-run-vm.sh Could not access KVM kernel module: Permission denied qemu-system-x86_64: failed to initialize kvm: Permission denied I already add builders to the kvm group as stated in /etc/group : kvm:x:984:guixbuilder01,guixbuilder02,guixbuilder03,guixbuilder04,guixb uilder05,guixbuilder06,guixbuilder07,guixbuilder08,guixbuilder09,guixbu ilder10 guixbuild:x:30000:guixbuilder01,guixbuilder02,guixbuilder03,guixbuilder 04,guixbuilder05,guixbuilder06,guixbuilder07,guixbuilder08,guixbuilder0 9,guixbuilder10 What do I miss ? :/ Cheers, Jérémy
Hello Jérémy,
> $ /gnu/store/dxrwz82s34zi33n9h9cpn8sqw5pv4qyz-run-vm.sh
> Could not access KVM kernel module: Permission denied
> qemu-system-x86_64: failed to initialize kvm: Permission denied
Are you part of the "kvm" group yourself?
Mathieu
Le vendredi 02 avril 2021 à 11:36 +0200, Mathieu Othacehe a écrit :
> Are you part of the "kvm" group yourself?
>
> Mathieu
Hi Mathiue !
I tried to add myself to the group using :
$ sudo usermod -a -G kvm jeko
Then re-executing the vm script returned the same error.
Jérémy
Thus quoth Jérémy Korwin-Zmijowski on Fri Apr 02 2021 at 11:39 (+0200):
> Le vendredi 02 avril 2021 à 11:36 +0200, Mathieu Othacehe a écrit :
>> Are you part of the "kvm" group yourself?
>>
>> Mathieu
>
> Hi Mathiue !
>
> I tried to add myself to the group using :
>
> $ sudo usermod -a -G kvm jeko
>
> Then re-executing the vm script returned the same error.
Just in case: did you logout and login afterwards?
Group attributions need that to become effective.
-
Sergiu
Le vendredi 02 avril 2021 à 11:43 +0200, Sergiu Ivanov a écrit :
> Just in case: did you logout and login afterwards?
>
> Group attributions need that to become effective.
>
> -
> Sergiu
Hi Sergiu!
That's becoming embarrassing... I rebooted instead of logged out and I
might have lost the group attribution doing so.
Now the VM is running.
Sorry for bothering you with this.
Cheers,
Jérémy !
Le vendredi 02 avril 2021 à 11:39 +0200, Jérémy Korwin-Zmijowski a
écrit :
> I tried to add myself to the group using :
>
> $ sudo usermod -a -G kvm jeko
Hello,
Groups need to be specified in the config.scm file.
You need to edit it, and under "(user-account", find or create the
entry "(supplementary-groups" containing a list of strings.
I have something like this:
(user-account
(name ...)
(comment ...)
(group ...)
(home-directory ...)
(supplementary-groups
'("wheel" "netdev" "audio" "video" ... "libvirt"
"kvm")))
Reconfigure (and possibly reboot) and it will be better :)
> Now the VM is running.
> Sorry for bothering you with this.
No worries, in fact I was thinking yesterday about adding the user by
default to the "kvm" group when running the installer, to prevent this
kind of issues.
Mathieu