View previous topic :: View next topic |
Author |
Message |
venc n00b
Joined: 28 May 2012 Posts: 7
|
Posted: Thu Apr 04, 2013 10:34 am Post subject: Can't run QEMU as a user |
|
|
Hello,
I can run my VMs using the superuser account, but I'm unable to run qemu under my user account. It fails on accessing KVM module.
Code: | user@beacon ~/Virt $ ./WindowsVM.sh
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found!
|
my user account is in KVM group
Code: | user@beacon ~/Virt $ groups
wheel uucp audio cdrom video games kvm usb portage user rfreader
|
and /dev/kvm permissions
Code: | user@beacon ~/Virt $ ls -l /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Apr 4 07:47 /dev/kvm
|
any guesses, what could be wrong?
Thanks |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Apr 04, 2013 11:53 am Post subject: Re: Can't run QEMU as a user |
|
|
venc wrote: | Hello,
I can run my VMs using the superuser account, but I'm unable to run qemu under my user account. It fails on accessing KVM module.
Code: | user@beacon ~/Virt $ ./WindowsVM.sh
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found!
|
|
What are you doing inside WindowsVM.sh?
Is the kvm module loaded before you run the shell script or are you trying to load it from the shell script?
Kernel modules need to be loaded by root. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
venc n00b
Joined: 28 May 2012 Posts: 7
|
Posted: Thu Apr 04, 2013 12:05 pm Post subject: |
|
|
Here is the content of WindowsVM.sh (copy-paste from some tut)
Code: | #!/bin/sh
exec qemu-kvm \
-cpu host \
-drive file=WindowsVM.img,if=virtio \
-net nic -net user,hostname=windowsvm \
-m 1G \
-monitor stdio \
-name "Windows" \
$@
|
I do not have KVM as a module, it is hardwired in kernel (and it works with superuser privs) so there is no need to load KVM module tough. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Apr 04, 2013 12:31 pm Post subject: |
|
|
Don't know then, I run mine as modules.
I do have to run as root if I use passthrough (vfio), not sure if the same applies to virtio. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|