Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## Load VM variables
- source "/etc/libvirt/hooks/qemu.d/Windows-11/vm-vars.conf"
- ## Remove Hugepages
- echo "Releasing hugepage memory back to the host..."
- echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- ## Advise if successful
- ALLOC_PAGES=$(cat /proc/sys/vm/nr_hugepages)
- if [ "$ALLOC_PAGES" -eq 0 ]
- then
- echo "Memory successfully released!"
- fi
- sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement