unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* [Guix System] Can't run VM script because of KVM kernel module permission
@ 2021-04-02  9:33 Jérémy Korwin-Zmijowski
  2021-04-02  9:36 ` Mathieu Othacehe
  0 siblings, 1 reply; 7+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-02  9:33 UTC (permalink / raw)
  To: Guix Help

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:33 [Guix System] Can't run VM script because of KVM kernel module permission Jérémy Korwin-Zmijowski
@ 2021-04-02  9:36 ` Mathieu Othacehe
  2021-04-02  9:39   ` Jérémy Korwin-Zmijowski
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Othacehe @ 2021-04-02  9:36 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: Guix Help


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:36 ` Mathieu Othacehe
@ 2021-04-02  9:39   ` Jérémy Korwin-Zmijowski
  2021-04-02  9:43     ` Sergiu Ivanov
  2021-04-02  9:55     ` divoplade
  0 siblings, 2 replies; 7+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-02  9:39 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: Guix Help

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:39   ` Jérémy Korwin-Zmijowski
@ 2021-04-02  9:43     ` Sergiu Ivanov
  2021-04-02  9:47       ` Jérémy Korwin-Zmijowski
  2021-04-02  9:55     ` divoplade
  1 sibling, 1 reply; 7+ messages in thread
From: Sergiu Ivanov @ 2021-04-02  9:43 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: Mathieu Othacehe, help-guix

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:43     ` Sergiu Ivanov
@ 2021-04-02  9:47       ` Jérémy Korwin-Zmijowski
  2021-04-02  9:56         ` Mathieu Othacehe
  0 siblings, 1 reply; 7+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2021-04-02  9:47 UTC (permalink / raw)
  To: Sergiu Ivanov; +Cc: Mathieu Othacehe, help-guix

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 !



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:39   ` Jérémy Korwin-Zmijowski
  2021-04-02  9:43     ` Sergiu Ivanov
@ 2021-04-02  9:55     ` divoplade
  1 sibling, 0 replies; 7+ messages in thread
From: divoplade @ 2021-04-02  9:55 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski, Mathieu Othacehe; +Cc: Guix Help

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 :)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Guix System] Can't run VM script because of KVM kernel module permission
  2021-04-02  9:47       ` Jérémy Korwin-Zmijowski
@ 2021-04-02  9:56         ` Mathieu Othacehe
  0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2021-04-02  9:56 UTC (permalink / raw)
  To: Jérémy Korwin-Zmijowski; +Cc: help-guix


> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-02  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02  9:33 [Guix System] Can't run VM script because of KVM kernel module permission Jérémy Korwin-Zmijowski
2021-04-02  9:36 ` Mathieu Othacehe
2021-04-02  9:39   ` Jérémy Korwin-Zmijowski
2021-04-02  9:43     ` Sergiu Ivanov
2021-04-02  9:47       ` Jérémy Korwin-Zmijowski
2021-04-02  9:56         ` Mathieu Othacehe
2021-04-02  9:55     ` divoplade

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git