Closed kayrus closed 8 years ago
Some info could be found here https://libvirt.org/drvqemu.html#securitysvirtaa
Looks like problem relates to this issue: https://www.redhat.com/archives/libvir-list/2014-September/msg00466.html and this: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/656173
Image probing doesn't work even when you set allow_disk_format_probing = 1
inside /etc/libvirt/qemu.conf
Workaround:
echo " /home/user/.libvirt/**/** r," | sudo tee -a /etc/apparmor.d/abstractions/libvirt-qemu
If we use ~/libvirt
instead of ~/.libvirt
- apparmor works. This is caused by /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
rule which denies any access to the hidden (dot-prefixed) files audit deny @{HOME}/.*/** mrwkl
.
So the fix is to rename ".libvirt" dir into "libvirt" one. And it is not necessary to enable allow_disk_format_probing = 1
. Fixed here: https://github.com/kayrus/scripts/commit/fd6188a083ed707b3915dbe6cf9057f84c58f6fe
Also relates to: https://github.com/adrahon/vagrant-kvm/issues/130
Running scripts without sudo with the images directory inside user homedir causes this error message:
Even when this directory has read permissions.
These commands resolve the issue: