Red Hat Bugzilla – Bug 453938
SELinux prevented qemu-kvm from reading an LVM logical volume
Last modified: 2008-07-03 11:26:39 EDT
Description of problem:
> SELinux is preventing qemu-kvm (qemu_t) "getattr" to
Steps to Reproduce:
1. create a fresh LVM volume and initialize it with some file system
2. add its device file (in /dev/mapper/...) to a QEMU virtual machine as a
storage device (type 'Normal Disk Partition')
3. try to start that virtual machine
SELinux denies access as mentioned above. Virtual machine cannot start.
In order to get SELinux to work with qemu, you need to make sure this disk is
# semanage fcontext -a -t virt_image_t /dev/mapper/Volumes-OldWindowsBackup
# restorecon /dev/mapper/Volumes-OldWindowsBackup
Should allow you to run in enforcingm mode.
Hopefully virtmanager will start doing this automatically.