#!/bin/bash # Mr. Turritopsis Dohrnii Teo En Ming # Singapore # 22 Feb 2020 Saturday # Haven't configure bridged networking yet. TO-DO in future. vmname="windows10vm" if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then echo "A passthrough VM is already running." & exit 1 else # use pulseaudio export QEMU_AUDIO_DRV=pa export QEMU_PA_SAMPLES=8192 export QEMU_AUDIO_TIMER_PERIOD=99 export QEMU_PA_SERVER=/run/user/1000/pulse/native cp /usr/share/OVMF/OVMF_VARS.fd /tmp/my_vars.fd # /data is Toshiba 1 TB 3.5 inch internal SATA harddisk qemu-system-x86_64 \ -name $vmname,process=$vmname \ -machine type=pc,accel=kvm \ -cpu host,kvm=off \ -smp 3,sockets=1,cores=3,threads=1 \ -m 16G \ -balloon none \ -rtc clock=host,base=localtime \ -serial none \ -parallel none \ -soundhw hda \ -usb \ -device usb-host,vendorid=0x0603,productid=0x00f2 \ -device usb-host,vendorid=0x056e,productid=0x0107 \ -device vfio-pci,host=01:...