Guest User

start.sh

a guest
Dec 13th, 2020
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/bash
  2. # need to be run as root
  3.  
  4. set -e
  5.  
  6. # Deny non-root run
  7. if [ "$EUID" -ne 0 ]
  8.   then echo "ERROR: Please run as root"
  9.   exit
  10. fi
  11.  
  12. SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
  13.  
  14. # Prepare environment for qemu
  15. ${SCRIPT_PATH}/prepare.sh
  16.  
  17. # Run qemu
  18. sudo -u alex numactl --membind 0 ${SCRIPT_PATH}/qemu.sh $@ &
  19. sleep 5
  20.  
  21. # Pin qemu threads to cpus
  22. ${SCRIPT_PATH}/pin-cpu-cores.py
  23.  
  24. wait
RAW Paste Data