Skip to content

Instantly share code, notes, and snippets.

@transistor1
Created April 25, 2019 23:12
Show Gist options
  • Save transistor1/247e048329f072235621ac3fbe690f61 to your computer and use it in GitHub Desktop.
Save transistor1/247e048329f072235621ac3fbe690f61 to your computer and use it in GitHub Desktop.
Virtual Mac Pro
#!/bin/bash
# Source: https://forums.macrumors.com/threads/is-my-virtual-mac-pro-better-than-your-real-mp.2121703/#post-27283133
# See https://www.mail-archive.com/qemu-devel@nongnu.org/msg471657.html thread.
#
# The "pc-q35-2.4" machine type was changed to "pc-q35-2.9" on 06-August-2017.
#
# The "media=cdrom" part is needed to make Clover recognize the bootable ISO
# image.
##################################################################################
# NOTE: Comment out the "MY_OPTIONS" line in case you are having booting problems!
##################################################################################
MY_OPTIONS="+aes,+xsave,+avx,+xsaveopt,avx2,+smep,+ssse3,+sse4.2"
/home/jam/QEMU/bin/qemu-system-x86_64 -enable-kvm -m 8192 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,$MY_OPTIONS\
-machine pc-q35-2.9 \
-smp 16,cores=8 \
-device ide-drive,bus=ide.0,drive=MacHDD \
-drive id=MacHDD,if=none,file=./mac_hdd2.img \
-device ide-drive,bus=ide.2,drive=MacHDD2 \
-drive id=MacHDD2,if=none,file=./Movaje.img \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=23:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=./RX580.rom \
(RX580 ) -device vfio-pci,host=23:00.1,bus=root.1,addr=00.1 \
( HDMI AUDIO ) -device vfio-pci,host=01:00.0,multifunction=on \ ( 960 EVO NVME )
-device ioh3420,id=root_port1,multifunction=on,chassis=1,addr=03.0,slot=3,bus=pcie.0 \
-device vfio-pci,host=1f:00.0,bus=root.1,addr=01.0,multifunction=on \ ( Apple 802.11 AC Wifi and Bluetooth( Power only for the Bluetooth connection via internal USB2 header )
-device vfio-pci,host=03:00.0,bus=root.1,addr=02.0,multifunction=on \ ( USB 2 front usb3, two rear usb3, internal USB2 headers ) ( Leaving 2 rear USB 3.1 and 2 rear USB2 for the host system )
-drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \
-drive if=pflash,format=raw,file=OVMF_VARS-1024x768.fd \
-smbios type=2 \
-device ich9-intel-hda -device hda-duplex \
-netdev bridge,id=hn0 -device e1000-82545em,netdev=hn0 \
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \
-vga none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment