|
|
@ -1,8 +1,12 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
echo "Reserving hugepages"
|
|
|
|
echo "Reserving hugepages"
|
|
|
|
echo 16 | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
|
|
|
|
echo 8192 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
|
|
|
|
|
|
|
echo 3 | sudo tee /proc/sys/vm/drop_caches
|
|
|
|
|
|
|
|
echo 1 | sudo tee /proc/sys/vm/compact_memory
|
|
|
|
echo "Starting Network"
|
|
|
|
echo "Starting Network"
|
|
|
|
virsh --connect=qemu:///system net-start default
|
|
|
|
virsh --connect=qemu:///system net-start default
|
|
|
|
|
|
|
|
sudo systemctl start smb nmb
|
|
|
|
|
|
|
|
sleep 2
|
|
|
|
echo "Starting VM"
|
|
|
|
echo "Starting VM"
|
|
|
|
virsh --connect=qemu:///system start win10
|
|
|
|
virsh --connect=qemu:///system start win10
|
|
|
|
echo "Starting Scream"
|
|
|
|
echo "Starting Scream"
|
|
|
@ -28,7 +32,7 @@ done
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
|
echo "VM is off"
|
|
|
|
echo "VM is off"
|
|
|
|
echo "Freeing up memory"
|
|
|
|
echo "Freeing up memory"
|
|
|
|
echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
|
|
|
|
echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
|
|
|
echo "Unbinding from vfio-pci"
|
|
|
|
echo "Unbinding from vfio-pci"
|
|
|
|
sudo unbind 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
|
|
|
|
sudo unbind 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
@ -36,5 +40,6 @@ echo "Enabling GPU power management"
|
|
|
|
sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02
|
|
|
|
sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02
|
|
|
|
sleep 2
|
|
|
|
sleep 2
|
|
|
|
sudo systemctl start bumblebeed
|
|
|
|
sudo systemctl start bumblebeed
|
|
|
|
|
|
|
|
sudo systemctl stop smb nmb
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
|
clrgpu
|
|
|
|
clrgpu
|
|
|
|