Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- set -e
- # Deny non-root run
- if [ "$EUID" -ne 0 ]
- then echo "ERROR: Please run as root"
- exit
- fi
- SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
- # TODO: move vendorId and deviceId to variables
- echo 0000:09:00.0 > /sys/bus/pci/devices/0000:09:00.0/driver/unbind
- echo 144d a804 > /sys/bus/pci/drivers/vfio-pci/new_id
- chown alex:alex /dev/input/qemu-virtual-*
- chown alex:alex /dev/vfio/*
- chmod ugo+rw /dev/bus/usb/001/*
- # Configure TAP for host-vm network
- ${SCRIPT_PATH}/setup-tap.sh
- # Remove all cset policies
- cset set -d / --recurse --force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement