Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 593196

Summary: app-emulation/qemu udev rules should also cover vhost-net
Product: Gentoo Linux Reporter: Maciej S. Szmigiero <mail>
Component: Current packagesAssignee: Gentoo QEMU Project <qemu+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Maciej S. Szmigiero 2016-09-08 12:45:17 UTC
Currently if qemu is started as user it can't use vhost_net accelerator since
ownership and perms on /dev/vhost-net are left as root:root 0600, which results
in "tap: open vhost char device failed: Permission denied" error when starting
qemu.

Simplest fix is to make udev rules for /dev/kvm also cover /dev/vhost-net like,
for example, Arch does:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/65-kvm.rules?h=packages/qemu

Note this is a separate issue from tun/tap perms which can be set at network
interface creation time.
Comment 1 Matthias Maier gentoo-dev 2017-02-13 06:40:31 UTC
commit acc843fe087a30413d5603826d659826a3b599ae
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Mon Feb 13 00:21:02 2017 -0600

    app-emulation/qemu: fix permissions on vhost-net, bug #593196
    
    Add an additional udev rule that grants access to /dev/vhost-net to the kvm
    user.
    
    Package-Manager: Portage-2.3.3, Repoman-2.3.1