FS#44972 - [libvirt] Unable to create VM due to filepermissions (Qemu.conf user= issue)

Attached to Project: Community Packages
Opened by Rene Benner (P67) - Friday, 15 May 2015, 13:28 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 27 August 2017, 02:18 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Unable to start a VM due to (seemingly) incorrect permissions on a directory. Modifying /etc/libvirt/qemu.conf to have user=root makes libvirt/qemu work proeprly again


Additional info:
* package version(s)
libvirt 1.2.15-1
libvirt-glib 0.2.0-1
libvirt-python 1.2.15-1
qemu 2.2.1-5

* config and/or log files etc.

/var/lib/libvirt # ls -latrh
total 48K
drwxr-xr-x 2 root root 4.0K May 4 14:13 uml
drwxr-xr-x 2 root root 4.0K May 4 14:13 network
drwxr-xr-x 2 root root 4.0K May 4 14:13 lxc
drwxr-xr-x 3 root root 4.0K May 4 14:13 lockd
drwxr-xr-x 2 root root 4.0K May 4 14:13 filesystems
drwxr-xr-x 2 root root 4.0K May 4 14:13 boot
drwxr-xr-x 46 root root 4.0K May 11 02:25 ..
drwxr-xr-x 7 nobody 78 4.0K May 15 14:38 qemu.old
drwxr-xr-x 12 root root 4.0K May 15 15:02 .
drwxr-xr-x 2 root root 4.0K May 15 15:04 images
drwxr-xr-x 2 root root 4.0K May 15 15:16 dnsmasq
drwxrwx--- 7 nobody nobody 4.0K May 15 15:16 qemu


Error when launching VM without root
Qemu-Log: http://ix.io/iyU
Journalctl: http://ix.io/iyV

I even rebooted, removed kvm_intel and modprobed it with nested=1 to no avail. Removed configs and cleaned up with `pacman -Rsn libvirt qemu gnome-boxes libvirt-glib virt-install libvirt-python virt-manager`, Reinstalled to no avail.

Steps to reproduce:
Run Qemu without the user=root directive in qemu.conf and the above versions of qemu. I suspect the packaged qemu.conf commented user= (Eventhough qemu folder is on nobody:nobody..)
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 27 August 2017, 02:18 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#54943 
Comment by Rene Benner (P67) - Friday, 15 May 2015, 14:04 GMT
Supposedly a group=kvm should fix this, However that does not seem to work either.

```
cat /etc/group|grep kvm
kvm:x:1001:root,rene
```
Comment by Rene Benner (P67) - Friday, 15 May 2015, 14:06 GMT
Edit: Added nonfunctional conf
   qemu.conf (18.6 KiB)
Comment by Brendan (esbdb) - Saturday, 26 August 2017, 08:10 GMT
I think I've figured this out at last.
I've spent an embarrassing long time on getting this to work.
Yes changing the user to root makes it work but that isn't the correct solution.
in `/etc/libvirt/qemu.conf` the group is set to `78` instead of `kvm`. My `kvm` group had `gid 999`.
I fixed this by readding the `kvm` group with `gid 78`. I'm not sure why the config specifies a gid instead of the group name, but this bug is due to that mismatch.
I'm not sure where this should be fixed, ie. in this config file or where the `kvm` group is created.

Loading...