Check if hugepages mount exists before changing qemu.conf
@@ -49,6 +49,8 @@ fi
echo "cgroup_controllers = [ ]" >>/etc/libvirt/qemu.conf
# Be sure that libvirt always will be look the same directory for hugepages mount
+if [ -d "/dev/hugepages" ]; then
echo 'hugetlbfs_mount = "/dev/hugepages"' >>/etc/libvirt/qemu.conf
+fi
/usr/sbin/libvirtd
