diff --git a/startvm b/startvm index a818ffe..fc11183 100755 --- a/startvm +++ b/startvm @@ -15,15 +15,19 @@ sudo mount -o remount /var/lib/libvirt/images/ # remove this if you're not me echo "Reserving hugepages and some other shit" echo $HUGEPAGES_MB | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages -echo 1 | sudo tee /sys/bus/pci/devices/$MAIN_GPU/rescan +#echo 1 | sudo tee /sys/bus/pci/devices/$MAIN_GPU/rescan sleep 1 -sudo ./binddev $ALL_PARTS +#sudo ./binddev $ALL_PARTS +asusctl graphics -m vfio #fi #!/bin/bash echo 3 | sudo tee /proc/sys/vm/drop_caches echo 1 | sudo tee /proc/sys/vm/compact_memory -echo 0-15 | sudo tee /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus +#echo 0-15 | sudo tee /sys/fs/cgroup/cpuset/machine.slice/cpuset.cpus +sudo vfio-isolate cpuset-delete /host.slice cpuset-delete /machine.slice +echo "ERROR ABOVE IS OK" +sudo vfio-isolate cpuset-create --cpus C0-1 /host.slice cpuset-create --cpus C0-15 -nlb /machine.slice move-tasks / /host.slice echo "Starting Network" virsh --connect=qemu:///system net-start default sudo systemctl start smb nmb # comment out if you dont have smb share for linux @@ -33,14 +37,14 @@ virsh --connect=qemu:///system start $VMNAME echo "Starting Scream" scream -o pulse -i virbr0 & # scream audio echo "Starting Looking Glass" -looking-glass-client -d -g egl -a -K $LOOKING_GLASS_FPS -j -m $LOOKING_GLASS_ESCAPE -S & +looking-glass-client -d -g egl -a -j -m $LOOKING_GLASS_ESCAPE -S & # if looking glass crashes, press enter to restart it. if you want to stop VM, type "stop" (then enter) while [ "$command" != "stop" ]; do if jobs | grep looking | grep Running; then read command else - looking-glass-client -d -g egl -a -K $LOOKING_GLASS_FPS -j -m $LOOKING_GLASS_ESCAPE -S & + looking-glass-client -d -g egl -a -j -m $LOOKING_GLASS_ESCAPE -S & fi done sudo whoami # regain root access @@ -57,9 +61,11 @@ while [ "$vmstate" != "shut off" ]; do done sleep 1 echo "VM is off" -echo "Freeing up memory" +echo "Freeing up memory and CPU" +sudo vfio-isolate cpuset-delete /host.slice cpuset-delete /machine.slice echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages echo "Unbinding from vfio-pci and removing devices" -sudo ./unbinddev $ALL_PARTS +asusctl graphics -m integrated +#sudo ./unbinddev $ALL_PARTS sudo systemctl stop smb nmb # stop SMB if in use diff --git a/win10.xml b/win10.xml old mode 100755 new mode 100644 index 5dc802b..9b77cd7 --- a/win10.xml +++ b/win10.xml @@ -13,12 +13,9 @@ or other application using the libvirt API. - 16777216 - 16777216 - - - - 16 + 12582912 + 12582912 + 16 @@ -26,8 +23,8 @@ or other application using the libvirt API. - - + + @@ -39,27 +36,28 @@ or other application using the libvirt API. 1 - - - - - - - - - - - - + + + + + + + + + + + + + + - + hvm /usr/share/edk2-ovmf/x64/OVMF_CODE.fd /var/lib/libvirt/qemu/nvram/win10_VARS.fd - - + @@ -73,23 +71,13 @@ or other application using the libvirt API. - - - - - + - - - - - - @@ -103,22 +91,24 @@ or other application using the libvirt API. restart destroy - + /usr/bin/qemu-system-x86_64 - + +
- - + + +
@@ -126,6 +116,7 @@ or other application using the libvirt API. +
@@ -232,44 +223,47 @@ or other application using the libvirt API.