Last active
April 23, 2016 11:27
-
-
Save TobleMiner/430a6865493e001784e902b00a2505fb to your computer and use it in GitHub Desktop.
Launch script for my windows gaming VM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo qemu-system-x86_64 \ | |
-machine q35 `# Chipset` \ | |
-cpu host,kvm=off `# Emulate host CPU features but mask kvm flag` \ | |
-smp sockets=1,cores=4,threads=2 `# Set cpu layout` \ | |
-enable-kvm `# Enable kvm for performance > 0` \ | |
-rtc base=localtime `# Ensure that windows gets the correct timezone` \ | |
-drive if=pflash,format=raw,readonly,file=firmware/OVMF_CODE-with-csm.fd `# UEFI rom image` \ | |
-drive if=pflash,format=raw,file=firmware/OVMF_VARS-with-csm-win7.fd `# EFI vars` \ | |
-m 16384 `# RAM` \ | |
-drive file=win7.img,format=raw,index=0,media=disk `# Main disk image` \ | |
-drive file=/dev/sda,format=raw,media=disk `# Pass through SSD for games and stuff` \ | |
-device vfio-pci,host=01:00.0 `# Pass through GPU` \ | |
-device ich9-usb-uhci3,id=uhci `# Emulate USB uhci controller` \ | |
-device usb-ehci,id=ehci `# Emulate USB ehci controller` \ | |
-device nec-usb-xhci,id=xhci `# Emulate xhci controller` \ | |
-usb -usbdevice host:1b1c:0c0a `# Pass through my Corsair AIO pump` \ | |
-net nic -net bridge,br=br-vms `# Use qemu bridge helper for network` \ | |
-device vfio-pci,host=03:00.0 `# Pass through pysical PCIe USB 3.0 SS controller` \ | |
-device vfio-pci,host=06:00.0 `# Pass through Realtek ethernet controller because its iommu group is already passed through` \ | |
-nographic `# Don't try to spawn graphics on my shell` \ | |
-vga none `# Don't emulate any video devices` \ | |
-serial none `# Don't give me the serial port of the guest as stdout/-in` | |
#-device virtio-blk-pci,drive=games -drive if=none,id=games,file=/dev/sda,format=raw # Virtio drive passthrough (windows driver doesn't work for me) | |
#-vnc 127.0.0.1:0 `# Enable VNC because cactus` \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment