Set virt_use_execmem boolean if SELinux is enabled.

If SELinux is enabled, this boolean is required to be able to launch VMs using qemu.
Set the boolean if we're switching the libvirt_type to 'qemu' and SELinux is enabled.

Change-Id: Ieead35aae94c9fa86df1f4829584f71c97dcbeb8
This commit is contained in:
Russell Bryant 2012-09-07 11:09:06 -04:00
parent 5090fffa8b
commit 4797e8f7bc

View File

@ -1345,6 +1345,10 @@ if is_service_enabled n-cpu; then
if [ ! -e /dev/kvm ]; then
echo "WARNING: Switching to QEMU"
LIBVIRT_TYPE=qemu
if which selinuxenabled 2>&1 > /dev/null && selinuxenabled; then
# https://bugzilla.redhat.com/show_bug.cgi?id=753589
sudo setsebool virt_use_execmem on
fi
fi
fi