Show Table of Contents
19.3. SELinux
This sections contains topics to consider when using SELinux with your virtualization deployment. When you deploy system changes or add devices, you must update your SELinux policy accordingly. To configure an LVM volume for a guest, you must modify the SELinux context for the respective underlying block device and volume group.
# semanage fcontext -a -t xen_image_t -f -b /dev/sda2 # restorecon /dev/sda2
The Boolean parameter
xend_disable_t can set the xend to unconfined mode after restarting the daemon. It is better to disable protection for a single daemon than the whole system. It is advisable that you should not re-label directories as xen_image_t that you will use elsewhere.
KVM and SELinux
There are several SELinux booleans which affect KVM. These booleans are listed below for your convenience.
KVM SELinux Booleans
| SELinux Boolean | Description |
|---|---|
| allow_unconfined_qemu_transition | Default: off. This boolean controls whether KVM guests can be transitioned to unconfined users. |
| qemu_full_network | Default: on. This boolean controls full network access to KVM guests. |
| qemu_use_cifs | Default: on. This boolean controls KVM's access to CIFS or Samba file systems. |
| qemu_use_comm | Default: off. This boolean controls whether KVM can access serial or parallel communications ports. |
| qemu_use_nfs | Default: on. This boolean controls KVM's access to NFS file systems. |
| qemu_use_usb | Default: on. This boolean allows KVM to access USB devices. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.