Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Detach intel usb 3.0 hub
- virsh nodedev-detach pci_0000_00_14_0
- #Turn off center monitor
- xrandr --output DP2 --off
- #Use OVMF
- cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd
- #Audio settings
- QEMU_PA_SAMPLES=128 QEMU_AUDIO_DRV=pa
- #Run VM
- qemu-system-x86_64 \
- -enable-kvm \
- -m 8196 \
- -smp cores=4,threads=2 \
- -cpu host,kvm=off \
- -vga none \
- -soundhw hda \
- -usb -usbdevice host:046e:5500 \
- -usb -usbdevice host:046d:c066 \
- -device usb-ehci,id=ehci \
- -device usb-host,id=asix,bus=ehci.0,vendorid=0x0b95,productid=0x7720 \
- -device vfio-pci,host=01:00.0,multifunction=on \
- -device vfio-pci,host=01:00.1 \
- -device vfio-pci,host=00:14.0 \
- -drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
- -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
- -device virtio-scsi-pci,id=scsi \
- -drive file=/home/username/VMs/vm_win10_x64.img,id=disk,format=qcow2,if=none,cache=writeback -device scsi-hd,drive=disk \
- -drive file=/mnt/Local_A1/VMs/Steam/steam.img,id=disk2,format=qcow2,if=none,cache=writeback -device scsi-hd,drive=disk2 #\
- #Turn center monitor back on
- xrandr --output DP2 --mode "1920x1200" --rate 60 --right-of DP1
- #Reattach intel usb 3.0 hub
- virsh nodedev-reattach pci_0000_00_14_0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement