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
| #!/bin/bash --posix
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VMDIR=/home/mardan/Desktop/vmware/MyMac OVMF=$VMDIR/macOS-Simple-KVM
qemu-system-x86_64 \ -enable-kvm \ -m 8G \ -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/firmware/OVMF_CODE.fd" \ -drive if=pflash,format=raw,file="$OVMF/firmware/OVMF_VARS-1024x768.fd" \ -vga qxl \ -device ich9-intel-hda -device hda-output \ -usb -device usb-kbd -device usb-mouse \ -netdev user,id=net0 \ -device e1000-82545em,netdev=net0,id=net0,mac=59:b8:e6:66:7b:ec \ -device ich9-ahci,id=sata \ -drive id=ESP,if=none,format=qcow2,file=$OVMF/ESP.qcow2 \ -device ide-hd,bus=sata.2,drive=ESP \ -drive id=InstallMedia,format=raw,if=none,file=$OVMF/BaseSystem.img \ -device ide-hd,bus=sata.3,drive=InstallMedia \ -drive id=SystemDisk,if=none,file=$VMDIR/MyDisk.qcow2 \ -device ide-hd,bus=sata.4,drive=SystemDisk \
|