[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVM kernel module permission denied on foreign distro

From: Giovanni Biscuolo
Subject: KVM kernel module permission denied on foreign distro
Date: Sat, 19 Jan 2019 10:44:02 +0100


I'm trying to create my first VM via "guix system vm <config.scm>" but
it fails with this error:

--8<---------------cut here---------------start------------->8---
creating qcow2 image of 70.00 MiB...
Formatting '/gnu/store/4mz1qqv7h5g5885q1aq0izlmy01knf1g-qemu-image', fmt=qcow2 
size=73400320 cluster_size=65536 lazy_refcounts=off refcount_bits=16
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize KVM: Permission denied
           2 (primitive-load "/gnu/store/hyaagi7v0qda56rivy893px3rvz?")
In ./gnu/build/vm.scm:
    146:2  1 (load-in-linux-vm _ #:output _ #:qemu _ #:memory-size _ ?)
In ./guix/build/utils.scm:
    616:6  0 (invoke _ . _)

./guix/build/utils.scm:616:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: 
"qemu-system-x86_64" arguments: ("-nographic" "-no-reboot" "-m" "256" "-object" 
"rng-random,filename=/dev/urandom,id=guixsd-vm-rng" "-device" 
"virtio-rng-pci,rng=guixsd-vm-rng" "-virtfs" 
"-virtfs" "local,id=xchg_dev,path=xchg,security_model=none,mount_tag=xchg" 
"-virtfs" "local,id=tmp_dev,path=tmp,security_model=none,mount_tag=tmp" 
"-device" "virtio-blk,drive=myhd" "-drive" 
 "-enable-kvm" "-append" "panic=1 
console=ttyS0" "-net" "nic,model=virtio") exit-status: 1 term-signal: #f 
stop-signal: #f] 5d2b00>)'.
builder for `/gnu/store/9dfr4cn5qpxp9jxj5jwp9nrjw4y4wsnr-qemu-image.drv' failed 
with exit code 1
build of /gnu/store/9dfr4cn5qpxp9jxj5jwp9nrjw4y4wsnr-qemu-image.drv failed
View build log at 
cannot build derivation 
`/gnu/store/': 1 dependencies 
couldn't be built
guix system: error: build failed: build of 
`/gnu/store/' failed
--8<---------------cut here---------------end--------------->8---

the permissions on /dev/kvm (via emacs eshell+tramp) are:

--8<---------------cut here---------------start------------->8---
ls -lah / 
crw-rw----   1 root           kvm             0 2018-12-18  2018 
--8<---------------cut here---------------end--------------->8---

I'm on Debian 9 and used to run other QEMU images via libvirt
(e.g. virsh --connect qemu:///system start guixsd-test) as user with no
problems (my user is in kvm and libvirt-qemu groups)

please any hint on how I can use "gnu system vm" as a normal user?


Giovanni Biscuolo

Xelera IT Infrastructures

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]