Merge "Detect and enable hugepage support for QEMU"

This commit is contained in:
Zuul 2018-03-22 17:22:18 +00:00 committed by Gerrit Code Review
commit eb18200d21

View File

@ -30,6 +30,14 @@ if [[ -c /dev/kvm ]]; then
chown root:kvm /dev/kvm
fi
if [ -d /sys/kernel/mm/hugepages ]; then
if [ -n "$(grep KVM_HUGEPAGES=0 /etc/default/qemu-kvm)" ]; then
sed -i 's/.*KVM_HUGEPAGES=0.*/KVM_HUGEPAGES=1/g' /etc/default/qemu-kvm
else
echo KVM_HUGEPAGES=1 >> /etc/default/qemu-kvm
fi
fi
if [ -n "${LIBVIRT_CEPH_SECRET_UUID}" ] ; then
libvirtd --listen &