-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbasic.sh.mojave
33 lines (30 loc) · 1.33 KB
/
basic.sh.mojave
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# qemu-img create -f qcow2 ~/macos_mojave.qcow2 64G
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD
OVMF=~/mojave
qemu-system-x86_64 \
-enable-kvm \
-m 4G \
-machine q35,accel=kvm \
-smp 4,cores=2 \
-cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
-device isa-applesmc,osk="$OSK" \
-smbios type=2 \
-drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
-drive if=pflash,format=raw,file="$OVMF/macos_mojave_VARS.fd" \
-vga none \
-usb -device usb-kbd -device usb-mouse \
-netdev bridge,id=br0 \
-device vmxnet3,netdev=br0,id=net0,mac=52:54:00:65:11:b2 \
-device ich9-ahci,id=sata \
-drive id=ESP,if=none,format=qcow2,file=~/ESP.qcow2 \
-device ide-hd,bus=sata.2,drive=ESP \
-drive id=InstallMedia,format=raw,if=none,file=~/BaseSystem.img \
-device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=SystemDisk,if=none,file=~/macos_mojave.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \
-device pcie-root-port,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \
-device vfio-pci,host=02:00.0,bus=port.1,multifunction=on \
-device vfio-pci,host=02:00.1,bus=port.1 \
-usb -device usb-host,hostbus=1,hostaddr=3