Advertisement
Querzion

etc-libvirt-hooks-qemu-d-winx-prepare-begin-40-isolate-cpus.sh

Apr 5th, 2023
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | Source Code | 0 0
  1. #!/bin/bash
  2.  
  3. ## Load VM variables
  4. source "/etc/libvirt/hooks/qemu.d/Windows-11/vm-vars.conf"
  5.  
  6. ## Isolate CPU cores as per set variable
  7. systemctl set-property --runtime -- user.slice AllowedCPUs=$VM_ISOLATED_CPUS
  8. systemctl set-property --runtime -- system.slice AllowedCPUs=$VM_ISOLATED_CPUS
  9. systemctl set-property --runtime -- init.scope AllowedCPUs=$VM_ISOLATED_CPUS
  10.  
  11. sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement