I have the same problem using raw lvm logical volumes as disk on Ubuntu 18.04. 
When i try to start a vm with virt-manager qemu says Permission denied on 
device.

The lvm uses device mapper to map the logical volumes so i need to
handle devices like

brw-rw---- 1 libvirt-qemu kvm  253,  4 mar 17 13:24 /dev/dm-4

After a bunch of failure attempts to start the vm machine, the following
steps was successful:

I run the  aa-logprof (apparmor-utils package) util to update the apparmor 
profiles using the syslog, and
i add the following line in /etc/apparmor.d/abstractions/libvirt-qemu

...
  /dev/dm* krw,

just before the /dev/net/tun rw, line.

If the line already exists just replace "rw" with "krw" to permit file
lock operations.

Now it seems vm runs well again.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1677398

Title:
  Apparmor prevents using storage pools and hostdev networks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1677398/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to