Bug 453938 - SELinux prevented qemu-kvm from reading an LVM logical volume
SELinux prevented qemu-kvm from reading an LVM logical volume
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-07-03 07:50 EDT by Ole Sandum
Modified: 2008-07-03 11:26 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 491245 (view as bug list)
Last Closed: 2008-07-03 11:26:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ole Sandum 2008-07-03 07:50:44 EDT
Description of problem:
> SELinux is preventing qemu-kvm (qemu_t) "getattr" to
/dev/mapper/Volumes-OldWindowsBackup (fixed_disk_device_t). 

Version-Release number:

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
Actual results:
SELinux denies access as mentioned above. Virtual machine cannot start.
Comment 1 Daniel Walsh 2008-07-03 11:26:39 EDT
In order to get SELinux to work with qemu, you need to make sure this disk is
labeled correctly.

# 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.

Note You need to log in before you can comment on or make changes to this bug.