Advertisement
Celmor

qemu.sh public

Aug 4th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.12 KB | None | 0 0
  1. #!/bin/bash
  2. set -e
  3.  
  4. #free && sync && sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' && free
  5. sudo cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd && \
  6. sudo QEMU_AUDIO_DRV=pa qemu-system-x86_64 \
  7.   -enable-kvm \
  8.   -cpu host,kvm=off -smp maxcpus=8,sockets=1,cores=4,threads=2 \
  9.   -vga none \
  10.   -drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
  11.   -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  12.   `# PCI devices` \
  13.         -device vfio-pci,host=01:00.0,multifunction=on `# nVidia Audio` \
  14.         -device vfio-pci,host=01:00.1 `# nVidia GPU` \
  15.   `# USB devices` \
  16.         -usbdevice host:046d:c07d `# G910` \
  17.         -usbdevice host:046d:c32b `# G502` \
  18.         -usbdevice host:28de:1142 `# Steam Controller` \
  19.         -usbdevice host:1b1c:0c04 `# Corsair Link` \
  20.   -rtc base=localtime \
  21.   -soundhw hda \
  22.   -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no \
  23.   -drive file=/dev/disk/by-partuuid/b0d7f513-d189-4fa7-ad05-a1170eb1553c,format=raw \
  24.   -drive file=/dev/disk/by-partuuid/5d772257-d910-44e6-ae4c-0f7cb16de802,format=raw \
  25.   $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement