Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
- BIOS=/.kvm/Clover.qcow2
- OS=/.kvm/macos.img
- CORE=/.kvm
- SMP=16
- CORES=8
- DIES=2
- THREADS=1
- SOCKETS=1
- CPU=Penryn
- MEM=24G
- GPU_VID=vfio-pci,host=42:00.0,bus=pcie.0,multifunction=on
- GPU_AUD=vfio-pci,host=42:00.1,bus=pcie.0
- USBCAM_A=0x0c45
- USBCAM_B=0x6366
- options_original=+ssse3,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc
- options=+kvm_pv_unhalt,+kvm_pv_eoi,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check
- name=MacOS
- sudo qemu-system-x86_64 -nographic \
- -enable-kvm \
- -m $MEM \
- -M q35,accel=kvm,kernel_irqchip=on \
- -smp $SMP,sockets=$SOCKETS,cores=$CORES,dies=$DIES,threads=$THREADS \
- -cpu $CPU,vendor=GenuineIntel,kvm=on,$options \
- -device usb-kbd,bus=ehci.0,port=2 \
- -device isa-applesmc,osk="$OSK" \
- -smbios type=2 \
- -device ich9-intel-hda \
- -device ich9-ahci,id=sata \
- -drive if=pflash,format=raw,readonly,file="$CORE/OVMF_CODE.fd" \
- -drive if=pflash,format=raw,file="$CORE/OVMF_VARS.fd" \
- -display none \
- -vga none \
- -spice port=5930,disable-ticketing \
- -device virtio-serial-pci \
- -usb -device usb-kbd -device usb-mouse \
- -netdev user,id=net0 \
- -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
- -drive id=BIOS,if=none,snapshot=off,format=qcow2,file=$BIOS \
- -device ide-hd,bus=sata.2,drive=BIOS \
- -hda /dev/sda \
- -device usb-host,vendorid=0x0a12,productid=0x0001 \
- -device usb-host,vendorid=0x248a,productid=0x8367 \
- -device usb-host,vendorid=0x05ac,productid=0x12a8 \
- -device usb-host,productid=$USBCAM_B,vendorid=$USBCAM_A \
- -device $GPU_VID \
- -device $GPU_AUD \
Advertisement
Add Comment
Please, Sign In to add comment