Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Start virtual windows session
- export QEMU_PA_SAMPLES=8192
- export QEMU_AUDIO_DRV=pa
- #CPU Options
- OPTS="-M pc -enable-kvm -m 8192 -mem-path /dev/hugepages -mem-prealloc -balloon none -smp 4,cores=4,threads=1,sockets=1"
- case $1 in
- hv ) OPTS="$OPTS -cpu host,kvm=off,hv_relaxed,hv_vapic,hv_time,hv_spinlocks=0x1000" ;;
- * ) OPTS="$OPTS -cpu host,kvm=off" ;;
- esac
- #UEFI
- OPTS="$OPTS -drive if=pflash,format=raw,file=/home/user/ISOs/OVMF.fd"
- # The hard disk is exposed to the guest as a virtio-block device. OVMF has a
- # driver stack that supports such a disk. We specify this disk as first boot
- # option. OVMF recognizes the boot order specification.
- OPTS="$OPTS -device virtio-scsi-pci,id=scsi"
- OPTS="$OPTS -drive file=/dev/sdb,id=disk_primary,format=raw,if=none"
- OPTS="$OPTS -device scsi-hd,drive=disk_primary,bootindex=0"
- #VFIO Devices
- OPTS="$OPTS -device vfio-pci,host=01:00.0,romfile=/home/user/ISOs/furyx.rom"
- OPTS="$OPTS -device vfio-pci,host=01:00.1"
- OPTS="$OPTS -device vfio-pci,host=02:00.0"
- OPTS="$OPTS -net nic,model=virtio -net user"
- OPTS="$OPTS -rtc base=localtime,clock=host"
- OPTS="$OPTS -vga none"
- OPTS="$OPTS -soundhw hda"
- qemu-system-x86_64 $OPTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement