Detect and enable hugepage support for QEMU

Change-Id: I3284c0f8f8946a36a63871dc57e287fbe7260490
This commit is contained in:
Craig Anderson 2018-03-21 14:46:25 -04:00
parent 58c297b336
commit 059453c40c

View File

@ -30,6 +30,14 @@ if [[ -c /dev/kvm ]]; then
chown root:kvm /dev/kvm chown root:kvm /dev/kvm
fi 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 if [ -n "${LIBVIRT_CEPH_SECRET_UUID}" ] ; then
libvirtd --listen & libvirtd --listen &