Roboto3x

MacOS_improved 5-27-2020

May 27th, 2020
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.78 KB | None | 0 0
  1. #!/bin/bash
  2. OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
  3. BIOS=/.kvm/Clover.qcow2
  4. OS=/.kvm/macos.img
  5. CORE=/.kvm
  6.  
  7. SMP=16
  8. CORES=8
  9. DIES=2
  10. THREADS=1
  11. SOCKETS=1
  12. CPU=Penryn
  13. MEM=24G
  14.  
  15. GPU_VID=vfio-pci,host=42:00.0,bus=pcie.0,multifunction=on
  16. GPU_AUD=vfio-pci,host=42:00.1,bus=pcie.0
  17. USBCAM_A=0x0c45
  18. USBCAM_B=0x6366
  19.  
  20.  
  21. options_original=+ssse3,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc
  22. options=+kvm_pv_unhalt,+kvm_pv_eoi,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check
  23.  
  24. name=MacOS
  25.  
  26.  
  27. sudo qemu-system-x86_64 -nographic \
  28.     -enable-kvm \
  29.     -m $MEM \
  30.     -M q35,accel=kvm,kernel_irqchip=on \
  31.     -smp $SMP,sockets=$SOCKETS,cores=$CORES,dies=$DIES,threads=$THREADS \
  32.     -cpu $CPU,vendor=GenuineIntel,kvm=on,$options \
  33.     -device usb-kbd,bus=ehci.0,port=2 \
  34.     -device isa-applesmc,osk="$OSK" \
  35.     -smbios type=2 \
  36.     -device ich9-intel-hda \
  37.     -device ich9-ahci,id=sata \
  38.     -drive if=pflash,format=raw,readonly,file="$CORE/OVMF_CODE.fd" \
  39.     -drive if=pflash,format=raw,file="$CORE/OVMF_VARS.fd" \
  40.     -display none \
  41.     -vga none \
  42.     -spice port=5930,disable-ticketing \
  43.     -device virtio-serial-pci \
  44.     -usb -device usb-kbd -device usb-mouse \
  45.     -netdev user,id=net0 \
  46.     -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
  47.     -drive id=BIOS,if=none,snapshot=off,format=qcow2,file=$BIOS \
  48.     -device ide-hd,bus=sata.2,drive=BIOS \
  49.     -hda /dev/sda \
  50.     -device usb-host,vendorid=0x0a12,productid=0x0001 \
  51.     -device usb-host,vendorid=0x248a,productid=0x8367 \
  52.     -device usb-host,vendorid=0x05ac,productid=0x12a8 \
  53.     -device usb-host,productid=$USBCAM_B,vendorid=$USBCAM_A \
  54.     -device $GPU_VID \
  55.     -device $GPU_AUD \
Advertisement
Add Comment
Please, Sign In to add comment