update config

master
Cole Deck 4 years ago
parent 829d5ab694
commit 50783d144f

@ -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

@ -13,12 +13,9 @@ or other application using the libvirt API.
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu placement='static' current='12'>16</vcpu>
<memory unit='KiB'>12582912</memory>
<currentMemory unit='KiB'>12582912</currentMemory>
<vcpu placement='static' current='14'>16</vcpu>
<vcpus>
<vcpu id='0' enabled='yes' hotpluggable='no'/>
<vcpu id='1' enabled='yes' hotpluggable='yes'/>
@ -26,8 +23,8 @@ or other application using the libvirt API.
<vcpu id='3' enabled='yes' hotpluggable='yes'/>
<vcpu id='4' enabled='yes' hotpluggable='yes'/>
<vcpu id='5' enabled='yes' hotpluggable='yes'/>
<vcpu id='6' enabled='no' hotpluggable='yes'/>
<vcpu id='7' enabled='no' hotpluggable='yes'/>
<vcpu id='6' enabled='yes' hotpluggable='yes'/>
<vcpu id='7' enabled='yes' hotpluggable='yes'/>
<vcpu id='8' enabled='yes' hotpluggable='yes'/>
<vcpu id='9' enabled='yes' hotpluggable='yes'/>
<vcpu id='10' enabled='yes' hotpluggable='yes'/>
@ -39,27 +36,28 @@ or other application using the libvirt API.
</vcpus>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<vcpupin vcpu='2' cpuset='4'/>
<vcpupin vcpu='3' cpuset='5'/>
<vcpupin vcpu='4' cpuset='6'/>
<vcpupin vcpu='5' cpuset='7'/>
<vcpupin vcpu='8' cpuset='8'/>
<vcpupin vcpu='9' cpuset='9'/>
<vcpupin vcpu='10' cpuset='10'/>
<vcpupin vcpu='11' cpuset='11'/>
<vcpupin vcpu='12' cpuset='12'/>
<vcpupin vcpu='13' cpuset='13'/>
<vcpupin vcpu='0' cpuset='4'/>
<vcpupin vcpu='1' cpuset='5'/>
<vcpupin vcpu='2' cpuset='6'/>
<vcpupin vcpu='3' cpuset='7'/>
<vcpupin vcpu='4' cpuset='8'/>
<vcpupin vcpu='5' cpuset='9'/>
<vcpupin vcpu='6' cpuset='10'/>
<vcpupin vcpu='7' cpuset='11'/>
<vcpupin vcpu='8' cpuset='12'/>
<vcpupin vcpu='9' cpuset='13'/>
<vcpupin vcpu='10' cpuset='14'/>
<vcpupin vcpu='11' cpuset='15'/>
<vcpupin vcpu='12' cpuset='2'/>
<vcpupin vcpu='13' cpuset='3'/>
<emulatorpin cpuset='0-1'/>
<iothreadpin iothread='1' cpuset='14-15'/>
<iothreadpin iothread='1' cpuset='0-1'/>
</cputune>
<os>
<type arch='x86_64' machine='pc-q35-5.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<boot dev='hd'/>
<bootmenu enable='no'/>
<bootmenu enable='yes'/>
</os>
<features>
<acpi/>
@ -73,23 +71,13 @@ or other application using the libvirt API.
<synic state='on'/>
<stimer state='on'/>
<reset state='on'/>
<vendor_id state='on' value='087D1028'/>
<frequencies state='on'/>
</hyperv>
<kvm>
<hidden state='on'/>
</kvm>
<vmport state='off'/>
</features>
<cpu mode='host-passthrough' check='none' migratable='off'>
<cpu mode='host-passthrough' check='none' migratable='on'>
<topology sockets='1' dies='1' cores='8' threads='2'/>
<cache mode='passthrough'/>
<feature policy='require' name='topoext'/>
<feature policy='require' name='svm'/>
<feature policy='require' name='apic'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='invtsc'/>
<feature policy='disable' name='amd-stibp'/>
</cpu>
<clock offset='localtime'>
<timer name='rtc' present='no' tickpolicy='catchup'/>
@ -103,22 +91,24 @@ or other application using the libvirt API.
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='yes'/>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='writeback' io='threads' discard='unmap'/>
<driver name='qemu' type='qcow2' cache='none' io='threads'/>
<source file='/var/lib/libvirt/images/win10.qcow2'/>
<target dev='sda' bus='scsi'/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/cole/Downloads/SW_DVD5_WIN_ENT_LTSC_2019_64-bit_English_MLF_X21-96425_KMS38_ESD.iso'/>
<target dev='sdb' bus='scsi'/>
<source file='/home/cole/sync/iso/18363.449.19H2_ALL_PLUS_1809_LTSC_ALL_CLIENTMULTI_FAT32_X64_EN-US.iso'/>
<target dev='sdb' bus='sata'/>
<readonly/>
<boot order='2'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='file' device='cdrom'>
@ -126,6 +116,7 @@ or other application using the libvirt API.
<source file='/home/cole/Downloads/virtio-win-0.1.171.iso'/>
<target dev='sdc' bus='sata'/>
<readonly/>
<boot order='3'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
<controller type='sata' index='0'>
@ -232,44 +223,47 @@ or other application using the libvirt API.
<gl enable='no' rendernode='/dev/dri/by-path/pci-0000:04:00.0-render'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x2'/>
</source>
<address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x3'/>
</source>
<address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
</hostdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</memballoon>
<shmem name='looking-glass'>
<model type='ivshmem-plain'/>
<size unit='M'>32</size>
<size unit='M'>64</size>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</shmem>
</devices>
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/home/cole/vfio/acpitable.bin'/>
<qemu:arg value='-overcommit'/>
<qemu:arg value='cpu-pm=on'/>
</qemu:commandline>
</domain>

Loading…
Cancel
Save